On 11/30/06, Daniel Lakeland <dlakelan at street-artists.org> wrote:
> (%i7) find_root(%,t,0,2);
>
> Maxima encountered a Lisp error:
>
> Error in MACSYMA-TOP-LEVEL [or a callee]: ((MEQUAL SIMP) $T
> ((MTIMES SIMP)
> ((RAT SIMP) 1 10000000)
> ((MPLUS SIMP) -330
> ((MTIMES SIMP) 297
> ((MEXPT SIMP) $%E
> ((MTIMES SIMP)
> ((RAT SIMP) 1000000
> 33)
> $T)))))) is not of type (OR
> RATIONAL
> LISP:FLOAT).
find_root evaluates it arguments in a non-standard way;
I'm pretty sure the error above is a result of that.
Try this: find_root(''%, t, 0, 2);
i.e. evaluate % explicitly via the quote-quote operator (two single
quotes, not a double quote). I get an approximate root at 1.754978e-5.
A problem which might appear at this point: the expression
causes floating point overflow for t > 0.003 or so.
That's OK for gcl because gcl doesn't trap fp overflow.
Sbcl traps fp overflow & prints an error, but you can turn it off.
Clisp traps fp overflow & prints an error, and that cannot be changed.
HTH
Robert Dodier