BinaryExpansion

radix.spad line 245 [edit on github]

This domain allows rational numbers to be presented as repeating binary expansions.

* : (%, %) -> %
from Magma
* : (%, Fraction(Integer)) -> %
from RightModule(Fraction(Integer))
* : (%, Integer) -> %
from RightModule(Integer)
* : (Fraction(Integer), %) -> %
from LeftModule(Fraction(Integer))
* : (Integer, %) -> %
from AbelianGroup
* : (NonNegativeInteger, %) -> %
from AbelianMonoid
* : (PositiveInteger, %) -> %
from AbelianSemiGroup
+ : (%, %) -> %
from AbelianSemiGroup
- : % -> %
from AbelianGroup
- : (%, %) -> %
from AbelianGroup
/ : (%, %) -> %
from Field
/ : (Integer, Integer) -> %
from QuotientFieldCategory(Integer)
0 : () -> %
from AbelianMonoid
1 : () -> %
from MagmaWithUnit
< : (%, %) -> Boolean
from PartialOrder
<= : (%, %) -> Boolean
from PartialOrder
= : (%, %) -> Boolean
from BasicType
> : (%, %) -> Boolean
from PartialOrder
>= : (%, %) -> Boolean
from PartialOrder
D : % -> %
from DifferentialRing
D : (%, List(Symbol)) -> % if Integer has PartialDifferentialRing(Symbol)
from PartialDifferentialRing(Symbol)
D : (%, List(Symbol), List(NonNegativeInteger)) -> % if Integer has PartialDifferentialRing(Symbol)
from PartialDifferentialRing(Symbol)
D : (%, Mapping(Integer, Integer)) -> %
from DifferentialExtension(Integer)
D : (%, Mapping(Integer, Integer), NonNegativeInteger) -> %
from DifferentialExtension(Integer)
D : (%, NonNegativeInteger) -> %
from DifferentialRing
D : (%, Symbol) -> % if Integer has PartialDifferentialRing(Symbol)
from PartialDifferentialRing(Symbol)
D : (%, Symbol, NonNegativeInteger) -> % if Integer has PartialDifferentialRing(Symbol)
from PartialDifferentialRing(Symbol)
^ : (%, Integer) -> %
from DivisionRing
^ : (%, NonNegativeInteger) -> %
from MagmaWithUnit
^ : (%, PositiveInteger) -> %
from Magma
abs : % -> %
from OrderedRing
annihilate? : (%, %) -> Boolean
from Rng
antiCommutator : (%, %) -> %
from NonAssociativeSemiRng
associates? : (%, %) -> Boolean
from EntireRing
associator : (%, %, %) -> %
from NonAssociativeRng
binary : Fraction(Integer) -> %

binary(r) converts a rational number to a binary expansion.

ceiling : % -> Integer
from QuotientFieldCategory(Integer)
characteristic : () -> NonNegativeInteger
from NonAssociativeRing
charthRoot : % -> Union(%, "failed") if Integer has CharacteristicNonZero or % has CharacteristicNonZero
from CharacteristicNonZero
coerce : % -> %
from Algebra(%)
coerce : Fraction(Integer) -> %
from CoercibleFrom(Fraction(Integer))
coerce : Integer -> %
from NonAssociativeRing
coerce : Symbol -> % if Integer has RetractableTo(Symbol)
from CoercibleFrom(Symbol)
coerce : % -> Fraction(Integer)

coerce(b) converts a binary expansion to a rational number.

coerce : % -> OutputForm
from CoercibleTo(OutputForm)
coerce : % -> RadixExpansion(2)

coerce(b) converts a binary expansion to a radix expansion with base 2.

commutator : (%, %) -> %
from NonAssociativeRng
conditionP : Matrix(%) -> Union(Vector(%), "failed") if % has CharacteristicNonZero
from PolynomialFactorizationExplicit
convert : % -> DoubleFloat
from ConvertibleTo(DoubleFloat)
convert : % -> Float
from ConvertibleTo(Float)
convert : % -> InputForm
from ConvertibleTo(InputForm)
convert : % -> Pattern(Float) if Integer has ConvertibleTo(Pattern(Float))
from ConvertibleTo(Pattern(Float))
convert : % -> Pattern(Integer)
from ConvertibleTo(Pattern(Integer))
denom : % -> Integer
from QuotientFieldCategory(Integer)
denominator : % -> %
from QuotientFieldCategory(Integer)
differentiate : % -> %
from DifferentialRing
differentiate : (%, List(Symbol)) -> % if Integer has PartialDifferentialRing(Symbol)
from PartialDifferentialRing(Symbol)
differentiate : (%, List(Symbol), List(NonNegativeInteger)) -> % if Integer has PartialDifferentialRing(Symbol)
from PartialDifferentialRing(Symbol)
differentiate : (%, Mapping(Integer, Integer)) -> %
from DifferentialExtension(Integer)
differentiate : (%, Mapping(Integer, Integer), NonNegativeInteger) -> %
from DifferentialExtension(Integer)
differentiate : (%, NonNegativeInteger) -> %
from DifferentialRing
differentiate : (%, Symbol) -> % if Integer has PartialDifferentialRing(Symbol)
from PartialDifferentialRing(Symbol)
differentiate : (%, Symbol, NonNegativeInteger) -> % if Integer has PartialDifferentialRing(Symbol)
from PartialDifferentialRing(Symbol)
divide : (%, %) -> Record(quotient : %, remainder : %)
from EuclideanDomain
elt : (%, Integer) -> % if Integer has Eltable(Integer, Integer)
from Eltable(Integer, %)
euclideanSize : % -> NonNegativeInteger
from EuclideanDomain
eval : (%, Equation(Integer)) -> % if Integer has Evalable(Integer)
from Evalable(Integer)
eval : (%, Integer, Integer) -> % if Integer has Evalable(Integer)
from InnerEvalable(Integer, Integer)
eval : (%, List(Equation(Integer))) -> % if Integer has Evalable(Integer)
from Evalable(Integer)
eval : (%, List(Integer), List(Integer)) -> % if Integer has Evalable(Integer)
from InnerEvalable(Integer, Integer)
eval : (%, List(Symbol), List(Integer)) -> % if Integer has InnerEvalable(Symbol, Integer)
from InnerEvalable(Symbol, Integer)
eval : (%, Symbol, Integer) -> % if Integer has InnerEvalable(Symbol, Integer)
from InnerEvalable(Symbol, Integer)
expressIdealMember : (List(%), %) -> Union(List(%), "failed")
from PrincipalIdealDomain
exquo : (%, %) -> Union(%, "failed")
from EntireRing
extendedEuclidean : (%, %) -> Record(coef1 : %, coef2 : %, generator : %)
from EuclideanDomain
extendedEuclidean : (%, %, %) -> Union(Record(coef1 : %, coef2 : %), "failed")
from EuclideanDomain
factor : % -> Factored(%)
from UniqueFactorizationDomain
factorPolynomial : SparseUnivariatePolynomial(%) -> Factored(SparseUnivariatePolynomial(%))
from PolynomialFactorizationExplicit
factorSquareFreePolynomial : SparseUnivariatePolynomial(%) -> Factored(SparseUnivariatePolynomial(%))
from PolynomialFactorizationExplicit
floor : % -> Integer
from QuotientFieldCategory(Integer)
fractionPart : % -> %
from QuotientFieldCategory(Integer)
fractionPart : % -> Fraction(Integer)

fractionPart(b) returns the fractional part of a binary expansion.

gcd : (%, %) -> %
from GcdDomain
gcd : List(%) -> %
from GcdDomain
gcdPolynomial : (SparseUnivariatePolynomial(%), SparseUnivariatePolynomial(%)) -> SparseUnivariatePolynomial(%)
from PolynomialFactorizationExplicit
init : () -> %
from StepThrough
inv : % -> %
from DivisionRing
latex : % -> String
from SetCategory
lcm : (%, %) -> %
from GcdDomain
lcm : List(%) -> %
from GcdDomain
lcmCoef : (%, %) -> Record(llcm_res : %, coeff1 : %, coeff2 : %)
from LeftOreRing
leftPower : (%, NonNegativeInteger) -> %
from MagmaWithUnit
leftPower : (%, PositiveInteger) -> %
from Magma
leftRecip : % -> Union(%, "failed")
from MagmaWithUnit
map : (Mapping(Integer, Integer), %) -> %
from FullyEvalableOver(Integer)
max : (%, %) -> %
from OrderedSet
min : (%, %) -> %
from OrderedSet
multiEuclidean : (List(%), %) -> Union(List(%), "failed")
from EuclideanDomain
negative? : % -> Boolean
from OrderedRing
nextItem : % -> Union(%, "failed")
from StepThrough
numer : % -> Integer
from QuotientFieldCategory(Integer)
numerator : % -> %
from QuotientFieldCategory(Integer)
one? : % -> Boolean
from MagmaWithUnit
opposite? : (%, %) -> Boolean
from AbelianMonoid
patternMatch : (%, Pattern(Float), PatternMatchResult(Float, %)) -> PatternMatchResult(Float, %) if Integer has PatternMatchable(Float)
from PatternMatchable(Float)
patternMatch : (%, Pattern(Integer), PatternMatchResult(Integer, %)) -> PatternMatchResult(Integer, %)
from PatternMatchable(Integer)
plenaryPower : (%, PositiveInteger) -> %
from NonAssociativeAlgebra(%)
positive? : % -> Boolean
from OrderedRing
prime? : % -> Boolean
from UniqueFactorizationDomain
principalIdeal : List(%) -> Record(coef : List(%), generator : %)
from PrincipalIdealDomain
quo : (%, %) -> %
from EuclideanDomain
recip : % -> Union(%, "failed")
from MagmaWithUnit
reducedSystem : Matrix(%) -> Matrix(Integer)
from LinearlyExplicitOver(Integer)
reducedSystem : (Matrix(%), Vector(%)) -> Record(mat : Matrix(Integer), vec : Vector(Integer))
from LinearlyExplicitOver(Integer)
rem : (%, %) -> %
from EuclideanDomain
retract : % -> Fraction(Integer)
from RetractableTo(Fraction(Integer))
retract : % -> Integer
from RetractableTo(Integer)
retract : % -> Symbol if Integer has RetractableTo(Symbol)
from RetractableTo(Symbol)
retractIfCan : % -> Union(Fraction(Integer), "failed")
from RetractableTo(Fraction(Integer))
retractIfCan : % -> Union(Integer, "failed")
from RetractableTo(Integer)
retractIfCan : % -> Union(Symbol, "failed") if Integer has RetractableTo(Symbol)
from RetractableTo(Symbol)
rightPower : (%, NonNegativeInteger) -> %
from MagmaWithUnit
rightPower : (%, PositiveInteger) -> %
from Magma
rightRecip : % -> Union(%, "failed")
from MagmaWithUnit
sample : () -> %
from AbelianMonoid
sign : % -> Integer
from OrderedRing
sizeLess? : (%, %) -> Boolean
from EuclideanDomain
smaller? : (%, %) -> Boolean
from Comparable
solveLinearPolynomialEquation : (List(SparseUnivariatePolynomial(%)), SparseUnivariatePolynomial(%)) -> Union(List(SparseUnivariatePolynomial(%)), "failed")
from PolynomialFactorizationExplicit
squareFree : % -> Factored(%)
from UniqueFactorizationDomain
squareFreePart : % -> %
from UniqueFactorizationDomain
squareFreePolynomial : SparseUnivariatePolynomial(%) -> Factored(SparseUnivariatePolynomial(%))
from PolynomialFactorizationExplicit
subtractIfCan : (%, %) -> Union(%, "failed")
from CancellationAbelianMonoid
unit? : % -> Boolean
from EntireRing
unitCanonical : % -> %
from EntireRing
unitNormal : % -> Record(unit : %, canonical : %, associate : %)
from EntireRing
wholePart : % -> Integer
from QuotientFieldCategory(Integer)
zero? : % -> Boolean
from AbelianMonoid
~= : (%, %) -> Boolean
from BasicType

FullyLinearlyExplicitOver(Integer)

Module(Fraction(Integer))

ConvertibleTo(Float)

PrincipalIdealDomain

NonAssociativeSemiRing

BiModule(%, %)

ConvertibleTo(InputForm)

Field

canonicalUnitNormal

Rng

CoercibleFrom(Integer)

TwoSidedRecip

OrderedAbelianGroup

FullyEvalableOver(Integer)

SemiRing

EntireRing

Patternable(Integer)

NonAssociativeAlgebra(Fraction(Integer))

CharacteristicNonZero

InnerEvalable(Symbol, Integer)

unitsKnown

PatternMatchable(Float)

Algebra(Integer)

noZeroDivisors

RetractableTo(Fraction(Integer))

UniqueFactorizationDomain

SemiGroup

NonAssociativeAlgebra(Integer)

RightModule(Fraction(Integer))

Magma

RetractableTo(Symbol)

IntegralDomain

LeftModule(%)

NonAssociativeRing

GcdDomain

NonAssociativeAlgebra(%)

PartialDifferentialRing(Symbol)

CharacteristicZero

OrderedIntegralDomain

Algebra(%)

CoercibleFrom(Fraction(Integer))

DifferentialRing

OrderedAbelianMonoid

DivisionRing

CommutativeRing

NonAssociativeRng

PartialOrder

NonAssociativeSemiRng

CancellationAbelianMonoid

EuclideanDomain

canonicalsClosed

QuotientFieldCategory(Integer)

RetractableTo(Integer)

OrderedCancellationAbelianMonoid

OrderedRing

CommutativeStar

AbelianMonoid

MagmaWithUnit

Comparable

RightModule(%)

Evalable(Integer)

RealConstant

ConvertibleTo(DoubleFloat)

OrderedAbelianSemiGroup

StepThrough

Eltable(Integer, %)

LinearlyExplicitOver(Integer)

BiModule(Integer, Integer)

CoercibleTo(OutputForm)

Module(Integer)

SemiRng

LeftModule(Integer)

CoercibleFrom(Symbol)

Monoid

PolynomialFactorizationExplicit

DifferentialExtension(Integer)

LeftOreRing

OrderedSet

FullyPatternMatchable(Integer)

Algebra(Fraction(Integer))

ConvertibleTo(Pattern(Integer))

BasicType

Ring

RightModule(Integer)

InnerEvalable(Integer, Integer)

AbelianSemiGroup

Module(%)

LeftModule(Fraction(Integer))

SetCategory

PatternMatchable(Integer)

BiModule(Fraction(Integer), Fraction(Integer))

ConvertibleTo(Pattern(Float))

AbelianGroup