Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // golden ration comparison
- #define EPS 1e-9
- double phi = (1 + sqrt(5)) / 2;
- if (fabs((1 / phi) - (phi - 1)) < EPS) printf("true\n");
- else printf("false\n");
- // true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement