Menu

#4765 gfactor not idempotent

None
open
nobody
2
2026-06-12
2026-06-10
No
gfactor((%i+1)^(-1/2)) =>
   ((1-%i)*sqrt(%i+1))/2
gfactor(%) =>
   -(((%i-1)*sqrt(%i+1))/2)
gfactor(%) =>
   -(((%i-1)*sqrt(%i+1))/2)   <<< stable

This is arguably outside the domain of gfactor, so this is a very low priority bug.
I hope priority=2 means that it is extra-low priority, not extra-high priority!

Discussion

  • David Scherfgen

    David Scherfgen - 2026-06-12
    • labels: gfactor --> gfactor, factor
     
  • David Scherfgen

    David Scherfgen - 2026-06-12

    It is actually the regular factor that's not idempotent here:

    (%i1) factor(1/(sqrt(a+1)), 1+a^2);
    (%o1) ((1-a)*sqrt(a+1))/2
    
    (%i2) factor(%, 1+a^2);
    (%o2) -(((a-1)*sqrt(a+1))/2)
    
    (%i3) factor(%, 1+a^2);
    (%o3) -(((a-1)*sqrt(a+1))/2)
    
     
    • Stavros Macrakis

      Well, yes, gfactor is just a short form

      gfactor(ex) == factor(ex, 1+a^2)
      
       

Log in to post a comment.

Auth0 Logo