#450 scsimp(x,x) / FIX

closed
nobody
None
5
2006-02-24
2003-11-20
Barton Willis
No

Consider

(C1) scsimp(x+1,x-5=0);
(D1) 6

Given no rhs, Maxima defaults it to 0

(C2) scsimp(x+1,x-5);
(D2) 6

The default doesn't work with an atom; this is okay

(C3) scsimp(x+1,x=0);
(D3) 1

but why an error for this case?

(C4) scsimp(x+1,x);

Error: |$x| is not of type LIST.
Fast links are on: do (si::use-fast-links nil) for debugging
Error signalled by MACSYMA-TOP-LEVEL.
Broken at MACSYMA-TOP-LEVEL. Type :H for Help.
MAXIMA>>

Here is a possible fix

(DEFMFUN $SCSIMP N
(DO ((I N (f1- I)) (ZRS)) ((= 1 I) (SCS (ARG 1) ZRS))
(setq zrs (cons (meqhk (arg i)) zrs))))

With this definition for scsimp,

(C7) scsimp(x+1,x);
(D7) 1
(C8)

Barton

Discussion

  • Barton Willis
    Barton Willis
    2006-02-24

    Logged In: YES
    user_id=895922

    The reported bug is not present in the current cvs version of
    Maxima.

    Thank you for your report. If you see this bug in a later version
    of Maxima, please submit a new bug report.

     
  • Barton Willis
    Barton Willis
    2006-02-24

    • status: open --> closed