Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save aaronryank/574070d0c04ffa6b92b20dda76220b62 to your computer and use it in GitHub Desktop.
Save aaronryank/574070d0c04ffa6b92b20dda76220b62 to your computer and use it in GitHub Desktop.
/* 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