Karim Belabas on Mon, 27 Nov 2006 11:29:47 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: [BUG?] log(2) flip/flopping |
* Bill Allombert [2006-10-26 20:55]: > On Wed, Oct 25, 2006 at 05:46:29PM -0700, Ilya Zakharevich wrote: >> I discovered this by trying to investigate mysterious failures of >> test suite of Math::Pari: >> >> ? log(2) >> %1 = 0.6931471805599453094172321215 >> ? \p 38 >> realprecision = 38 significant digits >> ? log(2) >> %2 = 0.69314718055994530941723212145817656808 >> ? \p 58 >> realprecision = 67 significant digits (58 digits displayed) >> ? log(2) >> %3 = 0.6931471805599453094172321214581765680755001343602552541207 >> ? \p 38 >> realprecision = 38 significant digits >> ? log(2) >> %4 = 0.69314718055994530941723212145817656807 >> >> Is this change between ...08 and ...07 as expected? >> >> The code is in constlog2()... > > This bug is known and recorded as bug #498. > > The correct fix is to provide a version of constlog2 (and constpi and > consteuler) which performs exact rounding. > > I suppose we could easily improve constlog2() so that the rounding is more > frequently correct. The bug is now fixed in CVS. Cheers, K.B. -- Karim Belabas Tel: (+33) (0)5 40 00 26 17 Universite Bordeaux 1 Fax: (+33) (0)5 40 00 69 50 351, cours de la Liberation http://www.math.u-bordeaux.fr/~belabas/ F-33405 Talence (France) http://pari.math.u-bordeaux.fr/ [PARI/GP]