axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-developer] [Fraction] attempt to modify Fraction


From: Bill Page
Subject: [Axiom-developer] [Fraction] attempt to modify Fraction
Date: Tue, 07 Feb 2006 03:53:28 -0600

Changes http://wiki.axiom-developer.org/Fraction/diff
--
\begin{spad}
)abbrev domain FRAC Fraction
++ Try to prevent Fraction from returning Fraction Fraction Integer
++ based on a suggestiong by Ralf Hammecke
Fraction(S: IntegralDomain): QuotientFieldCategory S with 
       if S has IntegerNumberSystem and S has OpenMath then OpenMath
       if S has canonical and S has GcdDomain and S has canonicalUnitNormal
           then canonical
  ==  if S has QuotientFieldCategory Integer then S add
           coerce(d:S):% == d
           zero?(x:%) == zero? x
      else LocalAlgebra(S, S, S) add
           Rep:= Record(num:S, den:S)
           coerce(d:S):% == [d,1]
           zero?(x:%) == zero? x.num
\end{spad}

But SPAD apparently cannot compile this. :(
--
forwarded from http://wiki.axiom-developer.org/address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]