[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Axiom-developer] Expression problems
From: |
Bill Page |
Subject: |
RE: [Axiom-developer] Expression problems |
Date: |
Mon, 7 Nov 2005 08:50:16 -0500 |
Hans Peter,
On November 7, 2005 1:28 AM you wrote:
>
> Thank you for the quick answer. I had hoped for a different
> one. S-expressions are what I would call a parse tree, but
> I feel that I have to leave thinking in Axiom and need
> rethinking in Lisp. Anyway, I will try.
I know what you mean, but I don't think that it is necessary
to "rethink in Lisp" as such. Structures like InputForm are
certainly Axiom domains in their own right. For example you can
write:
A:=sin(2*x)::InputForm
A.2.1
to get the "*". The InputForm domain includes a large number
of operations:
)show InputForm
including one called 'interpret' that evaluates the InputForm
as an actual input.
>
> I understand if you write that inMult does exactly what it
> should, but somehow I would like to program without always
> having to have the precise documentation at hand (which in
> this case would have to be the source code, as in the
> HyperText documentation no type requirements are given, i.e.
> that "n in R").
Of course HyperDoc and the Axiom book need to be updated to
include information about these functions.
>
> Just one example to explain, why I felt there was some
> inconsistency:
>
> if isPower(x**y) returns [x**y,1] then I would expect
> isMult(x*y) to return [x*y,1] as the power expression
> seems to be viewed as (x**y)**1, so one would
> expect the second expression to be viewed as (x*y)*1.
>
I agree with you that it is a little inconsistent. What do
you think would be better: 1) for isPower(x**y) to return
"failed" or 2) for isMult(x*y) to return 1?
If we check carefully how these are used in the Axiom library
code and the Axiom test input files now, then I expect that
it would be quite easy to make these operations consistent.
Regards,
Bill Page.
- Re: [Axiom-developer] Expression problems, (continued)
- Re: [Axiom-developer] Expression problems, Francois Maltey, 2005/11/07
- Re: [Axiom-developer] Expression problems, Martin Rubey, 2005/11/13
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- [Axiom-developer] Problems compiling modified Spad file under debian, Martin Rubey, 2005/11/23
- [Axiom-developer] Re: Problems compiling modified Spad file under debian, Francois Maltey, 2005/11/23
- RE: [Axiom-developer] Re: Problems compiling modified Spad file underdebian, Bill Page, 2005/11/23
- Re: [Axiom-developer] Re: Problems compiling modified Spad file underdebian, Camm Maguire, 2005/11/23
- Re: [Axiom-developer] Re: Problems compiling modified Spad file underdebian, Francois Maltey, 2005/11/24
- Re: [Axiom-developer] Re: Problems compiling modified Spad file underdebian, Camm Maguire, 2005/11/25
- Message not available
- Re: [Axiom-developer] Re: Problems compiling modified Spad file underdebian, Camm Maguire, 2005/11/25
- Re: [Axiom-developer] Expression problems, Martin Rubey, 2005/11/13
- RE: [Axiom-developer] Expression problems,
Bill Page <=