The dyadic rationals #
Constructs the dyadic rationals as an ordered ring, equipped with a compatible embedding into the rationals.
The number of trailing zeros in the binary representation of i.
Equations
Instances For
Returns the dyadic number representation of i * 2 ^ (-exp).
Equations
Instances For
Convert an integer to a dyadic number (which will necessarily have non-positive precision).
Equations
Instances For
Multiply two dyadic numbers.
Equations
Instances For
Shift a dyadic number left by i bits.
Equations
Instances For
Shift a dyadic number right by i bits.
Equations
Instances For
Convert a dyadic number to a rational number.
Equations
Instances For
The "precision" of a dyadic number, i.e. in n * 2^(-p) with n odd the precision is p.
Equations
Instances For
Convert a rational number x to the greatest dyadic number with precision at most prec
which is less than or equal to x.
Equations
Instances For
Rounds a dyadic rational x down to the greatest dyadic number with precision at most prec
which is less than or equal to x.
Equations
Instances For
Determine if a dyadic rational is strictly less than another.
Equations
Instances For
Determine if a dyadic rational is less than or equal to another.