[Numpy-discussion] expm

Timothy Hochberg tim.hochberg at ieee.org
Fri Jul 20 16:07:42 EDT 2007


On 7/20/07, Charles R Harris <charlesr.harris at gmail.com> wrote:

[SNIP]
>
>
> I expect using sqrt(x) will be faster than x**.5.
>

You might want to check that. I believe that x**0.5 is one of the magic
special cases that is optimized to run fast (by calling sqrt in this case).
IIRC the full set is [-1, 0, 0.5, 1, 2]. These were all of the ones that we
believed could be implemented without loosing accuracy relative to using
pow.



-- 
.  __
.   |-\
.
.  tim.hochberg at ieee.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20070720/199a50b8/attachment.html>


More information about the NumPy-Discussion mailing list