Created
June 2, 2017 20:30
-
-
Save aaronryank/574070d0c04ffa6b92b20dda76220b62 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
/* Proof that there are no floating point errors when multiplying a double by zero. | |
* You're welcome, Downgoat | |
*/ | |
int main(void) | |
{ | |
double f; | |
for (f = 0; f < 10000; f += 0.000001) | |
if (f * 0) | |
printf("ERROR IN %f\n",f); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment