[SciPy-dev] erf, erfc and ndtr on OS X

Tobias Wood twood@doc.ic.ac...
Fri May 1 12:55:15 CDT 2009


Hi,
I'm not sure whether this should go to the dev or users list, so sorry if  
it is in the wrong place. I'm using the lastest SVN Numpy/Scipy checkouts  
with Python 2.6 on Mac OS 10.5. I was trying to use the ndtr function in  
scipy.special and discovered that it returned 0.5 for all input values  
except +/-Inf. A little bit of searching pulled up the following bug  
ticket:
http://projects.scipy.org/scipy/ticket/899
which hasn't been closed yet (I can't find any mention of it on the  
mailing lists though). I'd just like to report that I did manage to get  
erf and ndtr to return correct values by forcing the compiler to use the  
floating point constant values defined between #ifdef/endif UNK in both  
ndtr.c and const.c in scipy/special/cephes. I'm not totally sure which  
branch of the #ifdefs my compiler was going down before - is there an easy  
way to check? - but the constants it was getting were clearly wrong. SQRTH  
(1 over root 2) was defined as 0 previously.
What is the likelihood of this being fixed in the SVN repository? I am  
happy to help in constructing a patch but don't understand the  
relationship between Cephes and Scipy.
Thanks,
Toby Wood



More information about the Scipy-dev mailing list