This fails
fricas
(1) -> exp(-0.02*t)
Type: Expression(Float)
fricas
% :: Expression Fraction Integer
Type: Expression(Fraction(Integer))
fricas
% :: Expression Float
Type: Expression(Float)
But this works
fricas
exp(-1*(1/50)*t)
Type: Expression(Integer)
fricas
% :: Expression Float
Type: Expression(Float)
Why are these expressions treated differently?
How can convert the first one to the second?
fricas
(1/2*x)::EXPR FRAC INT
Type: Expression(Fraction(Integer))
fricas
%::EXPR FLOAT
Type: Expression(Float)
If
fricas
exp(-0.02*t) :: Expression Fraction Integer
Type: Expression(Fraction(Integer))
then why?
fricas
exp(-1*(1/50)*t)
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