Ilya Zakharevich on Fri, 4 Oct 2002 21:06:42 -0700


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

Re: bug in pari-gp precision? (fwd)


On Sat, Oct 05, 2002 at 12:12:34AM +0200, Karim BELABAS wrote:
> On Fri, 4 Oct 2002, Ilya Zakharevich wrote:
> > On Fri, Oct 04, 2002 at 03:33:15PM +0200, Karim BELABAS wrote:
> >>  ? 1. + 10^-50 - 1.
> >>  %2 = -2.52435489 E-29
> >>
> >> What is happening here?
> >
> > Personally, I see no problem here (although I cannot guess what the
> > particular implementation is doing). You are running this with the
> > precision 28digits, right?  PARI translates its "programs" from

> I am not 100% sure yet whether addrr(), mulrr(), divrr() should go to extra
> length to ensure proper rounding [ they probably should, but the cost would
> not be negligible at low accuracies ]. On the other hand, affir() and
> affrr(), at least, ought not to discard extra significant digits. After
> fixing these last two, the above phenomenon disappears.

Thanks.  [I did not notice the wrong sign...]  Some limitations of the
floating point engine are immanent; however, if something is fixable
without slowdowns, it is a bug, and should be fixed.  ;-)

Ilya