Robert Kern wrote:
> Christopher Barker wrote:
>   
>> I wonder if there are any C math libs that do a better job than you'd 
>> expect from standard FP? (short of unlimited precision ones)
>>     
>
> With respect to π and the zeros of sin() and cos()? Not really. If
> numpy.sin(numpy.pi) were to give you 0.0, it would be *wrong*. numpy.sin() is
> supposed to give you the most accurate result representable in 
> double-precision
> for the input you gave it. numpy.pi is not π.
>
>   
True, but since the string literal "numpy.pi" is not the same as the 
string literal "3.1415926535897931" there's no reason in principle why 
"numpy.py" couldn't symbolically represent the exact value; of course, 
since numpy does not otherwise support symbolic computation, such an 
adoption would be frivolous and rather silly (but then the Pythons were 
never afraid of being silly). :-)


DG
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to