42 std::tuple<__int128,__int128,__int128>
xgcd( __int128 p_a, __int128 p_b );
49 bool isint128(
const std::string & p_str );
89 std::pair<int32_t,uint32_t>
rand( uint32_t p_seed );
99 inline __int128
mmod( __int128 p_d, __int128 p_m ) {
100 const __int128 rem = p_d % p_m;
101 return rem>=0 ? rem : rem+p_m;
Collection of numeric algorithms.
Definition algo.h:28
bool isSquareFree(__int128 p_n)
Checks if an integer is square free.
Definition algo.cpp:131
__int128 mmod(__int128 p_d, __int128 p_m)
Mathematical modulus.
Definition algo.h:99
bool hasFloatSyntax(const std::string &p_str)
Checks, if the string has the syntax of a float.
Definition algo.cpp:114
std::pair< int32_t, uint32_t > rand(uint32_t p_seed)
ISO C rand_r() for 32 bit.
Definition algo.cpp:175
bool isint128(const std::string &p_str)
Is the string a 128 bit integer.
Definition algo.cpp:74
std::tuple< __int128, __int128, __int128 > xgcd(__int128 p_a, __int128 p_b)
Extended Euclidean algorithm.
Definition algo.cpp:36
bool hasRationalSyntax(const std::string &p_str)
Checks, if the string has the syntax of a rational number.
Definition algo.cpp:125