diff options
author | dos-reis <gdr@axiomatics.org> | 2008-11-21 04:54:55 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2008-11-21 04:54:55 +0000 |
commit | 49727ef97a25730307fdb9622be726e92a41a875 (patch) | |
tree | 5c6fbb86ff4e49c7ed0d510e76f42d7352005c88 /src/algebra/radix.spad.pamphlet | |
parent | 0b97ae7365e5ba3d3e078147124e096f7cccde4b (diff) | |
download | open-axiom-49727ef97a25730307fdb9622be726e92a41a875.tar.gz |
* algebra/alql.spad.pamphlet (Database): Now CoercibleFrom List S.
* algebra/asp.spad.pamphlet (Asp20): Now CoercibleFrom MAT FEXPR.
(Asp6): Now CoercibleFrom Vector FEXPR.
* algebra/catdef.spad.pamphlet (Algebra): Extend CoercibleFrom R.
(Ring): Extend CoercibleFrom Integer.
* algebra/formula.spad.pamphlet (ScriptFormulaFormat): Now
CoercibleFrom E.
* algebra/fortran.spad.pamphlet (FortranCode): Remove redundant
signature.
* algebra/fs2ups.spad.pamphlet
(FunctionSpaceToUnivariatePowerSeries): Tidy parameter.
* algebra/laurent.spad.pamphlet
(UnivariateLaurentSeriesConstructorCategory): Extend CoercibleFrom
UTS.
* algebra/manip.spad.pamphlet (PolynomialRoots): Tidy parameter.
* algebra/modmon.spad.pamphlet (ModMonic): Now CoercibleFrom Rep.
* algebra/ore.spad.pamphlet (UnivariateSkewPolynomial): Now
CoercibleFrom Variable x.
Diffstat (limited to 'src/algebra/radix.spad.pamphlet')
-rw-r--r-- | src/algebra/radix.spad.pamphlet | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/src/algebra/radix.spad.pamphlet b/src/algebra/radix.spad.pamphlet index 3fb80cd2..80b12c4c 100644 --- a/src/algebra/radix.spad.pamphlet +++ b/src/algebra/radix.spad.pamphlet @@ -42,9 +42,8 @@ RadixExpansion(bb): Exports == Implementation where ST ==> Stream Integer QuoRem ==> Record(quotient: Integer, remainder: Integer) - Exports ==> QuotientFieldCategory(Integer) with - coerce: % -> Fraction Integer - ++ coerce(rx) converts a radix expansion to a rational number. + Exports == Join(QuotientFieldCategory(Integer),_ + CoercibleTo Fraction Integer) with fractionPart: % -> Fraction Integer ++ fractionPart(rx) returns the fractional part of a radix expansion. wholeRagits: % -> List Integer @@ -280,11 +279,8 @@ RadixExpansion(bb): Exports == Implementation where ++ binary expansions. BinaryExpansion(): Exports == Implementation where - Exports ==> QuotientFieldCategory(Integer) with - coerce: % -> Fraction Integer - ++ coerce(b) converts a binary expansion to a rational number. - coerce: % -> RadixExpansion(2) - ++ coerce(b) converts a binary expansion to a radix expansion with base 2. + Exports == Join(QuotientFieldCategory(Integer),_ + CoercibleTo Fraction Integer,CoercibleTo RadixExpansion(2)) with fractionPart: % -> Fraction Integer ++ fractionPart(b) returns the fractional part of a binary expansion. binary: Fraction Integer -> % @@ -312,12 +308,8 @@ BinaryExpansion(): Exports == Implementation where ++ This domain allows rational numbers to be presented as repeating ++ decimal expansions. DecimalExpansion(): Exports == Implementation where - Exports ==> QuotientFieldCategory(Integer) with - coerce: % -> Fraction Integer - ++ coerce(d) converts a decimal expansion to a rational number. - coerce: % -> RadixExpansion(10) - ++ coerce(d) converts a decimal expansion to a radix expansion - ++ with base 10. + Exports == Join(QuotientFieldCategory(Integer),_ + CoercibleTo Fraction Integer,CoercibleTo RadixExpansion 10) with fractionPart: % -> Fraction Integer ++ fractionPart(d) returns the fractional part of a decimal expansion. decimal: Fraction Integer -> % @@ -346,12 +338,9 @@ DecimalExpansion(): Exports == Implementation where ++ hexadecimal expansions. HexadecimalExpansion(): Exports == Implementation where - Exports ==> QuotientFieldCategory(Integer) with - coerce: % -> Fraction Integer - ++ coerce(h) converts a hexadecimal expansion to a rational number. - coerce: % -> RadixExpansion(16) - ++ coerce(h) converts a hexadecimal expansion to a radix expansion - ++ with base 16. + Exports == Join(QuotientFieldCategory(Integer),_ + CoercibleTo Fraction Integer,_ + CoercibleTo RadixExpansion 16) with fractionPart: % -> Fraction Integer ++ fractionPart(h) returns the fractional part of a hexadecimal expansion. hex: Fraction Integer -> % |