#524 mul2* doesn't handle floats/FIX

closed
nobody
None
5
2004-08-10
2004-02-25
Stavros Macrakis
No

mul2* is the two-argument non-simplifying symbolic
multiplication function (defined in opers.lisp).

I think it is incorrect that if its args are numbers, it uses
fixnum multiplication (f*) rather than general
multiplication (*), though I can't find any cases where it
matters.

All the other XXX, XXX*, XXX2 and XXX2* operations in
opers use general Lisp arithmetic, not fixnum.

Discussion

  • Logged In: YES
    user_id=588346

    (defmfun mul2* (x y)
    (cond
    #+cl ((and (numberp x) (numberp y)) (* x y))
    ;;;;;;;;;;;;; used to be (f* x y)
    ((=1 x) (simplifya y nil))
    ((=1 y) (simplifya x nil))
    (t (simplifya `((mtimes) ,x ,y) nil))))

     
    • summary: mul2 doesn't handle floats --> mul2 doesn't handle floats/FIX
     
  • Barton Willis
    Barton Willis
    2004-08-10

    Logged In: YES
    user_id=895922

    This bug has been fixed; see bug 988701 and its
    resolution. (The Maxima list has a further discussion
    of this bug.) I suggest that bug 903935 be closed.

    Barton

     
  • Raymond Toy
    Raymond Toy
    2004-08-10

    • status: open --> closed