MathAction #155 failed coercion between Expression Fraction Integer and Expression Float in exponents

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

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?

EXPR FRAC INT doesn't coerce to EXPR FLOAT --unknown, 2005年5月10日 17:54:24 -0500 reply
fricas
(1/2*x)::EXPR FRAC INT
Type: Expression(Fraction(Integer))
fricas
%::EXPR FLOAT
Type: Expression(Float)

Is Axiom confused? I am. --Bill Page, 2005年5月10日 18:35:04 -0500 reply
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?

redundancy --kratt6, 2007年12月28日 13:22:59 -0800 reply
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: Be Bold !!
( 15 subscribers )
Please rate this page:

AltStyle によって変換されたページ (->オリジナル) /