Re: [GD-General] ieee754 -0.0f?
Brought to you by:
vexxed72
From: Andras B. <and...@gm...> - 2006-02-01 19:04:44
|
Hah, there's the problem! Your program gives me the expected result, but if I replace "0.0f/-1.0f" to simply "-0.0f", then I get the wrong result! andras On Wed, 01 Feb 2006 11:19:40 -0700, Jim Tilander <jim...@gm...> wrote: > I don't have VC6 here, but for VC7 on a regular P4 box the following > produces the expected results: > > #include <cstdio> > > void main() > { > float a = 0.0f; > float b = 0.0f/-1.0f; > > printf( "%f = 0x%8.8x\n", a, *(int*)&a ); > printf( "%f = 0x%8.8x\n", b, *(int*)&b ); > } > > > /j > |