SourceForge has been redesigned. Learn more.
Close

#990 ratsubst and sets, floor, ceiling, min, max

closed
Lisp Core (471)
5
2007-02-11
2006-09-25
No

The function simp-set skips the simplification
when the simp flag is true. This causes problems with
ratsubst:

(%i1) ratsubst(a,b,set(a,b));
(%o1) {a,a}

The same is true for min, max, floor, and ceiling:

(%i2) ratsubst(a,b,min(a,b));
(%o2) min(a,a)
(%i3) ratsubst(a,b,max(a,b));
(%o3) max(a,a)
(%i4) ratsubst(a,b,floor(a-b));
(%o4) -ceiling(0)

I (now) believe that regardless of the simp flag, a
simplifying function should do the simplification. It's
up to the function simplifya to decide if the
simplification is needed.

Discussion

  • Stavros Macrakis

    Logged In: YES
    user_id=588346

    Simplification functions should never check the simp flag.
    See also bug 1569644.

     
  • Barton Willis

    Barton Willis - 2007-02-11

    Logged In: YES
    user_id=895922
    Originator: YES

    Fixed in 5.11.0 (src/nummod.lisp CVS r 1.5 and src/nset CVS r 1.14)

     
  • Barton Willis

    Barton Willis - 2007-02-11
    • status: open --> closed
     

Log in to post a comment.