[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Mon, 03 Oct 2005 01:13:52 -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?
Type 'Expression Integer' refers to any expression involving
functions (or operators) and integers. If you don't tell Axiom otherwise, then
"thinks" of 'sin(x)' as 'sin(1*x)' i.e. an 'Expression' involving the function
'sin()', a polynomial function 'x' with coefficient '1'. For example, what
would you expect the
result of the expression 'sin(1.0*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
The type of the result of some calculation in Axiom is often
expressed as an object of the same type as the operands that
-result is still and 'Expression Integer' even though Axiom decides
result is still an 'Expression Integer' even though Axiom decides
-In princple in should be possible to ask Axiom to represent the
In princple it should be possible to ask Axiom to represent the
Comments from wyscc:
This is a quite common problem whenever a result can be expressed in a
subdomain. In this case, the subdomain is 'Pi'. The correct way to perform
conversion of types in this situation is to 'retract', not 'coerce' since
'coerce' is supposedly always possible, whereas 'retract' is not. The
Interpreter will use 'retract' if it is available even when '::' is used.
However, 'Expression Integer' does not have 'RetractableTo(Pi)' (we can add
this if we like). An example where this works is:
4/3 * 6/2
(4/3 * 6/2)::Integer
retract(4/3 * 6/2)@Integer
whereas this fails.
forwarded from http://page.axiom-developer.org/zope/mathaction/address@hidden
|[Prev in Thread]
||[Next in Thread]|
- [Axiom-developer] [DesignIssues],