#12320: install cephes on the ARM platform
-------------------------+--------------------------------------------------
   Reporter:  dimpase    |          Owner:  jason, jkantor                      
                 
       Type:  defect     |         Status:  needs_info                          
                 
   Priority:  major      |      Milestone:  sage-5.0                            
                 
  Component:  numerical  |       Keywords:  cephes, numerical noise, ARM, 
Cygwin, gammal, lgammal
Work_issues:             |       Upstream:  N/A                                 
                 
   Reviewer:             |         Author:                                      
                 
     Merged:             |   Dependencies:                                      
                 
-------------------------+--------------------------------------------------

Comment(by dimpase):

 Replying to [comment:3 Snark]:
 > I'm trying to track down the numerical glitches related to the lgammal
 libm(in glibc) implementation, as discussed on the ubuntu glibc
 [https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/713985 ticket], as
 fixing the problem upstream looks like a better option in that case.
 >
 > So far, I think I tracked down the implementation in either in
 sysdeps/ieee754/ldbl-128/e_lgammal_r.c or
 sysdeps/ieee754/ldbl-96/e_lgammal_r.c. The problem is that I don't know
 which is compiled in, as I don't even see those in any Makefile!

 no, the trouble is in sysdeps/ieee754/ldbl-64/e_lgammal_r.c
 It is actually the one that gets called. (long double is 8 bit on armel).
 You can check this as follows:
 {{{
 /* foo.c */
 #include <stdio.h>
 #include <math.h>

 int
 main (int argc, char* argv[])
 {
   long double x = 6.0;
   int i;
   printf("lgammal (%.20Lf)=%.20Lf\n", x, lgammal(x));
   printf("__lgamma (%.20Lf)=%.20Lf\n", x, __ieee754_lgamma_r(x,&i));
   printf("tgammal (%.20Lf)=%.20Lf\n", x, tgammal(x));
   printf("__gamma (%.20Lf)=%.20Lf\n", x, __ieee754_gamma_r(x,&i));
   return 0;
 }
 }}}

 Compile this with a static linking:
 {{{
 gcc foo.c /usr/lib/arm-linux/gnueabi/libm.a
 }}}

 Running it you see:
 {{{
 lgammal (6.00000000000000000000)=4.78749174278204581157
 __lgamma (6.00000000000000000000)=4.78749174278204581157
 tgammal (6.00000000000000000000)=119.99999999999997157829
 __gamma (6.00000000000000000000)=119.99999999999997157829
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12320#comment:6>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to