Karim BELABAS on Wed, 30 Oct 2002 22:30:22 +0100 (MET)


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

Re: gcc 3.2?


On Wed, 30 Oct 2002, Ilya Zakharevich wrote:
> Yestedar I got a couple of bug reports on Math::Pari test failures:
>
> t/sumiter.t
> # eval: sum($k,1,10, sub{2.**-$k})
> not ok 14 # in='sum($k,1,10, sub{2.**-$k})'
> #    out='0.9990234375', type='Math::Pari'
> # expect='0.9990234375000001'
>
> t/trans.t
> # eval: asinh(0.5)
> not ok 19 # in='asinh(0.5)'
> #    out='0.4812118250596035', type='Math::Pari'
> # expect='0.4812118250596034'# eval: atanh(0.5)
> not ok 21 # in='atanh(0.5)'
> #    out='0.5493061443340548', type='Math::Pari'
> # expect='0.5493061443340549'
> # eval: thetanullk(0.5,7)
> not ok 35 # in='thetanullk(0.5,7)'
> #    out='-804.6303732024337', type='Math::Pari'
> # expect='-804.6303732024338'
>
> What the people have in common is gcc 3.2.  Can you recognize this?

I've fixed incorrect roudings in the floating point kernel in 2.2.5.
Maybe you did not update your test suite ?

As far as I'm concerned, in these 3, the 'out'(put) result is correct, not the
'expect'(ed) one:
> # in='sum($k,1,10, sub{2.**-$k})'
> #    out='0.9990234375', type='Math::Pari'
> # expect='0.9990234375000001'

       (22:15) gp > sum(k=1,10,2.^-k)
       %1 = 0.999023437500000000000000000000

> # in='atanh(0.5)'
> #    out='0.5493061443340548', type='Math::Pari'
> # expect='0.5493061443340549'

       (22:15) gp > atanh(0.5)
       %2 = 0.5493061443340548456976226184

> # in='thetanullk(0.5,7)'
> #    out='-804.6303732024337', type='Math::Pari'
> # expect='-804.6303732024338'

       (22:15) gp > thetanullk(0.5,7)
       %3 = -804.6303732024336942278373058


Here, 'expect' is correct, but I can't reproduce 'out':
> # in='asinh(0.5)'
> #    out='0.4812118250596035', type='Math::Pari'
> # expect='0.4812118250596034'# eval: atanh(0.5)
       (22:15) gp > asinh(0.5)
       %4 = 0.4812118250596034474977589134

Which settings do you use in this test ? With \p16, I get 'expect', not 'out'

    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/