Post Reply 
Torture tests: what do they mean?
05-18-2014, 03:09 PM (This post was last modified: 05-18-2014 03:20 PM by Dieter.)
Post: #57
RE: Torture tests: what do they mean?
(05-18-2014 12:04 AM)Paul Dale Wrote:  
(05-17-2014 08:29 PM)Dieter Wrote:  As shown earlier, you generally cannot trust the last 8 digits. So 34–8 = 26 digits is the expected accuracy here.

Except that TAN is coded in C and uses the 39 digit internal representation during the entire evaluation. I'm losing 13 digits which is a concern.

The argument of the tangent can be given to at most 34 digits. This (!) is the reason why eight digits are lost. There may be a bug in the tangent routine but I do not think it's the cause of what we're seeing here.

Here are some results from Wolfram Alpha:

tan(1.570796460176991150442477876106194) = -7497 258.1 8532 5587 1129 0507 1870 6902 99
tan(1.570796460176991150442477876106195) = -7497 258.1 8532 5587 1129 0507 1814 4814 18
tan(1.570796460176991150442477876106196) = -7497 258.1 8532 5587 1129 0507 1758 2725 38

As shown earlier, the result changes by 0,562 units of the 26th digit if the 34th digit of the argument changes by 1 unit.
So all we know is that the tangent of 355/226 is -7497 258.1 8532 5587 1129 0507 18...

If (!) the user was able to provide a 39-digit representation of 355/226 (for instance with a dedicated TAN_Y/X function) the 34s might get 31 digits right. Otherwise just 26 correct digits can be expected here. That's why I wonder why the 34s returns 31-32 correct digits. ;-)

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


Messages In This Thread
Torture tests: what do they mean? - jebem - 05-13-2014, 10:58 PM
RE: Torture tests: what do they mean? - Dieter - 05-18-2014 03:09 PM



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