When evalf gives such a small number, it is zero. The precision of
evalf by default is 15 digits, so 10**-140 and 0 are no different at
that precision.

You can make evalf automatically reduce such small numbers by passing
chop=True, like log(x, 2).evalf(subs={x: 1}, chop=True).

Aaron Meurer


On Sun, Nov 3, 2013 at 2:04 PM, Alexander Birukov <[email protected]> wrote:
> I dont really understand why it happens, although solve(log(x, 2)) gives 1
> as an answer. I'd use solve for sure, but unfortunetly, I have to calculate
> expression with different x.
> Any solution to fix this?
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sympy.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to