$numberp vs mnump
- Subject: $numberp vs mnump
- From: Wolfgang Jenkner
- Date: 16 Dec 2002 01:33:29 +0100
Dan Stanger <dan.stanger@ieee.org> writes:
> Can anyone provide a example where these 2 functions in simp.lisp would
> provide different values?
[...]
> #+cl
> (DEFMFUN MNUMP (X)
> (OR (NUMBERP X) (AND (NOT (ATOM X))(not (atom (car x)))
> (MEMQ (CAAR X) '(RAT BIGFLOAT)))))
>
> and
>
> (DEFMFUN $NUMBERP (E) (OR ($RATNUMP E) ($FLOATNUMP E) ($BFLOATP E)))
MAXIMA[2]> (mnump (/ 1 2))
T
MAXIMA[3]> ($numberp (/ 1 2))
NIL
MAXIMA[4]> (mnump #$1/2$)
(RAT BIGFLOAT)
MAXIMA[5]> ($numberp #$1/2$)
T
MAXIMA[6]>
Wolfgang
--
wjenkner@inode.at