Michael Somos on Fri, 29 Oct 1999 15:59:20 -0400 (EDT)


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

cos() bug


                    GP/PARI CALCULATOR Version 2.0.17 (beta)
                i686 running linux (ix86 kernel) 32-bit version
              (readline v2.2 enabled, extended help not available)

                           Copyright (C) 1989-1999 by
          C. Batut, K. Belabas, D. Bernardi, H. Cohen and M. Olivier.

Type ? for help, \q to quit.
Type ?12 for how to get moral (and possibly technical) support.

   realprecision = 28 significant digits
   seriesprecision = 16 significant terms
   format = g0.28

parisize = 4000000, primelimit = 500000
gp> c(x)=(exp(x*I)+exp(-x*I))/2
gp> \ps1
   seriesprecision = 1 significant terms
gp> c(I)
%1 = 1.543080634815243778477905620 + 0.E-28*I
gp> cos(I)
%2 = 1.543080634815243778477905620 + 0.E-28*I
gp> c(x+I)
%3 = (1.543080634815243778477905620 + 0.E-28*I) + O(x)
gp> cos(x+I)
%4 = (0.E-28 + 0.E-28*I) + O(x)

It seems to me that c() and cos() should give essentially the
same results. The last pair of results shows that this is false.
Perhaps this is a bug? Shalom, Michael

-- 
Michael Somos <somos@grail.cba.csuohio.edu>     Cleveland State University
http://grail.cba.csuohio.edu/~somos/            Cleveland, Ohio, USA 44115