One thing you can try is to use the cse() function to group common
subexpressions so that they are only evaluated once.

Aaron Meurer

On Thu, Jul 26, 2012 at 4:43 PM, Matthew Emmett <[email protected]> wrote:
> Hi everyone,
>
> I have some sympy code that generates Fortran code, and was wondering
> if there a good way of simplifying the sympy expressions in order to
> minimize the number of floating point operations that are required to
> evaluate them numerically.  Any suggestions?
>
> Thanks,
> Matt
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sympy" group.
> To post to this group, send email to [email protected].
> 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.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected].
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