On 1 Apr., 23:46, Mike Hansen <[EMAIL PROTECTED]> wrote:
> Cool.  Does your _compile work with functions where there is no C math
> equivalent?  How long does it take to compile a function?
>
> --Mike

Currently it uses only 'math.h' on which the Python module 'math' is
based. Afaik fast_float does the same. Exotic functions could be
supported by either implementing them in Cython or by adding a nice C
math library as a dependency. Is there anything you would wish for?

Depending on the function it takes 0.3 s (sqrt(x**2+y**2)) up to 1 s
(used benchmark function) on my 2.8 GHz CPU. It's probably mainly
SymPy's fault (I use lambdastr and evalf (to avoid 1/2=0)), so it can
be optimized. But actually I should not blame SymPy without any
benchmark :). Hand-written C would probably compile faster, but I
think 1 s is fine.

> Cool, let's put it in then. :)

_compile currently accepts only SympPy expressions which it converts
to lambda strings. So it could also accept lambda strings directly. It
works exactly like lambdify, it could be merged with it using a flag
like compile=True.

Vinzent
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to