HP Forums
pi sin() on HP-32S? - Printable Version

+- HP Forums (https://archived.hpcalc.org/museumforum)
+-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html)
+--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html)
+--- Thread: pi sin() on HP-32S? (/thread-26005.html)



pi sin() on HP-32S? - K. Crowe - 01-10-2003

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.


Re: pi sin() on HP-32S? - Daniel Kekez - 01-10-2003

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.


Re: pi sin() on HP-32S? - Vieira, Luiz C. (Brazil) - 01-10-2003

Hi;

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.

Cheers.


Re: pi sin() on HP-32S? - Mike Sebastian - 01-11-2003

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.


Thank you. - Vieira, Luiz C. (Brazil) - 01-11-2003

Hi;

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.