# HP Forums

You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Please calculate on an actual Prime Calc, the SINE in Radians of exactly 3.141592654 Radians and say he exact result...thanks
Hello Zeno333,
my Prime tells me, that
sin(3.141592654)= -4.10206761537E-10
or (using the a b/c key)
sin(3.141592654)= \frac{-1}{2379780841}

Thomas
(03-17-2015 04:19 PM)ThomasA Wrote: [ -> ]Hello Zeno333,
my Prime tells me, that
sin(3.141592654)= -4.10206761537E-10
or (using the a b/c key)
sin(3.141592654)= \frac{-1}{2379780841}

Thomas

Thanks!
You first need to convert the radian angle 3.14.... to decimal degrees by multiplying it times (180/pi) or 57.29.... then hit the sine function.
ANS=0 of course.
Do you think there is a problem with your Prime? Your question appears straightforward, but the answer will depend on settings other than the use of radians mode.

What are you trying to confirm?
(03-17-2015 04:26 PM)zeno333 Wrote: [ -> ]
(03-17-2015 04:19 PM)ThomasA Wrote: [ -> ]Hello Zeno333,
my Prime tells me, that
sin(3.141592654)= -4.10206761537E-10
or (using the a b/c key)
sin(3.141592654)= \frac{-1}{2379780841}

Thomas

Thanks!

On the emulator version 6975. the answer is a little less precise in CAS mode, -4.10199751603E-10
Yes, it is not using BCD and the hp algorithms. There are quite a few small differences similar to that in the CAS approximate evaluation.
Hello,

Whether you do it in CAS or home, you will NOT get 0. The obvious reason is that SIN(PI)=0 by formal definition, but 3.14159.... is NOT PI, but an approximate value and the calculator returns to you the best approximation that it can find of the value of SIN(Value close to PI).

Home does calculations in BCD (Decimal), CAS uses Doubles (actually, low precision Double, Double with 8 bit of precision gone for some internal reasons).

The algorithms are different because they use different representations of the numbers.
in BCD, what you see is what you get. 3.14159265359 is slightly bigger than the real PI, thus returning a small negative number.
In Binary, the number that you see is NOT the real number in the system as binary numbers are represented as a sigma(Digitn*1/2^n) where Digitn can be a 0 or a 1. In the case of Prime, 45 bits.
1/2^45 needs >40 digits to be represented correctly in decimal. Obviously, the CAS screen does not display 40 digits numbers. So what you see on the screen is only an approximation of the real internal number. In our case, from looking at the result of sin(aprox(pi)), you can see that this number must be smaller than the real PI as the result is >0.
Note that the calculator uses a different CPU than a PC. The PC has a floating point coprocessor for doing such things in hardware while the calculator uses a SW algorithm to do the calculations. The net result, sin(aprox(pi)) in CAS returns a different result on the PC than on the calculator!

This is NOT a bug, this is as expected when using floating points numbers 'to their limits' on various different systems.

Cyrille,
Enjoy 'real' math!
Reference URL's
• HP Forums: https://www.hpmuseum.org/forum/index.php
• :