pi sin() on HP-32S?


When I take the sin of pi on my HP 32S, in RAD mode, I dont get an answer of 0. The answer I get is -2.067154E-13. I also get the same answer with my 49G, but on my 30S i get exactly 0.


On my 32SII, the sine of pi is -2.06761537357e-13. Under "Answers to Common Questions" in Appendix A of the manual:

Q: Why does calculating the sine (or tangent) of pi radians display a very small number instead of 0?

A: pi cannot be represented exactly with the 12-digit precision of the calculator.



The HP30S is not an HP original design. The HP32S is.

As correctly mentioned by Daniel Kekez, if you compute sin(3.14159265359xxx) you should have -2.0671537357E-13 as an answer, and that's what's shown in the HP42S in FIX 11. The xxx were added to remind the HP42S works with 15 digits internally.

The HP30S answer is wrong OR uses an approximation algorithm that is not explicitly shown.

I agree with the HP32S answer. The HP30S chip designers may not care for this. And HP seems not to care, too.



The HP30S appears to perform its calculations in binary, instead of BCD (Binary Coded Decimal), and appears to calculate the results of its transcendental functions to about 24 digits of precision. I believe it also utilizes a more sophisticated rounding process than that found on other calculators.

The HP30S was designed as a calculator for classroom use, and roundoff errors from normal floating point calculations can cause confusion for many students. Hence, the extended precision and more sophisticated rounding algorithms to provide "exact" answers.

For more information on the varying precision and algorithm quality of various scientific calculators, check out the calculator forensics pages on my web site.



I thought seriously about removing my post, but it's a good example of what happens when you do not know actual facts.

I felt a lot bad, but I learnet some new facts.

But I still believe students should know more about precision, mostly in trigonometric computations. It's a fact that the better precision is achieved when working with more internal digits, but do the students know about what happens if only the digits shown in the display are used?

I am a teacher and I call their attention for these facts, mostly for the ones attending classes for Computing Science.

Cheers and thank you for the good posts.

Possibly Related Threads...
Thread Author Replies Views Last Post
  [OT] Mathematica free for Raspberry PI BruceH 32 2,287 11-23-2013, 05:24 AM
Last Post: Nick_S
  Computing pi with the PC-1300S Kiyoshi Akima 0 233 11-17-2013, 12:24 AM
Last Post: Kiyoshi Akima
  Calculating Pi LHH 9 714 09-27-2013, 10:50 PM
Last Post: Gerson W. Barbosa
  Joys of eBay: HP-32S, HP-32SII, HP-42S, HP-16C, ... Sasu Mattila 7 626 09-23-2013, 04:39 PM
Last Post: Julián Miranda (Spain)
  HP 32s LCD part Trisnadi Sutrisno 2 345 08-27-2013, 02:12 PM
Last Post: Han
  Visualization of pi Bruce Bergman 13 956 08-17-2013, 05:00 PM
Last Post: Howard Owen
  HP-50 on Raspberry Pi? The HP-67 come true? Matti Övermark 10 768 07-30-2013, 09:40 PM
Last Post: Matti Övermark
  HP-32S II Expansion Matt Agajanian 14 1,180 07-21-2013, 10:19 PM
Last Post: Matt Agajanian
  HP 32S-II Vertical Curve Program Ron Cardwell 2 371 05-20-2013, 07:54 AM
Last Post: Thomas Klemm
  OT: Happy Pi Day! Eddie W. Shore 13 987 03-22-2013, 10:44 AM
Last Post: Les Koller

Forum Jump: