On Monday, 16 January 2012 22:48:01 UTC+8, Snark wrote:
>
> Le 16/01/2012 15:42, Burcin Erocal a �crit :
> > On Mon, 16 Jan 2012 04:21:37 -0800 (PST)
> > Dima Pasechnik<dim...@gmail.com>  wrote:
> >
> >> Once again, let me bring up the numerical noise issue on ARM.
> >> The problem is that while we pretty much narrowed it down to a
> >> particular function computing the log of the gamma-function,
> >> lgammal, in elibc, an implementation of libc used on Ubuntu 11.10 (on
> >> ARM, at least), the chances that the upstream fixes it seem to be
> >> rarher slim. Fixing it myself does not look trivial � this C code is
> >> not at all pretty, uses a lot of hardwired largish
> >> constants, etc etc (and we cannot just patch a system library easily
> >> anyway, so it needs to get into the upstream, etc etc...)
> >>
> >> I can produce doctest patches that will to the appropriate rounding,
> >> but this potentially would make the corresponding doctests less
> >> reliable (we talking about things like 120.0 vs 199.99999997 for
> >> gamma(float(6)), something like this).
> >>
> >> As far as I know, doctests cannot be OS-dependent.
> >> Any way out of this Catch-22?
> >
> > I guess this is the same problem as #9162.
> >
> > We should call a more reliable lgamma() function on these platforms.
> > IIRC, the cephes package was included in Sage for this purpose. We
> > could call the lgam() from cephes in sage/symbolic/pynac_cc.h to fix
> > this.
>
> Is the answer really bad or is it just that it doesn't print the same on 
> all platforms?
>
there is a loss of precision on ARM and Cygwin, compared to the rest of 
platforms.
(and the precision is worse than advertised by the lgammal implementation, 
IMHO)
So weakening the test does not seem to the the right thing to do.
 
Dima

 

> I mean if that float type has just that many significant digits, the 
> problem may not be with the computation -- but more with the test which 
> insists on a pure equality where that doesn't make sense.
>
> Snark on #sagemath
>
>

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to