[SciPy-Dev] scipy.special.expi complex test failure with scipy 0.9, numpy 1.6.1dev

Christoph Gohlke cgohlke at uci.edu
Fri May 20 23:11:55 EDT 2011



On 5/20/2011 7:39 PM, Charles R Harris wrote:
>
>
> On Fri, May 20, 2011 at 6:33 PM, Pauli Virtanen <pav at iki.fi
> <mailto:pav at iki.fi>> wrote:
>
>     On Fri, 20 May 2011 17:43:54 -0600, Charles R Harris wrote:
>     [clip: expi]
>     >  Curious. I don't see this on ubuntu, it looks like a factor of 2*pi*1j
>     >  is getting added on. Looks like a corner case involving complex log or
>     >  some such.
>
>     The implementation is based on calculating E1(-z), and cancelling out
>     the i*pis with a logarithm. It's a bit of a bad form on the real axis,
>     and apparently the branch cuts are not consistently chosen with MKL.
>     I'd guess the values will be OK away from the real axis, though,
>     but some rewriting probably needs to be done.
>
>
> IIRC, the default flags for compiling with MKL on Windows changed
> between 1.5 and 1.6. I wonder if that has anything to do with this?
>
> Chuck
>
>

The ifort flags changed from '/O1 /Qip' to '/O1' 
<https://github.com/numpy/numpy/commit/9fc9db1df4df31c12c3f758bea8c6465313d9aef>. 
But this wasn't the problem.

Turns out that in between the numpy 1.5.1 and 1.6.x builds I changed the 
processor from Core2 Quad to Core i7. If I force '/QaxSSE3' instead of 
using numpy's default option '/QaxM', the test pass and expi() returns 
correct results.

Thank you and Pauli for your help!

Christoph



More information about the SciPy-Dev mailing list