Hi,
> I'm fairly confident that if during the development of Fortran 90 you had
> brought up the issue of manipulating the bits of a floating point number,
> the response from the committee would have been to do what you are
doing --
> use TRANSFER to convert the floating point number to an integer and go
from
> there; X3J3 had expected TRANSFER to be implemented efficiently.
Yes, I would agree with what you said. I really though TRANSFER would be
implemented efficiently because casting has been used so extensively in C
for so long that this is a standard thing. Anybody have any ideas why (come
on, implementors, I know some of you read these e-mails!?!)?
In the mean time, implementors could provide a trivial extension of some
low-level functions such as bit manipulation for REAL's, which would be
equivalent to:
BIT_MANIPULATION_FUNCTION( TRANSFER(real_number, integer_with_enough_bits),
...), until they get TRANSFER right.
But of course, this is not the same as actually getting TRANSFER right, for
*both* scalar and array arguments, such as (I hope) REAL or INT or other
similar representation conversion functions.
Thanks,
_____________________________________________
Aleksandar Donev
http://www.pa.msu.edu/~donev/
[log in to unmask]
(517) 432-6770
Department of Physics and Astronomy
Michigan State University
East Lansing, MI 48824-1116
_____________________________________________
|