Functions | |
int | mirml_ipow (int base, int exp) |
Integer exponentiation: baseexp. More... | |
mirkl_int64_t | mirml_i64pow (mirkl_int64_t base, mirkl_int64_t exp) |
Similar to mirml_ipow but for 64-bit integers. | |
int | mirml_test_int64add (mirkl_int64_t si1, mirkl_int64_t si2) |
Tests whether the result of addition of two signed 64-bit integers si1 + si2 fits into a 64-bit signed integer. More... | |
int | mirml_test_int64sub (mirkl_int64_t si1, mirkl_int64_t si2) |
Tests whether the result of substraction of two signed 64-bit integers si1 - si2 fits into a 64-bit signed integer. More... | |
int | mirml_test_int64mult (mirkl_int64_t si1, mirkl_int64_t si2) |
Tests whether the result of multiplication of two signed 64-bit integers si1 * si2 fits into a 64-bit signed integer. More... | |
int | mirml_test_int64rem (mirkl_int64_t si1, mirkl_int64_t si2) |
Tests whether it is possible to calculate remainder of division si1 / si2. More... | |
int | mirml_test_int64div (mirkl_int64_t si1, mirkl_int64_t si2) |
Tests whether it is possible to calculate result of division si1 / si2. More... | |
int | mirml_test_int64umin (mirkl_int64_t s) |
Tests whether it is possible to apply unary negation operation to s. More... | |
int | mirml_is_number (double x) |
Tests the double number if it is NaN or not. More... | |
int | mirml_is_finite_number (double x) |
Tests the double number is finite. More... | |
int | mirml_cmp_double (double a, double b, double epsilon) |
Comparison of two double numbers. More... | |
int | mirml_cmp_float (float a, float b, float epsilon) |
Comparison of two float numbers. More... | |
int mirml_cmp_double | ( | double | a, |
double | b, | ||
double | epsilon | ||
) |
Comparison of two double numbers.
This functions takes into account magnitude of the numbers and precision.
[in] | a | First value to be compared with the second one. |
[in] | b | Second value. |
[in] | epsilon | Precision for comparison. This is compared to relative difference. Only if the difference is close to zero or one of the numbers is exactly zero, then this number is used as absolute precision. |
int mirml_cmp_float | ( | float | a, |
float | b, | ||
float | epsilon | ||
) |
Comparison of two float numbers.
Similar to mirml_cmp_double, see details therein.
int mirml_ipow | ( | int | base, |
int | exp | ||
) |
Integer exponentiation: baseexp.
[in] | base | Must be positive. |
[in] | exp | Must be positive. |
int mirml_is_finite_number | ( | double | x | ) |
Tests the double number is finite.
[in] | x | Tested value |
int mirml_is_number | ( | double | x | ) |
Tests the double number if it is NaN or not.
[in] | x | Tested value |
int mirml_test_int64add | ( | mirkl_int64_t | si1, |
mirkl_int64_t | si2 | ||
) |
Tests whether the result of addition of two signed 64-bit integers si1 + si2 fits into a 64-bit signed integer.
[in] | si1 | First value |
[in] | si2 | Second value |
int mirml_test_int64div | ( | mirkl_int64_t | si1, |
mirkl_int64_t | si2 | ||
) |
Tests whether it is possible to calculate result of division si1 / si2.
[in] | si1 | Numerator |
[in] | si2 | Denominator |
int mirml_test_int64mult | ( | mirkl_int64_t | si1, |
mirkl_int64_t | si2 | ||
) |
Tests whether the result of multiplication of two signed 64-bit integers si1 * si2 fits into a 64-bit signed integer.
[in] | si1 | First value |
[in] | si2 | Second value |
int mirml_test_int64rem | ( | mirkl_int64_t | si1, |
mirkl_int64_t | si2 | ||
) |
Tests whether it is possible to calculate remainder of division si1 / si2.
[in] | si1 | Numerator |
[in] | si2 | Denominator |
int mirml_test_int64sub | ( | mirkl_int64_t | si1, |
mirkl_int64_t | si2 | ||
) |
Tests whether the result of substraction of two signed 64-bit integers si1 - si2 fits into a 64-bit signed integer.
[in] | si1 | First value |
[in] | si2 | Second value |
int mirml_test_int64umin | ( | mirkl_int64_t | s | ) |
Tests whether it is possible to apply unary negation operation to s.
[in] | s | Tested value |