HP Forums

Full Version: HP-35s Cos[x] and Tan[x] bugs resolved?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

I just got the HP-35s and checked for the Cos(x) and Tan(x) bugs,
For Cos[90deg] the 35s gives 0.0174524064373 (0.017452406437284)
and
for Cos[89.99999] I get 1.7453292 E-7 (1.7453292519943 E-7)

Is it possible that HP removed those bugs?

First of all, cos 90° should return zero, and so does the 35s. On the other hand, cos 89° gives 0,0174524064373, the value you posted. And cos 89,99999° returns 1,7453292 E-7 both on your machine as well as on my early 35s bought in 2007.

So I do not think that anything has changed - the results of my early and your current 35s agree. The "bug" you mentioned refers to the loss of accuracy with arguments close to 90 degrees. In this case, the second result carries merely eight significant digits (out of twelve) with the last one truncated, not rounded:

 cos 89,9999       1,74532925 E-6
cos 89,99999 1,7453292 E-7
cos 89,999999 1,745329 E-8
cos 89,9999999 1,74532 E-9
cos 89,99999999 1,74532925199 E-10 ...back again ;-)
Dieter

I just found some notes re. the 35s tangent bug. According to an earlier examination, the loss of accuracy occurs at results in the order of 10-3 to 10-9. These values have only 11 ... 6 valid digits, the last of which usually is truncated or 1 unit low.

Example:

tan 0,2°      = 3,490 6726 8160 E-3  (rounded up from ..81596)
35s result: 3,490 6726 8159 E-3 (truncated to ...8159)
Valid digits = 15 - 3 = 12 digits -1 ULP
 
tan 0,01° = 1,745 3292 6972 E-4
35s result: 1,745 3292 6964 E-4
Valid digits = 15 - 4 = 11 digits -1 ULP
 
tan 0,001° = 1,745 3292 5217 E-5
35s result: 1,745 3292 5117 E-5
Valid digits = 15 - 5 = 10 digits -1 ULP
 
tan 0,00001° = 1,745 3292 5199 E-7
35s result: 1,745 3292 0000 E-7
Valid digits = 15 - 7 = 8 digits -1 ULP
 
tan 1 E-7° = 1,745 3292 5199 E-9
35s result: 1,745 3200 0000 E-9
Valid digits = 15 - 9 = 6 digits -1 ULP
 
tan 1 E-9° = 1,745 3292 5199 E-11
35s result: 1,745 3292 5199 E-11 ' we left the danger zone ;-)
Dieter


Edited: 31 Oct 2013, 1:26 p.m.