#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):
There is a loss of precision occurring in the algorithm used by eglibc to
compute gamma(); it does exp(lgamma()), but this is dangerous; running the
following on ARM
{{{
#include <stdio.h>
#include <math.h>
static long double xxx=4.78749174278204599545L;
int
main (int argc,
char* argv[])
{
long double x = 6.0;
int i;
printf("lgammal (%.20Lf)=%.20Lf\n", x, lgammal(x));
printf("hex lgammal (%.20Lf)=%llx\n", x, lgammal(x));
printf("hex xxx=%llx\n", xxx);
return 0;
}
}}}
shows this:
{{{
lgammal (6.00000000000000000000)=4.78749174278204581157
hex lgammal (6.00000000000000000000)=401326643c4479c9
hex xxx=401326643c4479c9
}}}
so both "good" (kept in xxx) and "bad" (computed by lgamma) values are
actually
the same 64-bit fp number.
This gives:
{{{
sage: exp(4.78749174278204599545) # "good" lgamma value
120.00000000000000014
sage: exp(4.78749174278204581157) # "bad" lgamma value
119.99999999999997808
}}}
explaining the "mystery" of {{{119.99999999999997}}}.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12320#comment:7>
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.