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.
Instances For
Returns the dyadic number representation of i * 2 ^ (-exp).
Instances For
Convert an integer to a dyadic number (which will necessarily have non-positive precision).
Instances For
Shift a dyadic number left by i bits.
Instances For
Shift a dyadic number right by i bits.
Instances For
The "precision" of a dyadic number, i.e. in n * 2^(-p) with n odd the precision is p.
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.
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.
Instances For
Determine if a dyadic rational is strictly less than another.
Instances For
Determine if a dyadic rational is less than or equal to another.