[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] Re: Bug: using exp as a symbol in ** (was: System erro
[Axiom-developer] Re: Bug: using exp as a symbol in ** (was: System error: Cannot take first of an empty list
Sun, 16 Jan 2005 19:35:55 +0200
It is extremely helpful and instructive to see your explanation.
WS> ElementaryFunctionCategory(): Category == with
WS> log : $ -> $ ++ log(x) returns the natural logarithm of x.
WS> exp : $ -> $ ++ exp(x) returns %e to the power x.
WS> "**": ($, $) -> $ ++ x**y returns x to the power y.
WS> if $ has Monoid then
WS> x ** y == exp(y * log x)
The more such stuff I see, the better is my live experience,
the more efficient is bug identification progress.
Sunday, January 16, 2005, 7:08:49 PM, you write:
WS> The error apparently comes from EXPR where the implementation is
WS> x**y == exp(y * log(x))
WS> so exp^log(x) is computed as
WS> exp(log(x) * log(exp))
WS> which should be ok, but then the system handles log exp and tries to
WS> to the identity map, and not finding the argument.
>> (1) -> exp^3
>> (1) exp
>> Type: Polynomial Integer
>> (2) -> a^log(x)
>> (2) a
>> Type: Expression Integer
>> (3) -> exp^log(x)
>> >> System error:
>> Cannot take first of an empty list
>> protected-symbol-warn called with (NIL)