Post Reply 
HP35s Revisited Trig Quandary Bug # 2
02-16-2015, 11:53 PM (This post was last modified: 02-17-2015 12:20 AM by MarkHaysHarris777.)
Post: #1
HP35s Revisited Trig Quandary Bug # 2
HP35s bug # 2 states:

2) Cos(x) for x near 90 is dud. For what appears to be the same reason, Tan(x) for x near 90 is also dud.

So, today I'm playing with COS(89.9999). I'm planning to avoid the entire discussion of whether this is equivalent to COS(90) for all practical engineering purposes, also that the anwwer (0) zero is for all practical purposes also correct, in all engineering circles (as a caveat), and any answer even close to that (zero) is about all we can expect.

I can confirm that both of my HP35s units [A] & [B] give the following answer at FIX(4):

[89.9999] [COS] X=1.7453E-6

... a more than acceptable response from any engineering calculator within bounds of all practical measurement and well within all acceptable margins of error... not to mention, more accurate than most early generation scientific calculators, including the original HP35. Actually, both of my units [A] & [B] give the following internal answer, which considering everything is astounding:

174532925000 ... yes the answer is truncated, but hey, for the intermediate results registers in the HP35s that is precisely what 'should' happen. Also, this answer is 'accurate' in the last significant displayed decimal place. This does not look like a 'dud' in my estimation.

(Could someone who has a real 1972 HP35 that works try this and post the results?)

My HP35 bit the dust many moons ago (and sadly, I disposed of it). I powered up my 1977 TI30 this afternoon, and got the following result from COS(89.9999):

[Image: ti30_cos.jpg]

It took almost two(2) full seconds to calculate this cosine (and its off by 1 in the last place); and even though its correctly rounded in the last place this answer (which is zero by all engineering standard) is not nearly as accurate as the answer I get from the HP35s!

One of my small tiny claims to fame is that I wrote the scientific and transcendental functions library (pdeclib) PythonDecimalLibrary for the Python Decimal module (you can find the source on google code by searching for pdeclib, or you may download the module with PIP from PyPI). The Python Decimal module is an arbitrary precision IEEE module for maths (very fast maths). With pdeclib you may calculate transcendental functions to thousands of places accurately and quickly (with pdeclib you will get pilib which is a collection of PI calculation routines using ARCTAN and AGM--- routines going back to Machin, Euler, and others)

So, here is COS(89.9999) calculated to 500 digits:

>>> dscale(500)
42
>>> cos(d('89.9999')*piagm2()/180)
Decimal('0.000001745329251993443480767989605432786337627037312316176388873390931​43155446041360462904334365249335531055809287604438274442522096084140764859073443​37847119448948828512712058055726413331807627260020175652982884954161960424446318​96997714175132577300742842685207613919951602005662147690953427519610453528493822​29130888239017050032565967537592386621092663154955614255895040086322506359476098​78673580982632745296514824299930490272874039749943660184410685301981172847714229​781608738522219431997542244860388785')

Yes, its off in the last six places... set dscale(1001) and knock your socks off...!

So, here is the answer from the WP34s running double mode:

[89.9999] [gold] [cos] [gold] [<] [blue] [>]

1.745,329,251,993,443... 480,767,989,605,432,792 -006

You'll notice two things: 1) this is VERY impressive double mode, and VERY impressive use of available display resources (whoohoo, nice job!), and 2) this answer is wrong (that's right, its wrong, that is its off in the last two places... I'm shocked). :-p

BUT, what does it all mean? The answer I would have gotten in 1977 from my TI30 is perfectly acceptable! The answer I get from my HP35s is more than perfectly acceptable, its down-right overkill... not to mention really meaningless after the fourth decimal place...

So, why do we call the HP35s a 'trig dud' ? Obviously I think that judgement is unfair, but I also think it shows how far we have come in our expectations, even though the rules of engagement have not changed and the laws of significant figures has not changed either.

Conclusion: Bug # 2 is not a bug... its a petty annoyance. The HP35s can be relied upon for trigonometric calculations (in professional engineering and academia) for years to come; really.


PS I calculated COS(89.9999) on my phone... using QPython on Droid... with pdeclib.

Cheers,
marcus
Smile

Kind regards,
marcus
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP35s Revisited Trig Quandary Bug # 2 - MarkHaysHarris777 - 02-16-2015 11:53 PM



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