Skip to content

Instantly share code, notes, and snippets.

@dcci
Last active July 13, 2016 17:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dcci/7d403382af69ce9c66708c8fb37b150d to your computer and use it in GitHub Desktop.
Save dcci/7d403382af69ce9c66708c8fb37b150d to your computer and use it in GitHub Desktop.
Floating point is fun
#include <math.h>
#include <stdio.h>
int main(void) {
// pow(x, 0.5) -> sqrt(x)
printf("%f %f\n", pow(-0.0, 0.5), sqrt(-0.0));
return (0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment