On 16 March 2011 07:55, Robert Bradshaw <rober...@math.washington.edu> wrote:
> On Tue, Mar 15, 2011 at 12:55 PM, David Kirkby <david.kir...@onetel.net> 
> wrote:
>> On 15 March 2011 17:05, Julien PUYDT <julien.pu...@laposte.net> wrote:

>>> Well, as far as I know, the result of computing $\Gamma(n)$ for a small
>>> integral $n$ is mathematically an integer,
>>
>> It's true for any positive integer.
>>
>>> but the computer function does
>>> get to the value by a lengthy computation involving lots of floating point
>>> arithmetic... so the issue isn't that clear!
>>
>> True. I don't think there's a lot we can do
>
> We can, for example, call gsl rather than libc. Or we can special case

That might be better, but I have no reason to see why it should be.

The basic underlying problem on the platform seems to be there's no
hardware/software support for a long double which has higher precision
than a double. As such, theres no obvious reason to me why the GSL
should do any better than the current implementation.

Since the C standard does not state the precision of long double needs
to be any higher than double, then using long doubles is not the best
approach if we want high accuracy on multiple platforms.

The relative error on ARM is not unreasonable given the number of bits
the floating point code has to work with.

> this processor and/or set of values.
>
> Whatever process is used to compute the value, the fact is that the
> result has *no* rounding error on all other platforms.

> This platform
> produces inferior results, and I'd call it a bug. Let's fix/work
> around it, not mask it.
>
> - Robert

Taking a few steps back, we could ask

Q1 - What new function do we need in Sage?
A1 - gamma(z)

Q2 - What precision do we need to compute gamma(z) with?
A2 = ?

One answer to "2" might be that to be a viable alternative to the 4
M's, we need to be able to do it as well as them, which means being
able to do it to arbitrary precision. In which case, perhaps we should
call mpfr_gamma().

Dave

-- 
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