float vs. double

Rick Genter x18 reg at lti.UUCP
Wed Aug 10 06:15:23 AEST 1988


I understand that dpANS C requires that sizeof (float) <= sizeof (double).
However, does it state anywhere that a double should provide greater *precision*
than a float, or for that matter that casting a float to a double (or vice versa)
shouldn't raise a hardware exception?  I can envision a situation where
sizeof (float) == sizeof (double), the difference being that floats trade off
mantissa bits for exponent bits.  I believe the VAX architecture provides
this.

                                        - reg
 



More information about the Comp.lang.c mailing list