View Single Post
Old 03 July 2022, 10:28   #4
Sim085
Registered User
 
Join Date: Apr 2009
Location: N/A
Posts: 962
Thank you alkis, doing this gives the following result:
Code:
a: 1074790400.00 b: 4.00
This resolved the 4.01 / 4.00 issue.

So this leaves only the question on why storing the pow() result in a variable of type double prints something completely different than printing the result of pow() directly?

Quote:
Originally Posted by alkis View Post
You are using %lf in printf, try with %f

See for example this https://stackoverflow.com/a/4264154/8390560
Sim085 is offline  
 
Page generated in 0.04254 seconds with 11 queries