[SciPy-user] scipy.special.erf randomly returns NANs on OSX

Robert Kern robert.kern at gmail.com
Mon Jan 23 12:31:23 EST 2006


Evan Monroig wrote:
> On Jan.23 09h20, Andrea Riciputi wrote :
> 
>>Even the code proposed by Robert Kern (when translated in C) works  
>>correctly:
>>
>>>Totila:~/Documents/Dottorato/Codice/prova andrea$ ./erf2
>>>erf(1.900000) = 9.927904e-01
> 
> Did you really try the *almost 1.0 but not 1.0* number ? It should be 
> something like the following:
> 
> double x = 0.0;
> for (int i = 0; i < 10; ++i) {
>     x += 0.1;
> }
> result = erf(x);
> ...

I tried that and could *not* reproduce the bug with Apple's erf(). I will try
with Cephes' later.

-- 
Robert Kern
robert.kern at gmail.com

"In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die."
  -- Richard Harter




More information about the SciPy-User mailing list