After more than a year, I am trying to engage with numpy about their non-compliant C99 complex math routines. FWIW, the trigger for this was that we still see failures on our micronumpy -A tests with numpy 1.8.
Matti

On 09/06/2012 10:12 AM, Armin Rigo wrote:
Hi,

On Wed, Sep 5, 2012 at 3:30 AM, Matti Picus <matti.pi...@gmail.com> wrote:
numpy.arccos(complex(0.,-0.))
(1.5707963267948966-0j)
cmath.acos(complex(0.,-0.))
(1.5707963267948966+0j)
cmath.acos(complex(float('inf'),2.3))
-infj
numpy.arccos(complex(float('inf'),2.3))
(0.78539816339744828-inf*j)
According to the C99 standard Annex G (draft,
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf), the cmath
answer is the correct one in both cases.  I don't know if that really
means that numpy didn't care about the details.  It sounds a bit
strange given that it has tests for it; I fear it rather means that
numpy implemented a different standard.  But maybe that's me being too
optimistic/pessimistic (depending on the point of view).  I would
indeed ask on numpy mailing lists or submit a bug entry and see their
reaction.


A bientôt,

Armin.

_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
https://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to