[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: firstname.lastname@example.org
- Subject: %get-extended?
- From: djskrien@COLBY.EDU (Dale J. Skrien)
- Date: Thu, 15 Aug 91 09:49:53 -0400
- Cc: djskrien@host0.COLBY.EDU
I am trying to extract data from a file containing extended real numbers
(each of which uses 10 bytes). I can read the 10 bytes of an
extended real into memory at a location specified by a macptr,
but don't know what to do next. MCL has the functions %get-word
and %get-long to convert bytes in memory into integers and long integers,
but there is no such function that I could find in the manuals
for extracting extended reals.
Does anyone have such a function or any idea how to (easily)
create such a function? The only thing I can think of is to tear
the extended real apart into its components consisting of the sign
bit, 15 exponent bits, and 64 mantissa bits
and reconstruct the floating point number from these parts.
I would like the function to take a macptr and optional offset
as its arguments and return a floating-point number.