19#define A_E 2.71828182845904523536
21#define A_LOG2E 1.44269504088896340736
23#define A_LOG10E 0.434294481903251827651
25#define A_LN2 0.693147180559945309417
27#define A_LN1_2 3.32192809488736218171
29#define A_LN10 2.30258509299404568402
31#define A_LN1_10 0.434294481903251827651
33#define A_PI 3.14159265358979323846
35#define A_TAU 6.28318530717958647693
37#define A_PI_2 1.57079632679489661923
39#define A_PI_4 0.785398163397448309616
41#define A_1_PI 0.318309886183790671538
43#define A_2_PI 0.636619772367581343076
45#define A_1_TAU 0.159154943091895335769
47#define A_2_SQRTPI 1.12837916709551257390
49#define A_SQRT2 1.41421356237309504880
51#define A_SQRT1_2 0.707106781186547524401
53#define A_SQRT3 1.73205080756887729352
55#define A_SQRT1_3 0.57735026918962576450
57#if defined(__cplusplus)
78#if defined(__cplusplus)
82#define a_f32_modf A_F32_F(modf)
83#define a_f32_frexp A_F32_F(frexp)
84#define a_f32_ldexp A_F32_F(ldexp)
85#define a_f32_scalbn A_F32_F(scalbn)
86#define a_f32_scalbln A_F32_F(scalbln)
87#define a_f32_nextafter A_F32_F(nextafter)
88#define a_f32_nexttoward A_F32_F(nexttoward)
89#define a_f32_copysign A_F32_F(copysign)
91#define a_f32_ma A_F32_F(fma)
92#define a_f32_nan A_F32_F(nan)
93#define a_f32_abs A_F32_F(fabs)
94#define a_f32_mod A_F32_F(fmod)
95#define a_f32_max A_F32_F(fmax)
96#define a_f32_min A_F32_F(fmin)
97#define a_f32_dim A_F32_F(fdim)
98#define a_f32_remquo A_F32_F(remquo)
99#define a_f32_remainder A_F32_F(remainder)
101#define a_f32_exp A_F32_F(exp)
102#define a_f32_exp2 A_F32_F(exp2)
103#define a_f32_expm1 A_F32_F(expm1)
105#define a_f32_log A_F32_F(log)
106#define a_f32_logb A_F32_F(logb)
107#define a_f32_log2 A_F32_F(log2)
108#define a_f32_log10 A_F32_F(log10)
109#define a_f32_log1p A_F32_F(log1p)
110#define a_f32_ilogb A_F32_F(ilogb)
112#define a_f32_pow A_F32_F(pow)
113#define a_f32_sqrt A_F32_F(sqrt)
114#define a_f32_cbrt A_F32_F(cbrt)
115#define a_f32_hypot A_F32_F(hypot)
117#define a_f32_sin A_F32_F(sin)
118#define a_f32_cos A_F32_F(cos)
119#define a_f32_tan A_F32_F(tan)
120#define a_f32_asin A_F32_F(asin)
121#define a_f32_acos A_F32_F(acos)
122#define a_f32_atan A_F32_F(atan)
123#define a_f32_atan2 A_F32_F(atan2)
125#define a_f32_sinh A_F32_F(sinh)
126#define a_f32_cosh A_F32_F(cosh)
127#define a_f32_tanh A_F32_F(tanh)
128#define a_f32_asinh A_F32_F(asinh)
129#define a_f32_acosh A_F32_F(acosh)
130#define a_f32_atanh A_F32_F(atanh)
132#define a_f32_erf A_F32_F(erf)
133#define a_f32_erfc A_F32_F(erfc)
134#define a_f32_tgamma A_F32_F(tgamma)
135#define a_f32_lgamma A_F32_F(lgamma)
137#define a_f32_ceil A_F32_F(ceil)
138#define a_f32_floor A_F32_F(floor)
139#define a_f32_trunc A_F32_F(trunc)
140#define a_f32_round A_F32_F(round)
141#define a_f32_lround A_F32_F(lround)
142#define a_f32_llround A_F32_F(llround)
143#define a_f32_nearbyint A_F32_F(nearbyint)
144#define a_f32_rint A_F32_F(rint)
145#define a_f32_lrintt A_F32_F(lrint)
146#define a_f32_llrintt A_F32_F(llrint)
148#define a_f64_modf A_F64_F(modf)
149#define a_f64_frexp A_F64_F(frexp)
150#define a_f64_ldexp A_F64_F(ldexp)
151#define a_f64_scalbn A_F64_F(scalbn)
152#define a_f64_scalbln A_F64_F(scalbln)
153#define a_f64_nextafter A_F64_F(nextafter)
154#define a_f64_nexttoward A_F64_F(nexttoward)
155#define a_f64_copysign A_F64_F(copysign)
157#define a_f64_ma A_F64_F(fma)
158#define a_f64_nan A_F64_F(nan)
159#define a_f64_abs A_F64_F(fabs)
160#define a_f64_mod A_F64_F(fmod)
161#define a_f64_max A_F64_F(fmax)
162#define a_f64_min A_F64_F(fmin)
163#define a_f64_dim A_F64_F(fdim)
164#define a_f64_remquo A_F64_F(remquo)
165#define a_f64_remainder A_F64_F(remainder)
167#define a_f64_exp A_F64_F(exp)
168#define a_f64_exp2 A_F64_F(exp2)
169#define a_f64_expm1 A_F64_F(expm1)
171#define a_f64_log A_F64_F(log)
172#define a_f64_logb A_F64_F(logb)
173#define a_f64_log2 A_F64_F(log2)
174#define a_f64_log10 A_F64_F(log10)
175#define a_f64_log1p A_F64_F(log1p)
176#define a_f64_ilogb A_F64_F(ilogb)
178#define a_f64_pow A_F64_F(pow)
179#define a_f64_sqrt A_F64_F(sqrt)
180#define a_f64_cbrt A_F64_F(cbrt)
181#define a_f64_hypot A_F64_F(hypot)
183#define a_f64_sin A_F64_F(sin)
184#define a_f64_cos A_F64_F(cos)
185#define a_f64_tan A_F64_F(tan)
186#define a_f64_asin A_F64_F(asin)
187#define a_f64_acos A_F64_F(acos)
188#define a_f64_atan A_F64_F(atan)
189#define a_f64_atan2 A_F64_F(atan2)
191#define a_f64_sinh A_F64_F(sinh)
192#define a_f64_cosh A_F64_F(cosh)
193#define a_f64_tanh A_F64_F(tanh)
194#define a_f64_asinh A_F64_F(asinh)
195#define a_f64_acosh A_F64_F(acosh)
196#define a_f64_atanh A_F64_F(atanh)
198#define a_f64_erf A_F64_F(erf)
199#define a_f64_erfc A_F64_F(erfc)
200#define a_f64_tgamma A_F64_F(tgamma)
201#define a_f64_lgamma A_F64_F(lgamma)
203#define a_f64_ceil A_F64_F(ceil)
204#define a_f64_floor A_F64_F(floor)
205#define a_f64_trunc A_F64_F(trunc)
206#define a_f64_round A_F64_F(round)
207#define a_f64_lround A_F64_F(lround)
208#define a_f64_llround A_F64_F(llround)
209#define a_f64_nearbyint A_F64_F(nearbyint)
210#define a_f64_rint A_F64_F(rint)
211#define a_f64_lrintt A_F64_F(lrint)
212#define a_f64_llrintt A_F64_F(llrint)
223#define A_FLOAT_E A_FLOAT_C(A_E)
225#define A_FLOAT_LOG2E A_FLOAT_C(A_LOG2E)
227#define A_FLOAT_LOG10E A_FLOAT_C(A_LOG10E)
229#define A_FLOAT_LN2 A_FLOAT_C(A_LN2)
231#define A_FLOAT_LN1_2 A_FLOAT_C(A_LN1_2)
233#define A_FLOAT_LN10 A_FLOAT_C(A_LN10)
235#define A_FLOAT_LN1_10 A_FLOAT_C(A_LN1_10)
237#define A_FLOAT_PI A_FLOAT_C(A_PI)
239#define A_FLOAT_TAU A_FLOAT_C(A_TAU)
241#define A_FLOAT_PI_2 A_FLOAT_C(A_PI_2)
243#define A_FLOAT_PI_4 A_FLOAT_C(A_PI_4)
245#define A_FLOAT_1_PI A_FLOAT_C(A_1_PI)
247#define A_FLOAT_2_PI A_FLOAT_C(A_2_PI)
249#define A_FLOAT_1_TAU A_FLOAT_C(A_1_TAU)
251#define A_FLOAT_2_SQRTPI A_FLOAT_C(A_2_SQRTPI)
253#define A_FLOAT_SQRT2 A_FLOAT_C(A_SQRT2)
255#define A_FLOAT_SQRT1_2 A_FLOAT_C(A_SQRT1_2)
257#define A_FLOAT_SQRT3 A_FLOAT_C(A_SQRT3)
259#define A_FLOAT_SQRT1_3 A_FLOAT_C(A_SQRT1_3)
261#if defined(__cplusplus)
384#if defined(__cplusplus)
388#define a_float_modf A_FLOAT_F(modf)
389#define a_float_frexp A_FLOAT_F(frexp)
390#define a_float_ldexp A_FLOAT_F(ldexp)
391#define a_float_scalbn A_FLOAT_F(scalbn)
392#define a_float_scalbln A_FLOAT_F(scalbln)
393#define a_float_nextafter A_FLOAT_F(nextafter)
394#define a_float_nexttoward A_FLOAT_F(nexttoward)
395#define a_float_copysign A_FLOAT_F(copysign)
397#define a_float_ma A_FLOAT_F(fma)
398#define a_float_nan A_FLOAT_F(nan)
399#define a_float_abs A_FLOAT_F(fabs)
400#define a_float_mod A_FLOAT_F(fmod)
401#define a_float_max A_FLOAT_F(fmax)
402#define a_float_min A_FLOAT_F(fmin)
403#define a_float_dim A_FLOAT_F(fdim)
404#define a_float_remquo A_FLOAT_F(remquo)
405#define a_float_remainder A_FLOAT_F(remainder)
407#define a_float_exp A_FLOAT_F(exp)
408#define a_float_exp2 A_FLOAT_F(exp2)
409#if defined(A_HAVE_EXPM1) && (A_HAVE_EXPM1 + 0 > 0)
410#define a_float_expm1 A_FLOAT_F(expm1)
413#define a_float_log A_FLOAT_F(log)
414#define a_float_logb A_FLOAT_F(logb)
415#define a_float_log2 A_FLOAT_F(log2)
416#define a_float_log10 A_FLOAT_F(log10)
417#if defined(A_HAVE_LOG1P) && (A_HAVE_LOG1P + 0 > 0)
418#define a_float_log1p A_FLOAT_F(log1p)
420#define a_float_ilogb A_FLOAT_F(ilogb)
422#define a_float_pow A_FLOAT_F(pow)
423#define a_float_sqrt A_FLOAT_F(sqrt)
424#define a_float_cbrt A_FLOAT_F(cbrt)
425#if defined(_MSC_VER) && (_MSC_VER < 1900)
426#define a_float_hypot A_FLOAT_F(_hypot)
427#elif defined(A_HAVE_HYPOT) && (A_HAVE_HYPOT + 0 > 0)
428#define a_float_hypot A_FLOAT_F(hypot)
430#define a_float_hypot a_float_norm2
433#define a_float_sin A_FLOAT_F(sin)
434#define a_float_cos A_FLOAT_F(cos)
435#define a_float_tan A_FLOAT_F(tan)
436#define a_float_asin A_FLOAT_F(asin)
437#define a_float_acos A_FLOAT_F(acos)
438#define a_float_atan A_FLOAT_F(atan)
439#if defined(A_HAVE_ATAN2) && (A_HAVE_ATAN2 + 0 > 0)
440#define a_float_atan2 A_FLOAT_F(atan2)
443#define a_float_sinh A_FLOAT_F(sinh)
444#define a_float_cosh A_FLOAT_F(cosh)
445#define a_float_tanh A_FLOAT_F(tanh)
446#if defined(A_HAVE_ASINH) && (A_HAVE_ASINH + 0 > 0)
447#define a_float_asinh A_FLOAT_F(asinh)
449#if defined(A_HAVE_ACOSH) && (A_HAVE_ACOSH + 0 > 0)
450#define a_float_acosh A_FLOAT_F(acosh)
452#if defined(A_HAVE_ATANH) && (A_HAVE_ATANH + 0 > 0)
453#define a_float_atanh A_FLOAT_F(atanh)
456#define a_float_erf A_FLOAT_F(erf)
457#define a_float_erfc A_FLOAT_F(erfc)
458#define a_float_tgamma A_FLOAT_F(tgamma)
459#define a_float_lgamma A_FLOAT_F(lgamma)
461#define a_float_ceil A_FLOAT_F(ceil)
462#define a_float_floor A_FLOAT_F(floor)
463#define a_float_trunc A_FLOAT_F(trunc)
464#define a_float_round A_FLOAT_F(round)
465#define a_float_lround A_FLOAT_F(lround)
466#define a_float_llround A_FLOAT_F(llround)
467#define a_float_nearbyint A_FLOAT_F(nearbyint)
468#define a_float_rint A_FLOAT_F(rint)
469#define a_float_lrintt A_FLOAT_F(lrint)
470#define a_float_llrintt A_FLOAT_F(llrint)
a_float a_float_sum1(a_float const *p, a_size n)
calculate the absolute sum of a float array
void a_float_push_fore_(a_float *block_p, a_size block_n, a_float const *cache_p, a_size cache_n)
push the elements into the front of a float array
void a_float_roll_back_(a_float *block_p, a_size block_n, a_float *shift_p, a_size shift_n)
roll backward the elements of a float array circularly
a_float a_float_sum(a_float const *p, a_size n)
calculate the sum of a float array
double a_float
compiler built-in floating-point number type
Definition a.h:1003
void a_float_roll_fore_(a_float *block_p, a_size block_n, a_float *shift_p, a_size shift_n)
roll forward the elements of a float array circularly
void a_float_swap(a_float *__restrict lhs, a_float *__restrict rhs, a_size n)
swap two different a_float blocks of the same size
void a_float_push_back(a_float *p, a_size n, a_float x)
push an element into the end of a float array
void a_float_roll_back(a_float *p, a_size n)
roll backward the elements of a float array circularly
void a_float_push_back_(a_float *block_p, a_size block_n, a_float const *cache_p, a_size cache_n)
push the elements into the end of a float array
a_float a_float_sum2(a_float const *p, a_size n)
calculate the sum of squares of a float array
a_float a_float_mean(a_float const *p, a_size n)
calculate the mean of a float array
void a_float_push_fore(a_float *p, a_size n, a_float x)
push an element into the front of a float array
void a_float_roll_fore(a_float *p, a_size n)
roll forward the elements of a float array circularly
a_f32 a_f32_rsqrt(a_f32 x)
reciprocal of square-root,
a_u16 a_u32_sqrt(a_u32 x)
square root of an unsigned integer
float a_f32
single precision floating point type. Matches IEEE-754 binary32 format if supported.
Definition a.h:877
unsigned long a_u64
unsigned integer type with width of exactly 64 bits
Definition a.h:627
unsigned short a_u16
unsigned integer type with width of exactly 16 bits
Definition a.h:486
double a_f64
double precision floating point type. Matches IEEE-754 binary64 format if supported.
Definition a.h:901
unsigned long a_u32
unsigned integer type with width of exactly 32 bits
Definition a.h:538
size_t a_size
unsigned integer type returned by the sizeof operator
Definition a.h:823
mathematical algorithm library