On Thu, Apr 1, 2010 at 8:16 PM, Charles R Harris <charlesr.harris@gmail.com> wrote:

On Thu, Apr 1, 2010 at 7:59 PM, David Cournapeau <david@silveregg.co.jp> wrote:
Anne Archibald wrote:

> First I guess we should check which systems don't have log1p

This is already done - we do use the system log1p on linux (but note
that log2_1p is not standard AFAIK). I would guess few systems outside
windows don't have log1p, given that msun has an implementation,

I see that msun uses the same series I came to. However, my rational (Pade) approximation is a lot better than their polynomial.

In fact I get better than 119 bits using the same range as sun and the ratio of two 7'th degree polynomials. I suspect it's better than that, but I only have mpmath set to that precision. Sun got 58 bits with a 14'th degree polynomial. So we can definitely improve on sun.