The problem is the 1/8. I Python 2, this evaluates to 0, because of
integer division. I recommend using Python 3, or if you must use
Python 2, use "from __future__ import division". That will cause 1/8
to evaluate to the float 0.125.
For SymPy, it is best to use rational numbers, like Rational(1, 8).
See also
http://docs.sympy.org/latest/tutorial/gotchas.html#two-final-notes-and.
Aaron Meurer
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
sympy+un...@googlegroups.com.
> To post to this group, send email to
sy...@googlegroups.com.
> Visit this group at
https://groups.google.com/group/sympy.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/sympy/20170201153814.GA3881%40chicca.
> For more options, visit
https://groups.google.com/d/optout.