39 __int128
xgcd( __int128 p_a, __int128 p_b, __int128 * p_s, __int128 * p_t );
46 bool isint128(
const std::string & p_str );
68 int32_t
rand( uint32_t * p_seed );
78 inline __int128
mmod( __int128 p_d, __int128 p_m ) {
79 const __int128 rem = p_d % p_m;
80 return rem>=0 ? rem : rem+p_m;
Collection of numeric algorithms.
Definition algo.h:26
int32_t rand(uint32_t *p_seed)
ISO C rand_r() for 32 bit.
Definition algo.cpp:150
bool isfloat128(const std::string &p_str)
Is the string a 128 bit float.
Definition algo.cpp:113
__int128 mmod(__int128 p_d, __int128 p_m)
Mathematical modulus.
Definition algo.h:78
bool isint128(const std::string &p_str)
Is the string a 128 bit integer.
Definition algo.cpp:73
__int128 xgcd(__int128 p_a, __int128 p_b, __int128 *p_s, __int128 *p_t)
Extended Euclidean algorithm.
Definition algo.cpp:33