[Top][All Lists]

[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

)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

But SPAD apparently cannot compile this. :(
forwarded from

reply via email to

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