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

Edit detail for #155 failed coercion between Expression Fraction Integer and Expression Float in exponents revision 1 of 2

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?

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

This fails

axiom
exp(-0.02*t)
LatexWiki Image(1)
Type: Expression Float
axiom
% :: Expression Fraction Integer
LatexWiki Image(2)
Type: Expression Fraction Integer
axiom
% :: Expression Float Cannot convert from type Expression Fraction Integer to Expression Float for value 1 - -- t 50 %e

But this works

axiom
exp(-1*(1/50)*t)
LatexWiki Image(3)
Type: Expression Integer
axiom
% :: Expression Float
LatexWiki Image(4)
Type: Expression Float

Why are these expressions treated differently?

How can convert the first one to the second?

EXPR FRAC INT doesn't coerce to EXPR FLOAT --unknown, Tue, 10 May 2005 17:54:24 -0500 reply
axiom
(1/2*x)::EXPR FRAC INT
LatexWiki Image(5)
Type: Expression Fraction Integer
axiom
%::EXPR FLOAT Cannot convert from type Expression Fraction Integer to Expression Float for value 1 - x 2

Is Axiom confused? I am. --Bill Page, Tue, 10 May 2005 18:35:04 -0500 reply
If
axiom
exp(-0.02*t) :: Expression Fraction Integer
LatexWiki Image(6)
Type: Expression Fraction Integer

then why?

axiom
exp(-1*(1/50)*t)
LatexWiki Image(7)
Type: Expression Integer

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?