I was struggling to understand why the following snippet calculating information wrong:
result = sqrt(5/8 + sqrt(5)/8);
printf("Result is %1.15Lf\n", result);
I tried to separate and calculate one part first and than another, and still having same issue.
It's giving me:
Result is 0.528685631720282
While I checked the result with WolframAlpha and it is around 0.9510565.