[Numpy-discussion] Solaris atan2 differences
Michael Droettboom
mdroe@stsci....
Wed Nov 11 15:03:30 CST 2009
There are a set of three unit test failures on Solaris all related to
differences in the atan2 implementation, reported as bugs 1201, 1202 and
1203.
They boil down to the following three differences between Solaris (C
compiler 5.3) and "other" platforms -- when I say "other" I mean at
least Linux x86 and x86_64, and Mac OS X x86.
>>> import numpy as np
>>> import numpy.core.umath as ncu
>>> ncu.arctan2(np.PZERO, np.NZERO)
0.0 (Solaris) 3.1415926535897931 (other)
>>> ncu.arctan2(np.NZERO, np.NZERO)
0.0 (Solaris) -3.1415926535897931 (other)
>>> np.signbit(ncu.arctan2(np.NZERO, np.PZERO))
False (Solaris) True (other)
The easy fix seems to be to force it to use the npy_math version of
atan2 on Solaris (as we already do for MS Windows). (Patch attached).
Indeed this fixes the unit tests. Does that seem right?
Mike
--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: solaris_atan.patch
Url: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20091111/81367780/attachment.pl
More information about the NumPy-Discussion
mailing list