![](https://secure.gravatar.com/avatar/72f994ca072df3a3d2c3db8a137790fd.jpg?s=120&d=mm&r=g)
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.picus@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.