gcc321 and doubles and c++

Zane Dodson zdodson@zdodson.com
Thu Feb 20 18:22:00 GMT 2003


On Tue, Feb 18, 2003 at 10:35:13PM -0800, Chris Croswhite wrote:
| How are doubles represented in memory under c++?  The reason I ask, is that
| I need to get  the value of a double striped of the mantissa and then split
| into two 32 bit words inorder to perform bitwise operations on the
| individual parts (as bitwise operations only

frexp(3) and modf(3) may do part of what you need portably.

As has already been indicated in other replies, any bit manipulations
will require that you determine the byte ordering and alignment for your
platform.  If you choose to use GNU Autoconf for your application, there
are already some builtin tests for these platform-specific issues.

Best regards,

-- 
Zane Dodson
zdodson@zdodson.com



More information about the Gcc-help mailing list