Skip to content

Instantly share code, notes, and snippets.

@shirok
Created June 6, 2018 02:45
Show Gist options
  • Save shirok/82e312c31289ba2866dc529dd1ca8c84 to your computer and use it in GitHub Desktop.
Save shirok/82e312c31289ba2866dc529dd1ca8c84 to your computer and use it in GitHub Desktop.
shiro@intermezzo:~/src/Gauche/src$ cat t.c
#include <stdio.h>
#include <math.h>
int main()
{
double x = 1.0 - pow(2.0, -52);
double y = cbrt(x);
printf("%20.17lf %20.17lf\n", x, y);
return 0;
}
shiro@intermezzo:~/src/Gauche/src$ cc t.c -lm
shiro@intermezzo:~/src/Gauche/src$ ./a.out
0.99999999999999978 1.00000000000000022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment