[sympy] Re: factoring square roots

2023-02-26 Thread emanuel.c...@gmail.com
Dear list Le samedi 25 février 2023 à 08:43:57 UTC+1, atharv@gmail.com a écrit : I did notice another bug, which is that factor doesn't recognize float exponents (or rather, there are generally several issues with float exponents). (Python) floats are numerical approximations. Float expo

[sympy] Re: factoring square roots

2023-02-24 Thread Atharv Sampath
I did notice another bug, which is that factor doesn't recognize float exponents (or rather, there are generally several issues with float exponents). For example, factor(x**3.0 + x) doesn't get factored. Am I correct in assuming that this will not get fixed by switching generators? If it is al

[sympy] Re: factoring square roots

2023-02-24 Thread Chris Smith
cf https://github.com/sympy/sympy/pull/23936 On Friday, February 24, 2023 at 3:58:37 AM UTC-6 atharv@gmail.com wrote: > Lack of ability to factor out square roots seems to be a particular cause > for simplification issues like #23641 > . For exam

[sympy] Re: factoring square roots

2023-02-24 Thread Chris Smith
This sort of problem can be solved by identifying the generator with the smallest power. In this case `g = x**1/2` so `sqrt(x) + x -> y + y**2` which factors as `y*(1 + y) -> sqrt(x)*(1 + sqrt(x))`. /c On Friday, February 24, 2023 at 3:58:37 AM UTC-6 atharv@gmail.com wrote: > Lack of abili