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 (11 years ago) Name : Axiom Version : default friCAS-20090114 Axiom-20050901 OpenAxiom-20091012 OpenAxiom-20110220 OpenAxiom-Release-141 Category : Axiom Aldor Interface Axiom Compiler Axiom Library Axiom Interpreter Axiom Documentation Axiom User Interface building Axiom from source lisp system MathAction Doyen CD Reduce Axiom on Windows Axiom on Linux Severity : critical serious normal minor wishlist Status : open closed rejected not reproducible fix proposed fixed somewhere duplicate need more info Optional subject :   Optional comment :

This fails

axiom
exp(-0.02*t) (1)
Type: Expression(Float)
axiom
% :: Expression Fraction Integer (2)
Type: Expression(Fraction(Integer))
axiom
% :: Expression Float (3)
Type: Expression(Float)

But this works

axiom
exp(-1*(1/50)*t) (4)
Type: Expression(Integer)
axiom
% :: Expression Float (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
axiom
(1/2*x)::EXPR FRAC INT (6)
Type: Expression(Fraction(Integer))
axiom
%::EXPR FLOAT (7)
Type: Expression(Float)

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 (8)
Type: Expression(Fraction(Integer))

then why?

axiom
exp(-1*(1/50)*t) (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:   Be Bold !! ( 15 subscribers )