Post Reply 
sin(x)^2+cos(x)^2 = 1 on different calcs
09-24-2018, 05:39 PM
Post: #3
RE: sin(x)^2+cos(x)^2 = 1 on different calcs
Hi,

You understand the limits of floating point, but dissapointed that it's not 1 in all cases?

Now you may say "but Free42 always gets 1"

You don't state which version of Free42 you're using. Probably "Decimal", in which case it is quadruple precision decimal floating-point which gives 34 decimal digits of precision. Also, it keeps all 34 digits with each calculation to reduce rounding error. So for the 12 displayed digits, there are 22 further digits not displayed.

Try the following:
COS(2*PI/3) + 0.5

On the Decimal version you'll get 3E-34

Now for interest, subtract 1 from each result in your previous experiment.
.


Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: sin(x)^2+cos(x)^2 = 1 on different calcs - BartDB - 09-24-2018 05:39 PM



User(s) browsing this thread: 1 Guest(s)