Created
August 24, 2016 12:04
-
-
Save KristianLyng/2a85e8b79aceedfe583e4686e7b47b44 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 * 2; | |
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 inf (no match) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment