axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Axiom-developer] pi, e, EXPR INT


From: Page, Bill
Subject: RE: [Axiom-developer] pi, e, EXPR INT
Date: Thu, 16 Dec 2004 15:44:12 -0500

Martin,

On Thursday, December 16, 2004 2:57 AM you wrote:
> 
> as you probably know, I think that the EXPR domain could
> do with a redo. However, it seems to me that this is rather
> a research topic than anything within reach right now. So
> for the moment, I'd rather fix the more apparent problems.

Agreed.

> 
> Concerning pi and e, I realised this moment, that it
> is not really a problem:
> 
> %e::EXPR FLOAT::FLOAT
> 
> works just fine...
> 

That looks weird to me. What I think what you normally
would want to do is to just specify the target type:

  address@hidden
  address@hidden

This provides an approximate floating point representation
for both e and pi.

>  > 
>  >   )show Pi
>  > 
>  > to see all of the operations defined in this domain.
>  > Notice that expressions like
>  > 
>  >   %pi+1
>  > 
>  > are also of type Pi.
> 
> I don't really understand why this should make sense.

I often have this feeling too when I look closely at the
Axiom type system. Many things strike me as strange at
first. Later I sometimes discover that there is/was some
good but poorly documented rational for the design.

This just convinces me again that Tim emphasis on
documentation documentation documentation is the right
one.

> After all, neither
> 
> asin(1)::FLOAT
> 
> asin(1)::HACKPI
> 
> work, although %pi/2 is of type HACKPI...
> 

Apparently there is no asin function in Pi. We need to
know what "they" were thinking when they they invented
the idea that pi and expressions involving pi ought to
be belong to their own domain. What was the intention
of this design?
 
What is the purpose of the domain HACKPI ?? 

There might be some relevant comments in the spad code
for PI.

To be continued ...

Cheers,
Bill Page.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]