[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] [Axiom-mail] New to Axiom: Implement 'Balanced' Finite
From: |
Martin Rubey |
Subject: |
[Axiom-developer] [Axiom-mail] New to Axiom: Implement 'Balanced' FiniteField ? |
Date: |
Wed, 30 Mar 2005 04:17:59 -0600 |
Changes http://page.axiom-developer.org/zope/mathaction/AxiomMail/diff
--
It will roughly work as follows:
)abbrev domain BAL Balanced
Balanced(n:PositiveInteger):Exports == Implementation where
Exports == with
coerce: PrimeField n -> $
coerce: $ -> OutputForm
-- coerce: $ -> PrimeField n
Implementation == add
Rep := Integer
coerce(a: PrimeField n):$ == convert(a)@Integer - n
coerce(x:%):OutputForm == coerce(x)$Rep
-------------------------------------------------------------------------------
If you need explanation, ask for it. (No time right now)
Martin
jim kraai writes:
> Greetings,
>
> (I'm more of a pencil-n-paper math guy.)
>
> A BalancedFiniteField representation of an integer n would be:
> the same as FiniteField (base) if n <= floor(n/2)
> else base - floor(n/2)
>
> Examples:
>
> base of 4 base of 5
> n FF BFF n FF BFF
> ---------- ----------
> 0 0 0 0 0 0
> 1 1 1 1 1 1
> 2 2 2 2 2 2
> 3 3 -1 3 3 -2
> 4 0 0 4 0 -1
> 5 1 1 5 1 0
> 6 0 0
>
> After reading the book chapters on Packages, Categorys, and Domains, I find
> that I'm no more clear on which is an effective way to get this output.
>
> Thanks for any help,
>
> --jim
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Make Yahoo! your home page
> http://www.yahoo.com/r/hs
>
>
> _______________________________________________
> Axiom-mail mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/axiom-mail
_______________________________________________
Axiom-mail mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/axiom-mail
--
forwarded from http://page.axiom-developer.org/zope/mathaction/address@hidden