Dear all
Few questions:
1) exectuting that
> x = symbols('x')
> z=1.0*x**(-1.0)
> print fcode(simplify(z))
gives
> 1.0d0*x**-1.0d0
which is not fortran standard.. I would expect 1.0d0/x or x**(-1) or
in the worst case x**(-1.0d0). How can I get a better output?
2) executing that
> x = symbols('x')
> z=x**2
> print fcode(simplify(diff(z)))
gives
> 2*x
I would like to get 2.0d0*x instead, any hints?
3) executing
> x = symbols('x')
> z=1.0*x**(1.0/3.0)
> print fcode(simplify(z))
gives
> 1.0d0*x**0.333333333333333d0
but I would like to keep the exponent as a fraction (ie
x**(1.0d0/3.0d0))
Thanks
V
--
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.