On Monday, 16 January 2012 22:42:20 UTC+8, Burcin Erocal wrote: > > 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. > ok, I checked that cephes' gammal works OK on ARM, but the question is how to properly incorporate this, to prevent name clashes.
Installing cephes means building static libs and putting appropriate headers somewhere in $SAGE_ROOT/local (cephes is currently only installed on Cygwin, where it provides some missing functionality for complex number support), using parts of its code. The whole thing is most probably not needed. A clean solution would be to let the linker get the corresponding libBLAH.a, with the corr. compiled cephes functions, ahead of libm, but how does this fit in the general scheme of things? I imagine that then "Sage linker" should be aware of this, somehow... Dima > Cheers, > Burcin > > -- 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