axiom-developer
[Top][All Lists]
Advanced

[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

Changes http://wiki.axiom-developer.org/DesignIssues/diff
--
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?
\begin{axiom}
1.0*sin(x)
\end{axiom}

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.
\begin{axiom}
asin(1)::Expression Float
sqrt(%pi)::Expression Float
\end{axiom}

But in some cases the result is unexpected. For example:
\begin{axiom}
asin(1)::Pi
\end{axiom}
'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
\begin{axiom}
%pi/2
%::Expression Integer
\end{axiom}

--
forwarded from http://wiki.axiom-developer.org/address@hidden




reply via email to

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