Karim BELABAS on Fri, 4 Oct 2002 22:11:56 +0200 (MEST) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: bug in pari-gp precision? (fwd) |
On Fri, 4 Oct 2002, Karim BELABAS wrote: > ? 1. + 10^-50 - 1. > %2 = -2.52435489 E-29 > > What is happening here? Short diagnostic: here's the computation chain 1. + 10^-50 = (a + 1) / 10^50 \\ with a = 1. * 10^50 = a / 10^50 \\ + 1 neglected, not significant at \p28 Culprit: a = 1. * 10^50 is computed "incorrectly", so that (a / 10^50) < 1 (15:44) gp > \p38 realprecision = 38 significant digits (15:44) gp > 1.*10^50; (15:44) gp > \x [...] a5880a69 fb6ac800 (15:42) gp > \p28 realprecision = 28 significant digits (15:43) gp > 1.*10^50; (15:43) gp > \x [...] a5880a69 ^^ should be 6a (1 bit off). Karim. -- Karim Belabas Tel: (+33) (0)1 69 15 57 48 Dép. de Mathematiques, Bat. 425 Fax: (+33) (0)1 69 15 60 19 Université Paris-Sud Email: Karim.Belabas@math.u-psud.fr F-91405 Orsay (France) http://www.math.u-psud.fr/~belabas/ -- PARI/GP Home Page: http://www.parigp-home.de/