There is some discussion about this behavior here and in linked issues
https://github.com/sympy/sympy/issues/16378 (possibly other places as
well, it's hard to search the issue tracker for this).

Even so, it does seem reasonable to me that simplify(1.0*x) should
return x, even if 1.0*x stays as it is without simplification.

Aaron Meurer

On Mon, Jun 1, 2020 at 6:10 AM Oscar Benjamin
<[email protected]> wrote:
>
> On Mon, 1 Jun 2020 at 10:36, Garth Snyder <[email protected]> wrote:
> >
> > I believe 1.0 is a floating-point value that's distinct from 1 and presumed 
> > to be inexact. If you change the 1.0s and 2.0s to 1 and 2, they will be 
> > dropped or cancelled appropriately.
>
> There is a function nsimplify which can do this for you.
> https://docs.sympy.org/latest/modules/simplify/simplify.html#nsimplify
>
> --
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/sympy/CAHVvXxSLWndHrwOgZ-eGH%3DVq3b8-7Ug6gtUZpnuvpdG-o%3DexRA%40mail.gmail.com.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAKgW%3D6%2BBDCbTYiP31-3r-wBE95HZK14z6wA5qXuTqq3CxZg_Kw%40mail.gmail.com.

Reply via email to