[Top][All Lists]
[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
From: |
Vladimir Bondarenko |
Subject: |
[Axiom-developer] Re: Bug: using exp as a symbol in ** (was: System error: Cannot take first of an empty list |
Date: |
Sun, 16 Jan 2005 19:35:55 +0200 |
It is extremely helpful and instructive to see your explanation.
trigcat.spad
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> add
WS> if $ has Monoid then
WS> x ** y == exp(y * log x)
etc
The more such stuff I see, the better is my live experience,
the more efficient is bug identification progress.
Much thanks!
Vladimir
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
simplify it
WS> to the identity map, and not finding the argument.
WS> William
WS> ---
>>
>> Simpler:
>>
>> (1) -> exp^3
>>
>> 3
>> (1) exp
>> Type: Polynomial Integer
>> (2) -> a^log(x)
>>
>> 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)
>>