Post Reply 
Different trig algorithms in CAS and Home?
01-05-2018, 08:48 AM
Post: #23
RE: Different trig algorithms in CAS and Home?
(01-05-2018 01:33 AM)chromos Wrote:  My question was rather a reaction to the posted example, where the accuracy of the calculations were compared and which differed in a fifth or so significant digit. In any case, my question was not a complaint, but rather a curiosity.

This is simply caused by the properties of the tangent function for arguments close to pi/2. Here the tangent and its derivative approach infinity. If you want the tangent of 355/226 to agree with the true result in 12 significant digits, you have to specify 355/226 with at least 20 (!) digits.

This is an example of a function where a change in the last 12th digit of the input may cause changes in the 4th digit of the result. More precisely: at this point the output varies by 5,62 E+13 times the input change. Since the input has an inherent roundoff error of ±5 E–12 the calculated tangent cannot be more precise than ±281 (!). This means that 4 significant digits are the best you can get.

BTW, if you really want higher precision you can of course have it: Free42 and the DM42 as well as the WP34s work with 34 digits, the latter may internally even use much more than these to ensure a correct result. And there are extended/arbitrary precision libraries available for some calculators, e.g. the longfloat library for the 50G. Maybe sometime something similar will be available for the Prime as well.

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Different trig algorithms in CAS and Home? - Dieter - 01-05-2018 08:48 AM



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