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

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

fricas
(1) -> exp(-0.02*t)

\label{eq1}{e}^{-{{0.02}\  t}}(1)
Type: Expression(Float)
fricas
% :: Expression Fraction Integer

\label{eq2}{e}^{-{{\frac{1}{50}}\  t}}(2)
Type: Expression(Fraction(Integer))
fricas
% :: Expression Float

\label{eq3}{e}^{-{{0.02}\  t}}(3)
Type: Expression(Float)

But this works

fricas
exp(-1*(1/50)*t)

\label{eq4}{e}^{-{\frac{t}{50}}}(4)
Type: Expression(Integer)
fricas
% :: Expression Float

\label{eq5}{e}^{-{{0.02}\  t}}(5)
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
fricas
(1/2*x)::EXPR FRAC INT

\label{eq6}{\frac{1}{2}}\  x(6)
Type: Expression(Fraction(Integer))
fricas
%::EXPR FLOAT

\label{eq7}{0.5}\  x(7)
Type: Expression(Float)

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

\label{eq8}{e}^{-{{\frac{1}{50}}\  t}}(8)
Type: Expression(Fraction(Integer))

then why?

fricas
exp(-1*(1/50)*t)

\label{eq9}{e}^{-{\frac{t}{50}}}(9)
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?

Category: Axiom Compiler => Axiom Library Status: open => rejected

Expression R builds expressions with coefficients from R. Since Expression is closed under division, EXPR INT and EXPR FRAC INT cover the same amount of expressions. It seems to be part of axiom's philosophy not to support redundant application of domain constructors, at least in the interpreter. Other examples are FRAC FRAC INT or COMPLEX COMPLEX INT.

Martin




  Subject: (replying)   Be Bold !!
  ( 15 subscribers )  
Please rate this page: