Created
August 24, 2016 12:03
-
-
Save KristianLyng/cea60419e449482c5f30c13406abf549 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kly@leia:~$ cat foo.c | |
#include <stdio.h> | |
int main(void) { | |
float f = 340282346638528859811704183484516925440.000000; | |
float x = f + 199999999999999999999.9F; | |
printf ("%f vs %f (%s)\n",f,x, (f==x) ? "match" : "no match"); | |
return 0; | |
} | |
kly@leia:~$ gcc -Wall -g foo.c | |
kly@leia:~$ ./a.out | |
340282346638528859811704183484516925440.000000 vs 340282346638528859811704183484516925440.000000 (match) | |
kly@leia:~$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment