-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Bruno Haible on 3/24/2007 7:04 PM:
> Hi,
> 
> How can one distinguish +0.0 and -0.0. printf() needs to be able to do it.
> How can this be done portably? I can see two ways:
>   a) By knowing the bit position of the sign bit.
>   b) By doing a bit-for-bit comparison against +0.0.

You can also assume IEEE rules, and compare against signed infinity:
+0. / 1 => +infinity
- -0. / 1 => -infinity

- --
Don't work too hard, make some time for fun as well!

Eric Blake             [EMAIL PROTECTED]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGBe6884KuGfSFAYARAliPAJkBDx/l499EKZvJFxigAAYLRTYHGwCfSEPp
viDc1I14TvemUzGehiuOrDY=
=OmMu
-----END PGP SIGNATURE-----


Reply via email to