|
liba 0.1.15
An algorithm library based on C/C++
|
Macros | |
| #define | A_E 2.71828182845904523536 |
| #define | A_LOG2E 1.44269504088896340736 |
| #define | A_LOG10E 0.434294481903251827651 |
| #define | A_LN2 0.693147180559945309417 |
| #define | A_LN1_2 3.32192809488736218171 |
| #define | A_LN10 2.30258509299404568402 |
| #define | A_LN1_10 0.434294481903251827651 |
| #define | A_PI 3.14159265358979323846 |
| #define | A_TAU 6.28318530717958647693 |
| #define | A_PI_2 1.57079632679489661923 |
| #define | A_PI_4 0.785398163397448309616 |
| #define | A_1_PI 0.318309886183790671538 |
| #define | A_2_PI 0.636619772367581343076 |
| #define | A_1_TAU 0.159154943091895335769 |
| #define | A_2_SQRTPI 1.12837916709551257390 |
| #define | A_SQRT2 1.41421356237309504880 |
| #define | A_SQRT1_2 0.707106781186547524401 |
| #define | A_SQRT3 1.73205080756887729352 |
| #define | A_SQRT1_3 0.57735026918962576450 |
| #define | A_RAD2DEG 57.2957795130823208768 |
| #define | A_DEG2RAD 0.01745329251994329576924 |
| #define | a_f32_modf A_F32_F(modf) |
| #define | a_f32_frexp A_F32_F(frexp) |
| #define | a_f32_ldexp A_F32_F(ldexp) |
| #define | a_f32_scalbn A_F32_F(scalbn) |
| #define | a_f32_scalbln A_F32_F(scalbln) |
| #define | a_f32_nextafter A_F32_F(nextafter) |
| #define | a_f32_nexttoward A_F32_F(nexttoward) |
| #define | a_f32_copysign A_F32_F(copysign) |
| #define | a_f32_ma A_F32_F(fma) |
| #define | a_f32_nan A_F32_F(nan) |
| #define | a_f32_abs A_F32_F(fabs) |
| #define | a_f32_mod A_F32_F(fmod) |
| #define | a_f32_max A_F32_F(fmax) |
| #define | a_f32_min A_F32_F(fmin) |
| #define | a_f32_dim A_F32_F(fdim) |
| #define | a_f32_remquo A_F32_F(remquo) |
| #define | a_f32_remainder A_F32_F(remainder) |
| #define | a_f32_exp A_F32_F(exp) |
| #define | a_f32_exp2 A_F32_F(exp2) |
| #define | a_f32_expm1 A_F32_F(expm1) |
| #define | a_f32_log A_F32_F(log) |
| #define | a_f32_logb A_F32_F(logb) |
| #define | a_f32_log2 A_F32_F(log2) |
| #define | a_f32_log10 A_F32_F(log10) |
| #define | a_f32_log1p A_F32_F(log1p) |
| #define | a_f32_ilogb A_F32_F(ilogb) |
| #define | a_f32_pow A_F32_F(pow) |
| #define | a_f32_sqrt A_F32_F(sqrt) |
| #define | a_f32_cbrt A_F32_F(cbrt) |
| #define | a_f32_hypot A_F32_F(hypot) |
| #define | a_f32_sin A_F32_F(sin) |
| #define | a_f32_cos A_F32_F(cos) |
| #define | a_f32_tan A_F32_F(tan) |
| #define | a_f32_asin A_F32_F(asin) |
| #define | a_f32_acos A_F32_F(acos) |
| #define | a_f32_atan A_F32_F(atan) |
| #define | a_f32_atan2 A_F32_F(atan2) |
| #define | a_f32_sinh A_F32_F(sinh) |
| #define | a_f32_cosh A_F32_F(cosh) |
| #define | a_f32_tanh A_F32_F(tanh) |
| #define | a_f32_asinh A_F32_F(asinh) |
| #define | a_f32_acosh A_F32_F(acosh) |
| #define | a_f32_atanh A_F32_F(atanh) |
| #define | a_f32_erf A_F32_F(erf) |
| #define | a_f32_erfc A_F32_F(erfc) |
| #define | a_f32_tgamma A_F32_F(tgamma) |
| #define | a_f32_lgamma A_F32_F(lgamma) |
| #define | a_f32_ceil A_F32_F(ceil) |
| #define | a_f32_floor A_F32_F(floor) |
| #define | a_f32_trunc A_F32_F(trunc) |
| #define | a_f32_round A_F32_F(round) |
| #define | a_f32_lround A_F32_F(lround) |
| #define | a_f32_llround A_F32_F(llround) |
| #define | a_f32_nearbyint A_F32_F(nearbyint) |
| #define | a_f32_rint A_F32_F(rint) |
| #define | a_f32_lrintt A_F32_F(lrint) |
| #define | a_f32_llrintt A_F32_F(llrint) |
| #define | a_f64_modf A_F64_F(modf) |
| #define | a_f64_frexp A_F64_F(frexp) |
| #define | a_f64_ldexp A_F64_F(ldexp) |
| #define | a_f64_scalbn A_F64_F(scalbn) |
| #define | a_f64_scalbln A_F64_F(scalbln) |
| #define | a_f64_nextafter A_F64_F(nextafter) |
| #define | a_f64_nexttoward A_F64_F(nexttoward) |
| #define | a_f64_copysign A_F64_F(copysign) |
| #define | a_f64_ma A_F64_F(fma) |
| #define | a_f64_nan A_F64_F(nan) |
| #define | a_f64_abs A_F64_F(fabs) |
| #define | a_f64_mod A_F64_F(fmod) |
| #define | a_f64_max A_F64_F(fmax) |
| #define | a_f64_min A_F64_F(fmin) |
| #define | a_f64_dim A_F64_F(fdim) |
| #define | a_f64_remquo A_F64_F(remquo) |
| #define | a_f64_remainder A_F64_F(remainder) |
| #define | a_f64_exp A_F64_F(exp) |
| #define | a_f64_exp2 A_F64_F(exp2) |
| #define | a_f64_expm1 A_F64_F(expm1) |
| #define | a_f64_log A_F64_F(log) |
| #define | a_f64_logb A_F64_F(logb) |
| #define | a_f64_log2 A_F64_F(log2) |
| #define | a_f64_log10 A_F64_F(log10) |
| #define | a_f64_log1p A_F64_F(log1p) |
| #define | a_f64_ilogb A_F64_F(ilogb) |
| #define | a_f64_pow A_F64_F(pow) |
| #define | a_f64_sqrt A_F64_F(sqrt) |
| #define | a_f64_cbrt A_F64_F(cbrt) |
| #define | a_f64_hypot A_F64_F(hypot) |
| #define | a_f64_sin A_F64_F(sin) |
| #define | a_f64_cos A_F64_F(cos) |
| #define | a_f64_tan A_F64_F(tan) |
| #define | a_f64_asin A_F64_F(asin) |
| #define | a_f64_acos A_F64_F(acos) |
| #define | a_f64_atan A_F64_F(atan) |
| #define | a_f64_atan2 A_F64_F(atan2) |
| #define | a_f64_sinh A_F64_F(sinh) |
| #define | a_f64_cosh A_F64_F(cosh) |
| #define | a_f64_tanh A_F64_F(tanh) |
| #define | a_f64_asinh A_F64_F(asinh) |
| #define | a_f64_acosh A_F64_F(acosh) |
| #define | a_f64_atanh A_F64_F(atanh) |
| #define | a_f64_erf A_F64_F(erf) |
| #define | a_f64_erfc A_F64_F(erfc) |
| #define | a_f64_tgamma A_F64_F(tgamma) |
| #define | a_f64_lgamma A_F64_F(lgamma) |
| #define | a_f64_ceil A_F64_F(ceil) |
| #define | a_f64_floor A_F64_F(floor) |
| #define | a_f64_trunc A_F64_F(trunc) |
| #define | a_f64_round A_F64_F(round) |
| #define | a_f64_lround A_F64_F(lround) |
| #define | a_f64_llround A_F64_F(llround) |
| #define | a_f64_nearbyint A_F64_F(nearbyint) |
| #define | a_f64_rint A_F64_F(rint) |
| #define | a_f64_lrintt A_F64_F(lrint) |
| #define | a_f64_llrintt A_F64_F(llrint) |
Functions | |
| a_u32 | a_u32_gcd (a_u32 a, a_u32 b) |
| compute the greatest common divisor of two unsigned integers | |
| a_u64 | a_u64_gcd (a_u64 a, a_u64 b) |
| a_u32 | a_u32_lcm (a_u32 a, a_u32 b) |
| compute the least common multiple of two unsigned integers | |
| a_u64 | a_u64_lcm (a_u64 a, a_u64 b) |
| a_u16 | a_u32_sqrt (a_u32 x) |
| compute the square root of an unsigned integer | |
| a_u32 | a_u64_sqrt (a_u64 x) |
| a_f32 | a_f32_rsqrt (a_f32 x) |
| compute the reciprocal of square-root, \( \frac{1}{\sqrt{x}} \) | |
| a_f64 | a_f64_rsqrt (a_f64 x) |
| #define A_1_PI 0.318309886183790671538 |
\( \frac{1}{\pi} \)
| #define A_1_TAU 0.159154943091895335769 |
\( \frac{1}{2\pi} \)
| #define A_2_PI 0.636619772367581343076 |
\( \frac{2}{\pi} \)
| #define A_2_SQRTPI 1.12837916709551257390 |
\( \frac{2}{\sqrt{\pi}} \)
| #define A_DEG2RAD 0.01745329251994329576924 |
\( \frac{\pi}{180} \)
| #define A_E 2.71828182845904523536 |
\( e \)
| #define A_LN10 2.30258509299404568402 |
\( \ln{10} \)
| #define A_LN1_10 0.434294481903251827651 |
\( \frac{1}{\ln{10}} \)
| #define A_LN1_2 3.32192809488736218171 |
\( \frac{1}{\ln{2}} \)
| #define A_LN2 0.693147180559945309417 |
\( \ln{2} \)
| #define A_LOG10E 0.434294481903251827651 |
\( \lg{e}=\frac{1}{\ln{2}+\ln{5}} \)
| #define A_LOG2E 1.44269504088896340736 |
\( \log_{2}{e}=\frac{1}{\ln{2}} \)
| #define A_PI 3.14159265358979323846 |
\( \pi \)
| #define A_PI_2 1.57079632679489661923 |
\( \frac{\pi}{2} \)
| #define A_PI_4 0.785398163397448309616 |
\( \frac{\pi}{4} \)
| #define A_RAD2DEG 57.2957795130823208768 |
\( \frac{180}{\pi} \)
| #define A_SQRT1_2 0.707106781186547524401 |
\( \frac{1}{\sqrt{2}}=\frac{\sqrt{2}}{2} \)
| #define A_SQRT1_3 0.57735026918962576450 |
\( \frac{1}{\sqrt{3}}=\frac{\sqrt{3}}{3} \)
| #define A_SQRT2 1.41421356237309504880 |
\( \sqrt{2} \)
| #define A_SQRT3 1.73205080756887729352 |
\( \sqrt{3} \)
| #define A_TAU 6.28318530717958647693 |
\( 2\pi \)
compute the reciprocal of square-root, \( \frac{1}{\sqrt{x}} \)
http://en.wikipedia.org/wiki/Fast_inverse_square_root
| [in] | x | independent variable |
compute the greatest common divisor of two unsigned integers
| [in] | a | unsigned integer |
| [in] | b | unsigned integer |
compute the least common multiple of two unsigned integers
| [in] | a | unsigned integer |
| [in] | b | unsigned integer |