axiom-mail
[Top][All Lists]
Advanced

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

Re: [Axiom-mail] comparison operators and %pi


From: Alasdair McAndrew
Subject: Re: [Axiom-mail] comparison operators and %pi
Date: Fri, 25 May 2007 14:35:30 +1000

I find the behaviour of constants rather inconsistent.  And it's odd that %e::Float doesn't work, but %e+0::Float (and any other arithmetic involving %e) does.  Also, the Euler-Mascheroni constant should be in there!

-Alasdair

On 24 May 2007 20:09:32 +0200, Martin Rubey <address@hidden> wrote:
"Sumant S.R. Oemrawsingh" <address@hidden > writes:

> I just find this very strange:
> (1) -> %e
>
>    (1)  %e
>                                                      Type: _expression_ Integer
> (2) -> %pi
>
>    (2)  %pi
>                                                                      Type: Pi
>
> Why is %e of type _expression_ Integer, while %pi is of type Pi? Is there some
> deeper reason why Pi is its own type?

For some reasons, the original developers of axiom found %pi more important
than %e.  For elements of _expression_ Integer there is no direct conversion to
Float, so they created an own domain HackPi, which contains only %pi and the
necessary conversion functions.  The didn't want to do the same thing with %e
though:

(2) -> %e::Float

   Cannot convert from type _expression_ Integer to Float for value
   %e


In my opinion, we should have a domain for "general" constants, i.e., like
_expression_ Integer but without variables, and, more generally, a domain for
expressions with a given set of variables, similar to MPOLY.  But I guess,
that's a fair bit of work.


Martin



_______________________________________________
Axiom-mail mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/axiom-mail


reply via email to

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