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 alright, I think I would be able to work on this.

Is there a way to test the code from the pull request using my own tests? I 
am new to open source and I am unsure about how to do this. I am able to 
checkout the PR locally, but unsure of how to conduct my own tests using it.

Thanks.
On Friday, February 24, 2023 at 6:54:55 PM UTC-8 smi...@gmail.com wrote:

> 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 
>> <https://github.com/sympy/sympy/issues/23641>. For example, one might 
>> expect factor(sqrt(x)+x) to return sqrt(x)*(1+sqrt(x)), but it does not do 
>> anything. In this specific case, we may be able to avoid simplification 
>> issues by using radsimp. However, in the more general scenario, it would be 
>> very beneficial to be able to factor out radicals "naturally".
>>
>> One potential issue I see with this is that there are many expressions 
>> that would factor 'indefinitely' if we were able to factor using radicals. 
>> For instance, factor_rad(x+1) might return (sqrt(x)+I)*(sqrt(x)-I). 
>> However, there are many other 
>> <https://www.youtube.com/watch?v=pf5wc6E4Dxc> factorizations of this 
>> expression into different radicals.
>>  
>> The simplest fix for this would be to implement a way to specify a 
>> "irreducible degree" with default setting 1. For instance, in the above 
>> examples, we would choose 1/2.
>>
>> I would attempt to implement this right away, but I am new to both 
>> open-source and SymPy, so I need some guidance. In particular, I don't 
>> quite understand how _symbolic_factor works, and how exactly formal mode is 
>> implemented for factor.
>>
>

-- 
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/b1b0b96e-1654-48f3-ab85-10b81dcba90fn%40googlegroups.com.

Reply via email to