#438 rat/tellrat/modulus:2 can return -1

open
nobody
5
2006-09-09
2003-11-05
No

algebraic:true$ modulus:2$
tellrat(a^2+a)$

rat(a^2) => - a

With modulus=2, -1 is supposed to simplify to 1.

This can be fixed (bizarrely) by ev:

ev(%) => a

Discussion

  • Wolfgang Jenkner

    Logged In: YES
    user_id=581700

    On both SBCL and CLISP I get the expected result

    (C4) rat(a^2);
    (D4)/R/ a

    I'd guess this is the same GCL specific misfeature as #706562
    (mod(-2,4) => -2 not 2).

     
  • Robert Dodier

    Robert Dodier - 2006-07-13

    Logged In: YES
    user_id=501686

    Observed w/ 5.9.3cvs / gcl 2.6.7, but not 5.9.3cvs / sbcl
    0.9.9 or clisp 2.38.

     
  • Robert Dodier

    Robert Dodier - 2006-07-13
    • labels: --> 460522
     
  • Robert Dodier

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

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

Sign up for the SourceForge newsletter:





No, thanks