|
|
last edited 16 years ago by kratt6 |
1 2 | ||
Editor:
Time: 2007/11/17 21:59:17 GMT-8 |
||
Note: Is Axiom confused? I am. |
changed: - This fails \begin{axiom} exp(-0.02*t) % :: Expression Fraction Integer % :: Expression Float \end{axiom} But this works \begin{axiom} exp(-1*(1/50)*t) % :: Expression Float \end{axiom} Why are these expressions treated differently? How can convert the first one to the second? From unknown Tue May 10 17:54:24 -0500 2005 From: unknown Date: Tue, 10 May 2005 17:54:24 -0500 Subject: EXPR FRAC INT doesn't coerce to EXPR FLOAT Message-ID: <20050510175424-0500@page.axiom-developer.org> \begin{axiom} (1/2*x)::EXPR FRAC INT %::EXPR FLOAT \end{axiom} From BillPage Tue May 10 18:35:04 -0500 2005 From: Bill Page Date: Tue, 10 May 2005 18:35:04 -0500 Subject: Is Axiom confused? I am. Message-ID: <20050510183504-0500@page.axiom-developer.org> If \begin{axiom} exp(-0.02*t) :: Expression Fraction Integer \end{axiom} then why? \begin{axiom} exp(-1*(1/50)*t) \end{axiom} Is Axiom confused about the definition of the type Expression Integer? What exactly is it that is supposed to be an Integer in each case above?
This fails
axiomexp(-0.02*t)
(1) |
axiom% :: Expression Fraction Integer
(2) |
axiom% :: Expression Float Cannot convert from type Expression Fraction Integer to Expression Float for value 1 - -- t 50 %e
But this works
axiomexp(-1*(1/50)*t)
(3) |
axiom% :: Expression Float
(4) |
Why are these expressions treated differently?
How can convert the first one to the second?
axiom(1/2*x)::EXPR FRAC INT
(5) |
axiom%::EXPR FLOAT Cannot convert from type Expression Fraction Integer to Expression Float for value 1 - x 2
axiomexp(-0.02*t) :: Expression Fraction Integer
(6) |
then why?
axiomexp(-1*(1/50)*t)
(7) |
Is Axiom confused about the definition of the type Expression Integer? What exactly is it that is supposed to be an Integer in each case above?