login  home  contents  what's new  discussion  bug reports help  links  subscribe  changes  refresh  edit

 Submitted by : (unknown) at: 2007-11-17T22:13:48-08:00 (12 years ago) Name : Axiom Version : default friCAS-20090114 Axiom-20050901 OpenAxiom-20091012 OpenAxiom-20110220 OpenAxiom-Release-141 Category : Axiom Aldor Interface Axiom Compiler Axiom Library Axiom Interpreter Axiom Documentation Axiom User Interface building Axiom from source lisp system MathAction Doyen CD Reduce Axiom on Windows Axiom on Linux Severity : critical serious normal minor wishlist Status : open closed rejected not reproducible fix proposed fixed somewhere duplicate need more info Optional subject :   Optional comment :

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!

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)
>>

------------------------------------------------------------

prior post information --Mon, 17 Jan 2005 22:40:21 -0600

On the other hand, even though as Vladimir Bondareko reported:

> integrate(log^log(z), z)
>
>    >> System error:
>    Cannot take first of an empty list

(14) -> log^(log(z))

Function Selection for log
Arguments: VARIABLE z
-> no appropriate log found in Variable z
-> no appropriate log found in Symbol
-> no appropriate log found in Variable z
-> no appropriate log found in Symbol

Modemaps from Associated Packages
no modemaps

Remaining General Modemaps
 FortranExpression(D1,D2,D3) -> FortranExpression(D1,D2,D3)
from FortranExpression(D1,D2,D3)
if D1: LIST SYMBOL and D2: LIST SYMBOL and D3 has FMTC
 D -> D from D if D has ELEMFUN

  signature:   EXPR INT -> EXPR INT
implemented: slot $$from EXPR INT Function Selection for ^ Arguments: (VARIABLE log,EXPR INT)  signature: (EXPR INT,EXPR INT) -> EXPR INT implemented: slot$$$from EXPR INT log(z) (14) log Type: Expression Integer (17) -> log^exp(x) Function Selection for exp Arguments: VARIABLE x  signature: EXPR INT -> EXPR INT implemented: slot $$from EXPR INT Function Selection for ^ Arguments: (VARIABLE log,EXPR INT)  signature: (EXPR INT,EXPR INT) -> EXPR INT implemented: slot$$$ from EXPR INT

x
%e
(17)  log
Type: Expression Integer

-----------------------------------------------------------------------
Note that both works, and note that when looking for the function ^, the
interpreter recognized VARIABLE log.
-----------------------------------------------------------------------
(17) -> exp^log(x)

Function Selection for log
Arguments: VARIABLE x

  signature:   EXPR INT -> EXPR INT
implemented: slot $$from EXPR INT Function Selection for ^ Arguments: (SYMBOL,EXPR INT)  signature: (EXPR INT,EXPR INT) -> EXPR INT implemented: slot$$$from EXPR INT >> System error: Cannot take first of an empty list protected-symbol-warn called with (NIL) ----------------------------------------------------------------------- Note that that when looking for the function ^, the interpreter recognized exp as a SYMBOL, not a VARIABLE as in the case of log. ----------------------------------------------------------------------- (18) log Type: Variable log (19) -> exp (19) exp Type: Symbol ----------------------------------------------------------------------- On the other hand, "correcting" the difference does not help ----------------------------------------------------------------------- (3) -> exp:=exp::Variable(exp) (3) exp Type: Variable exp (4) -> exp^log(x) Function Selection for log Arguments: VARIABLE x  signature: EXPR INT -> EXPR INT implemented: slot $$from EXPR INT Function Selection for ^ Arguments: (VARIABLE exp,EXPR INT)  signature: (EXPR INT,EXPR INT) -> EXPR INT implemented: slot$$$ from EXPR INT

>> System error:
Cannot take first of an empty list

protected-symbol-warn called with (NIL)
(4) -> exp

(4)  exp
Type: Variable exp

(5) )clear all

(1) -> exp(log(x)*log(exp))

log(exp)log(x)
(1)  %e
Type: Expression Integer

The implementation x**y = exp(y*log(x)) seems not to be the problem.  Clearly
this points to an interpreter bug due to different treatment for log and exp
that runs deep. The error messages originates from lisp, so it may be an error
in LISP (such as a missing quote).

Whether the original

integrate(log^log(z),z)

is related to this is not clear.

Bug already existed in NAG version. So may be one of the known ones.

property change --Mon, 17 Jan 2005 22:40:32 -0600

Status: closed => open

... --kratt6, Fri, 28 Dec 2007 14:31:14 -0800

Category: Axiom Mathematics => Axiom Library

fixed in FriCAS revision 393 --kratt6, Sat, 27 Sep 2008 00:08:20 -0700

Status: open => fixed somewhere

Fixed in OpenAxiom --gdr, Mon, 13 Oct 2008 19:43:26 -0700

From Fricas --alfredo, Thu, 16 Oct 2008 13:26:18 -0700

http://fricas.svn.sourceforge.net/viewvc/fricas?view=rev&revision=393

... --alfredo, Thu, 16 Oct 2008 13:26:57 -0700

Status: fixed somewhere => fix proposed



 Subject:   Be Bold !! ( 15 subscribers )