p: x+sqrt(2)$
p2: expand(p^2)$
p2p: p2/p$
ratsimp(p2p),algebraic => unchanged << disappointing
gcd(p2,p),algebraic => 1 << disappointing
factor(p2p),algebraic => unchanged << disappointing
divide(p2,p) => [p,0] << even with algebraic:false << GOOD!!
gfactor(p2p) => p << pleasant undocumented surprise!
Sometimes divide works but gfactor doesn't:
qa:x+sqrt(2)$
qb:x-sqrt(2)$
qab: expand(qa*qb)$
ratsimp(qab/qa),algebraic => unchanged
gcd(qab,qa),algebraic => 1
factor(qab/qa),algebraic => unchanged
divide(qab,qa) => [qb,0] << Good
gfactor(qab/qa) => unchanged << ??? Why did it work for the other example?
Since divide works, I'd have expected that gcd/algebraic and ratsimp/algebraic would also work.
Imported from SourceForge on 2024-07-02 16:26:33 Created by macrakis on 2022-12-04 17:41:16 Original: https://sourceforge.net/p/maxima/bugs/4055
Sometimes
divide
works butgfactor
doesn't:Since
divide
works, I'd have expected thatgcd/algebraic
andratsimp/algebraic
would also work.Maxima 5.45.1 SBCL 2.0.0 Windows 10