diff error xmaxima 5.9.3 and 5.10.0 windows
- Subject: diff error xmaxima 5.9.3 and 5.10.0 windows
- From: Stavros Macrakis
- Date: Tue, 31 Oct 2006 16:49:41 -0500
On 10/31/06, garate at cicese.mx <garate at cicese.mx> wrote:
> > (%i2) diff(f,x[2](t),1);
> > ERROR: The argument to verbify must be a symbolic name:
Thanks for the bug report.
The problem is in maxima-integerp:
featurep(x[1](2),integer) => same error
Here is corrected code, with some additional changes....
(setf (get '%binomial 'maps-integers-to-integers) t)
(defun maxima-integerp (x)
(cond ((integerp x))
((mnump x) nil)
((and (symbolp x) (or (kindp x '$integer) (kindp x '$even) (kindp x '$odd))))
(t (let ((x-op (and (consp x) (consp (car x)) (caar x)))
($prederror nil))
(cond ((null x-op) nil)
((not (symbolp x-op)) nil) ; fix for mqapply at some point?
((eq x-op 'mrat) (and (integerp (cadr x)) (equal (cddr x) 1)))
;; mtimes and mplus are generally handled by this clause
((and (get x-op 'maps-integers-to-integers) (every
#'maxima-integerp (margs x))))
;; Special case for 1/2*...*even
((eq x-op 'mtimes)
(and (mnump (cadr x))
(integerp (mul 2 (cadr x)))
(every 'maxima-integerp (cddr x))
(some #'(lambda (s) ($featurep s '$even)) (rest (margs x)))))
((eq x-op 'mexpt)
(and (every #'maxima-integerp (margs x))
(null (mevalp (mlsp (caddr x) 0)))))
;; ! in Maxima allows real arguments
((eq x-op 'mfactorial)
(and (maxima-integerp (cadr x))
(not (mevalp (mlsp (cadr x) 0)))))
((eq x-op '%gamma)
(and (maxima-integerp (cadr x))
(not (mevalp (mlsp (cadr x) 1)))))
;; other x-ops
((or ($featurep ($verbify x-op) '$integervalued)
(get x-op 'integer-valued))) )))))