Walter Neumann on Thu, 30 Jun 2005 19:34:05 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Sin(x)


For gp "Pi" is a real number approximation to pi, not exactly pi. With default precision it is within 10^-28 of pi.

And in fact cos(Pi) is not, as you say, "-1 as it should be" but rather a real number close to -1:

? cos(Pi)
%1 = -1.000000000000000000000000000
? cos(Pi)+1
%2 = 1.2744735289059618216 E-57
?

--walter neumann

On Thu, 30 Jun 2005, Sascha Rissel wrote:

Hello,

I have a qustion about the sin(x)-function.

Why is cos(Pi) = -1 as it should be, but sin(Pi) = -5.04870979 E-29 and not exactly 0?
Other values of sin(x) are also a bit "out of place"...

Regards,

Sascha Rissel.