On 2013-09-26, Leo Butler <l_butler at users.sourceforge.net> wrote:
> (%i5) Cosh(x):=block(mode_declare(x,float),cosh(x))$
> (%i6) compile(Cosh)$
> ;
> ; caught STYLE-WARNING:
> ; undefined function: COSH
> I would have expected that Maxima would compile Cosh down to the CL
> cosh function, but it does not.
Well, the code emitted to translate cosh(x) above is (COSH $X).
Obviously it's assumed in the translator that COSH is a function --
either it's a function in the package :maxima or :common-lisp, from
which :maxima inherits. But there isn't such function in :maxima, and
CL::COSH seems to be hidden by a symbol of the same name in :maxima.
I can't see where that is, although in src/trigi.lisp there are Maxima
symbols which would, I guess, hide some other :cl functions such as
SECH, CSCH, and COTH.
Not sure what's the way out here. The translator could emit (CL:COSH $X)
but if there is such a function in :maxima, we'd want to call it. Maybe:
(if (fboundp (find-symbol "COSH" :maxima))
<emit MAXIMA::COSH>
<emit CL:COSH>)
??
best
Robert Dodier