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

Edit detail for #356 domain for general constants revision 1 of 1

1
Editor:
Time: 2007/11/17 22:32:22 GMT-8
Note:

changed:
-
On 24 May 2007 20:09:32 +0200 Martin Rubey replied to:
Sumant S.R. Oemrawsingh who wrote::

 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.


Submitted by : (unknown) at: 2007-11-17T22:32:22-08:00 (17 years ago)
Name :
Axiom Version :
Category : Severity : Status :
Optional subject :  
Optional comment :

On 24 May 2007 20:09:32 +0200 Martin Rubey replied to: Sumant S.R. Oemrawsingh who wrote:

 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.