Diadic Numbers

They are represented by an integer $m$ and an integer exponent $e$ (corresponding to the number $m 2^e$). They may replace rational numbers in problems where only division by two are used. The implementation

template<class NT> class diadic;

is parameterized by the integer type NT is the type of the integer used to represent the diadic number.

Example

ZZ a("342453413214531234");
diadic<ZZ> da(a,-4), db(3,-11);

Implementation

See also:
synaps/arithm/diadic.h

SYNAPS DOCUMENTATION
logo