Unexpected truncation to integer when using evalf()

25 views
Skip to first unread message

Jeremie Knuesel

unread,
Sep 27, 2017, 2:26:29 PM9/27/17
to sympy
Hi,

In the following example, the value returned is e^1 instead of e^1.9:
Sum(1.9**k/factorial(k), (k, 0, oo)).evalf()

Is this a bug or am I doing something wrong?

Note that I get the expected value when doing
Sum(x**k/factorial(k), (k, 0, oo)).doit().subs(x,1.9)

Best regards,

Jeremie Knuesel

Aaron Meurer

unread,
Sep 27, 2017, 3:33:04 PM9/27/17
to sy...@googlegroups.com
That's definitely a bug. Can you open an issue for it?

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/d4605d00-2075-43d2-85c7-311c1aeb57d8%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Jeremie Knuesel

unread,
Sep 28, 2017, 10:22:28 AM9/28/17
to sympy
Done, thanks.

Ondřej Čertík

unread,
Sep 28, 2017, 12:06:55 PM9/28/17
to sy...@googlegroups.com


On Thu, Sep 28, 2017, at 08:22 AM, Jeremie Knuesel wrote:
> Done, thanks.

Here is the issue for reference:

https://github.com/sympy/sympy/issues/13365

Ondrej
Reply all
Reply to author
Forward
0 new messages