#692 rat(floatrat) doesn't re-gcd

open
nobody
5
2006-09-09
2005-02-22
No

When you re-rationalize a float-rational (keepfloat),
it doesn't perform the necessary GCD:

(%i1) rat(x^2-1.0)/rat(x-1.0),keepfloat:true;

(%o1) (1.0*x^2-1.0)/(1.0*x-1.0)

(%i2) rat(%o1);

RAT replaced 1.0 by 1//1 = 1.0
RAT replaced -1.0 by -1//1 = -1.0
RAT replaced 1.0 by 1//1 = 1.0
RAT replaced -1.0 by -1//1 = -1.0

(%o2) (x^2-1)/(x-1) <<<<<<<<<!!!!!!!!
(%i3) %+1;
(%o3) (x^2+x-2)/(x-1)

Discussion

  • Robert Dodier

    Robert Dodier - 2006-08-11
    • labels: --> 460522
     
  • Robert Dodier

    Robert Dodier - 2006-08-11

    Logged In: YES
    user_id=501686

    Observed in 5.9.3cvs.

     
  • Robert Dodier

    Robert Dodier - 2006-09-09
    • labels: 460522 --> Lisp Core - Polynomials
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks