> it does seem reasonable to me that simplify(1.0*x) Isn't this what `nsimplfy` (especially with rational=True) is for?
On Monday, June 1, 2020 at 6:19:46 PM UTC-5, Aaron Meurer wrote: > > 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 > <oscar.j...@gmail.com <javascript:>> wrote: > > > > On Mon, 1 Jun 2020 at 10:36, Garth Snyder <ga...@garthsnyder.com > <javascript:>> 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 sy...@googlegroups.com <javascript:>. > > 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 sympy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/988cf8ef-bcf1-416c-80cf-1bcd556481e8%40googlegroups.com.