Is there a Maxima predicate (user-level or not) that returns true if
the argument is a constant, but not a declared constant? I want
declare(x,constantp), myconstantp(x) --> false
myconstantp(sqrt(42 + %pi) - cos(2008)) --> true
The functions $constantp, constant, and maxima-constantp check
for declared constants, I think. This function is easy to write;
something similar to
(defun number-constant-p (e)
(or
(bigfloatp e)
(mnump e)
(memq e '($%pi $%e $%phi $%i))
(and (not ($mapatom e)) (every #'number-constant-p (margs e)))))
should mostly work, but it doesn't know about dummy variables; and ...
Barton