Re: ieee754 -0.0f?

"Andras Balogh" <[email protected]> Wed, 01 Feb 2006 12:04:35 -0700
Newsgroups gmane.games.devel.general
Message-ID <[email protected]>
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 <[email protected]>  
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
>


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Gamedevlists-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gamedevlists-general
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_id=557