[Top][All Lists]

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

[Axiom-developer] [DesignIssues] Re: Expression Integer type

From: Bill Page
Subject: [Axiom-developer] [DesignIssues] Re: Expression Integer type
Date: Sun, 02 Oct 2005 21:36:47 -0500

Type 'Expression Integer' refers to any expression with 'coefficients'
that are integers. If you don't tell Axiom otherwise, then Axiom
"thinks" of 'sin(x)' as '1*sin(x)' i.e. and 'Expression' with the
'Integer' coefficient 1. For example, what would you expect the
result of the expression '1.0*sin(x)' to be?

The type of the result of some calculation in Axiom is always
expressed as an object with of the same type as operation that
created it. So in your example 'asin(1)' is an 'Expression Integer'
for the same reason as sin(x) is an 'Expression Integer' and the
result is still and 'Expression Integer' even though Axiom decides
to display the value of 'asin(1)' in a more convenient form.
Ditto 'sqrt(%pi)'.

In princple in should be possible to ask Axiom to represent the
result of a calculation in a different form. E.g.
asin(1)::Expression Float
sqrt(%pi)::Expression Float

But in some cases the result is unexpected. For example:
'Pi' is a type for certain constant-valued expressions in $\pi$.
However in this case it seems that the domain Expression Integer
is not sufficiently complete to perform this conversion, though
it works in the other direction
%::Expression Integer

forwarded from

reply via email to

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