axiom-developer
[Top][All Lists]
Advanced

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

[Axiom-developer] [BalancedFiniteField]


From: kratt6
Subject: [Axiom-developer] [BalancedFiniteField]
Date: Wed, 30 Mar 2005 07:13:40 -0600

Changes http://page.axiom-developer.org/zope/mathaction/BalancedFiniteField/diff
--
Alternatively::

  )abbrev domain BFF BalancedFiniteField
  BalancedFiniteField(p:PositiveInteger):Exports == Implementation where
    Exports == Join(FiniteFieldCategory, FiniteAlgebraicExtensionField($), 
                    ConvertibleTo(Integer)) with
      coerce: % -> OutputForm
    Implementation ==  InnerPrimeField(p) add
      if not prime?(p)\$IntegerPrimesPackage(Integer) then
        error "Argument to prime field must be a prime"
      coerce(x:%):OutputForm == 
        n:=convert(x)@Integer
        if mulmod(2,n,2*p)<=p 
        then positiveRemainder(n, p)::OutputForm
        else -positiveRemainder(p-n, p)::OutputForm
--
forwarded from http://page.axiom-developer.org/zope/mathaction/address@hidden




reply via email to

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