Create a gist now

Instantly share code, notes, and snippets.

0.1 + 0.1 + 0.1 == 0.3 ?
#include <stdio.h>
int
main(void)
{
double answer = 0.1 + 0.1 + 0.1;
if(answer == 0.3){
printf("True:%.100f\n", answer);
} else {
printf("False:%.100f\n", answer);
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment