liba 0.1.15
An algorithm library based on C/C++
 
Loading...
Searching...
No Matches
floating-point number
Collaboration diagram for floating-point number:

Macros

#define A_REAL_TYPE   A_REAL_DOUBLE
 floating-point number bytes
 
#define A_REAL_SINGLE   0x04
 
#define A_REAL_DOUBLE   0x08
 
#define A_REAL_EXTEND   0x10
 
#define A_REAL   double
 floating-point number stored using double
 
#define A_REAL_DIG   DBL_DIG
 
#define A_REAL_EPSILON   DBL_EPSILON
 
#define A_REAL_MANT_DIG   DBL_MANT_DIG
 
#define A_REAL_MAX   DBL_MAX
 
#define A_REAL_MAX_10_EXP   DBL_MAX_10_EXP
 
#define A_REAL_MAX_EXP   DBL_MAX_EXP
 
#define A_REAL_MIN   DBL_MIN
 
#define A_REAL_MIN_10_EXP   DBL_MIN_10_EXP
 
#define A_REAL_MIN_EXP   DBL_MIN_EXP
 
#define A_REAL_C(X)
 expands to a floating-point constant expression having the value specified by its argument and the type floating-point number
 
#define A_REAL_F(F)
 expands to a floating-point function expression having the value specified by its argument and the type floating-point number
 
#define A_REAL_PRI
 format constants for the fprintf family of functions
 
#define A_REAL_SCN   "l"
 format constants for the fscanf family of functions
 
#define A_REAL_INF   a_cast_s(A_REAL, A_F64_INF)
 
#define A_REAL_NAN   (A_REAL_C(0.0) * A_REAL_INF)
 
#define a_real_c(x)
 static cast to floating-point number
 
#define a_real_(_, x)
 
#define A_REAL_E   A_REAL_C(A_E)
 
#define A_REAL_LOG2E   A_REAL_C(A_LOG2E)
 
#define A_REAL_LOG10E   A_REAL_C(A_LOG10E)
 
#define A_REAL_LN2   A_REAL_C(A_LN2)
 
#define A_REAL_LN1_2   A_REAL_C(A_LN1_2)
 
#define A_REAL_LN10   A_REAL_C(A_LN10)
 
#define A_REAL_LN1_10   A_REAL_C(A_LN1_10)
 
#define A_REAL_PI   A_REAL_C(A_PI)
 
#define A_REAL_TAU   A_REAL_C(A_TAU)
 
#define A_REAL_PI_2   A_REAL_C(A_PI_2)
 
#define A_REAL_PI_4   A_REAL_C(A_PI_4)
 
#define A_REAL_1_PI   A_REAL_C(A_1_PI)
 
#define A_REAL_2_PI   A_REAL_C(A_2_PI)
 
#define A_REAL_1_TAU   A_REAL_C(A_1_TAU)
 
#define A_REAL_2_SQRTPI   A_REAL_C(A_2_SQRTPI)
 
#define A_REAL_SQRT2   A_REAL_C(A_SQRT2)
 
#define A_REAL_SQRT1_2   A_REAL_C(A_SQRT1_2)
 
#define A_REAL_SQRT3   A_REAL_C(A_SQRT3)
 
#define A_REAL_SQRT1_3   A_REAL_C(A_SQRT1_3)
 
#define a_real_modf   A_REAL_F(modf)
 
#define a_real_frexp   A_REAL_F(frexp)
 
#define a_real_ldexp   A_REAL_F(ldexp)
 
#define a_real_scalbn   A_REAL_F(scalbn)
 
#define a_real_scalbln   A_REAL_F(scalbln)
 
#define a_real_nextafter   A_REAL_F(nextafter)
 
#define a_real_nexttoward   A_REAL_F(nexttoward)
 
#define a_real_copysign   A_REAL_F(copysign)
 
#define a_real_ma   A_REAL_F(fma)
 
#define a_real_nan   A_REAL_F(nan)
 
#define a_real_abs   A_REAL_F(fabs)
 
#define a_real_mod   A_REAL_F(fmod)
 
#define a_real_max   A_REAL_F(fmax)
 
#define a_real_min   A_REAL_F(fmin)
 
#define a_real_dim   A_REAL_F(fdim)
 
#define a_real_remquo   A_REAL_F(remquo)
 
#define a_real_remainder   A_REAL_F(remainder)
 
#define a_real_exp   A_REAL_F(exp)
 
#define a_real_exp2   A_REAL_F(exp2)
 
#define a_real_expm1   A_REAL_F(expm1)
 
#define a_real_log   A_REAL_F(log)
 
#define a_real_logb   A_REAL_F(logb)
 
#define a_real_log2   A_REAL_F(log2)
 
#define a_real_log10   A_REAL_F(log10)
 
#define a_real_log1p   A_REAL_F(log1p)
 
#define a_real_ilogb   A_REAL_F(ilogb)
 
#define a_real_pow   A_REAL_F(pow)
 
#define a_real_sqrt   A_REAL_F(sqrt)
 
#define a_real_cbrt   A_REAL_F(cbrt)
 
#define a_real_hypot   A_REAL_F(hypot)
 
#define a_real_sin   A_REAL_F(sin)
 
#define a_real_cos   A_REAL_F(cos)
 
#define a_real_tan   A_REAL_F(tan)
 
#define a_real_asin   A_REAL_F(asin)
 
#define a_real_acos   A_REAL_F(acos)
 
#define a_real_atan   A_REAL_F(atan)
 
#define a_real_atan2   A_REAL_F(atan2)
 
#define a_real_sinh   A_REAL_F(sinh)
 
#define a_real_cosh   A_REAL_F(cosh)
 
#define a_real_tanh   A_REAL_F(tanh)
 
#define a_real_asinh   A_REAL_F(asinh)
 
#define a_real_acosh   A_REAL_F(acosh)
 
#define a_real_atanh   A_REAL_F(atanh)
 
#define a_real_erf   A_REAL_F(erf)
 
#define a_real_erfc   A_REAL_F(erfc)
 
#define a_real_tgamma   A_REAL_F(tgamma)
 
#define a_real_lgamma   A_REAL_F(lgamma)
 
#define a_real_ceil   A_REAL_F(ceil)
 
#define a_real_floor   A_REAL_F(floor)
 
#define a_real_trunc   A_REAL_F(trunc)
 
#define a_real_round   A_REAL_F(round)
 
#define a_real_lround   A_REAL_F(lround)
 
#define a_real_llround   A_REAL_F(llround)
 
#define a_real_nearbyint   A_REAL_F(nearbyint)
 
#define a_real_rint   A_REAL_F(rint)
 
#define a_real_lrintt   A_REAL_F(lrint)
 
#define a_real_llrintt   A_REAL_F(llrint)
 

Typedefs

typedef double a_real
 compiler built-in floating-point number type
 

Functions

a_real a_real_asinh (a_real x)
 
a_real a_real_acosh (a_real x)
 
a_real a_real_atanh (a_real x)
 
a_real a_real_expm1 (a_real x)
 
a_real a_real_log1p (a_real x)
 
a_real a_real_atan2 (a_real y, a_real x)
 
a_real a_real_norm2 (a_real x, a_real y)
 
a_real a_real_norm3 (a_real x, a_real y, a_real z)
 
a_real a_real_norm (a_size n, a_real const *p)
 calculate the magnitude of a vector
 
a_real a_real_norm_ (a_size n, a_real const *p, a_size c)
 
a_real a_real_sum (a_size n, a_real const *p)
 calculate the sum of a float array
 
a_real a_real_sum_ (a_size n, a_real const *p, a_size c)
 
a_real a_real_sum1 (a_size n, a_real const *p)
 calculate the absolute sum of a float array
 
a_real a_real_sum1_ (a_size n, a_real const *p, a_size c)
 
a_real a_real_sum2 (a_size n, a_real const *p)
 calculate the sum of squares of a float array
 
a_real a_real_sum2_ (a_size n, a_real const *p, a_size c)
 
a_real a_real_mean (a_size n, a_real const *p)
 calculate the mean of a float array
 
a_real a_real_mean_ (a_size n, a_real const *p, a_size c)
 
a_real a_real_dot (a_size n, a_real const *X, a_real const *Y)
 compute the dot product of two vectors.
 
a_real a_real_dot_ (a_size n, a_real const *X, a_size Xc, a_real const *Y, a_size Yc)
 compute the dot product of two vectors.
 
void a_real_copy (a_size n, a_real *__restrict dst, a_real const *__restrict src)
 copy n elements from the source array src to the destination array dst.
 
void a_real_copy_ (a_size n, a_real *dst, a_size dc, a_real const *src, a_size sc)
 
void a_real_swap (a_size n, a_real *__restrict lhs, a_real *__restrict rhs)
 swap two different a_real blocks of the same size
 
void a_real_swap_ (a_size n, a_real *lhs, a_size lc, a_real *rhs, a_size rc)
 
void a_real_fill (a_size n, a_real *p, a_real v)
 fill an array of a_real numbers with a specified value.
 
void a_real_zero (a_size n, a_real *p)
 set all elements of an array of a_real numbers to zero.
 
void a_real_push_fore (a_real *p, a_size n, a_real x)
 push an element into the front of a float array
 
void a_real_push_back (a_real *p, a_size n, a_real x)
 push an element into the end of a float array
 
void a_real_push_fore_ (a_real *block_p, a_size block_n, a_real const *cache_p, a_size cache_n)
 push the elements into the front of a float array
 
void a_real_push_back_ (a_real *block_p, a_size block_n, a_real const *cache_p, a_size cache_n)
 push the elements into the end of a float array
 
void a_real_roll_fore (a_real *p, a_size n)
 roll forward the elements of a float array circularly
 
void a_real_roll_back (a_real *p, a_size n)
 roll backward the elements of a float array circularly
 
void a_real_roll_fore_ (a_real *block_p, a_size block_n, a_real *shift_p, a_size shift_n)
 roll forward the elements of a float array circularly
 
void a_real_roll_back_ (a_real *block_p, a_size block_n, a_real *shift_p, a_size shift_n)
 roll backward the elements of a float array circularly
 

Detailed Description

Macro Definition Documentation

◆ a_real_

#define a_real_ ( _,
x )
Value:
a_cast_s(a_real _, x)
double a_real
compiler built-in floating-point number type
Definition a.h:1003

◆ A_REAL_1_PI

#define A_REAL_1_PI   A_REAL_C(A_1_PI)

\( \frac{1}{\pi} \)

◆ A_REAL_1_TAU

#define A_REAL_1_TAU   A_REAL_C(A_1_TAU)

\( \frac{1}{2\pi} \)

◆ A_REAL_2_PI

#define A_REAL_2_PI   A_REAL_C(A_2_PI)

\( \frac{2}{\pi} \)

◆ A_REAL_2_SQRTPI

#define A_REAL_2_SQRTPI   A_REAL_C(A_2_SQRTPI)

\( \frac{2}{\sqrt{\pi}} \)

◆ A_REAL_C

#define A_REAL_C ( X)
Value:
X

expands to a floating-point constant expression having the value specified by its argument and the type floating-point number

◆ a_real_c

#define a_real_c ( x)
Value:
a_cast_s(a_real, x)

static cast to floating-point number

◆ A_REAL_E

#define A_REAL_E   A_REAL_C(A_E)

\( e \)

◆ A_REAL_F

#define A_REAL_F ( F)
Value:
F

expands to a floating-point function expression having the value specified by its argument and the type floating-point number

◆ A_REAL_LN10

#define A_REAL_LN10   A_REAL_C(A_LN10)

\( \ln{10} \)

◆ A_REAL_LN1_10

#define A_REAL_LN1_10   A_REAL_C(A_LN1_10)

\( \frac{1}{\ln{10}} \)

◆ A_REAL_LN1_2

#define A_REAL_LN1_2   A_REAL_C(A_LN1_2)

\( \frac{1}{\ln{2}} \)

◆ A_REAL_LN2

#define A_REAL_LN2   A_REAL_C(A_LN2)

\( \ln{2} \)

◆ A_REAL_LOG10E

#define A_REAL_LOG10E   A_REAL_C(A_LOG10E)

\( \lg{e}=\frac{1}{\ln{2}+\ln{5}} \)

◆ A_REAL_LOG2E

#define A_REAL_LOG2E   A_REAL_C(A_LOG2E)

\( \log_{2}{e}=\frac{1}{\ln{2}} \)

◆ A_REAL_PI

#define A_REAL_PI   A_REAL_C(A_PI)

\( \pi \)

◆ A_REAL_PI_2

#define A_REAL_PI_2   A_REAL_C(A_PI_2)

\( \frac{\pi}{2} \)

◆ A_REAL_PI_4

#define A_REAL_PI_4   A_REAL_C(A_PI_4)

\( \frac{\pi}{4} \)

◆ A_REAL_SQRT1_2

#define A_REAL_SQRT1_2   A_REAL_C(A_SQRT1_2)

\( \frac{1}{\sqrt{2}}=\frac{\sqrt{2}}{2} \)

◆ A_REAL_SQRT1_3

#define A_REAL_SQRT1_3   A_REAL_C(A_SQRT1_3)

\( \frac{1}{\sqrt{3}}=\frac{\sqrt{3}}{3} \)

◆ A_REAL_SQRT2

#define A_REAL_SQRT2   A_REAL_C(A_SQRT2)

\( \sqrt{2} \)

◆ A_REAL_SQRT3

#define A_REAL_SQRT3   A_REAL_C(A_SQRT3)

\( \sqrt{3} \)

◆ A_REAL_TAU

#define A_REAL_TAU   A_REAL_C(A_TAU)

\( 2\pi \)

Function Documentation

◆ a_real_copy()

void a_real_copy ( a_size n,
a_real *__restrict dst,
a_real const *__restrict src )

copy n elements from the source array src to the destination array dst.

Parameters
[in]nnumber of elements to copy
[out]dstpoints to the destination array
[in]srcpoints to the source array

◆ a_real_dot()

a_real a_real_dot ( a_size n,
a_real const * X,
a_real const * Y )

compute the dot product of two vectors.

Parameters
[in]nnumber of elements in each of the vectors X and Y.
[in]Xpoints to the first vector.
[in]Ypoints to the second vector.
Returns
dot product of vectors X and Y.

◆ a_real_dot_()

a_real a_real_dot_ ( a_size n,
a_real const * X,
a_size Xc,
a_real const * Y,
a_size Yc )

compute the dot product of two vectors.

Parameters
[in]nnumber of elements in each of the vectors X and Y.
[in]Xpoints to the first vector.
[in]Xcincrement of the first vector.
[in]Ypoints to the second vector.
[in]Ycincrement of the second vector.
Returns
dot product of vectors X and Y.

◆ a_real_fill()

void a_real_fill ( a_size n,
a_real * p,
a_real v )

fill an array of a_real numbers with a specified value.

Parameters
[in]nnumber of elements in the array to fill.
[out]ppoints to the array to fill with the value v.
[in]vthe value to fill the array with.

◆ a_real_mean()

a_real a_real_mean ( a_size n,
a_real const * p )

calculate the mean of a float array

Parameters
[in]nnumber of a float array
[in]ppoints to a float array
Returns
mean of a float array

◆ a_real_norm()

a_real a_real_norm ( a_size n,
a_real const * p )

calculate the magnitude of a vector

Parameters
[in]nnumber of a float array
[in]ppoints to a float array
Returns
the magnitude of a vector

◆ a_real_push_back()

void a_real_push_back ( a_real * p,
a_size n,
a_real x )

push an element into the end of a float array

Parameters
[in]ppoints to a float array
[in]nnumber of a float array
[in]xvalue

◆ a_real_push_back_()

void a_real_push_back_ ( a_real * block_p,
a_size block_n,
a_real const * cache_p,
a_size cache_n )

push the elements into the end of a float array

Parameters
[in]block_ppoints to a float array
[in]block_nnumber of a float array
[in]cache_ppoints to a cache array
[in]cache_nnumber of a cache array

◆ a_real_push_fore()

void a_real_push_fore ( a_real * p,
a_size n,
a_real x )

push an element into the front of a float array

Parameters
[in]ppoints to a float array
[in]nnumber of a float array
[in]xvalue

◆ a_real_push_fore_()

void a_real_push_fore_ ( a_real * block_p,
a_size block_n,
a_real const * cache_p,
a_size cache_n )

push the elements into the front of a float array

Parameters
[in]block_ppoints to a float array
[in]block_nnumber of a float array
[in]cache_ppoints to a cache array
[in]cache_nnumber of a cache array

◆ a_real_roll_back()

void a_real_roll_back ( a_real * p,
a_size n )

roll backward the elements of a float array circularly

Parameters
[in]ppoints to a float array
[in]nnumber of a float array

◆ a_real_roll_back_()

void a_real_roll_back_ ( a_real * block_p,
a_size block_n,
a_real * shift_p,
a_size shift_n )

roll backward the elements of a float array circularly

Parameters
[in]block_ppoints to a float array
[in]block_nnumber of a float array
[in]shift_ppoints to a shift array
[in]shift_nnumber of a shift array

◆ a_real_roll_fore()

void a_real_roll_fore ( a_real * p,
a_size n )

roll forward the elements of a float array circularly

Parameters
[in]ppoints to a float array
[in]nnumber of a float array

◆ a_real_roll_fore_()

void a_real_roll_fore_ ( a_real * block_p,
a_size block_n,
a_real * shift_p,
a_size shift_n )

roll forward the elements of a float array circularly

Parameters
[in]block_ppoints to a float array
[in]block_nnumber of a float array
[in]shift_ppoints to a shift array
[in]shift_nnumber of a shift array

◆ a_real_sum()

a_real a_real_sum ( a_size n,
a_real const * p )

calculate the sum of a float array

Parameters
[in]nnumber of a float array
[in]ppoints to a float array
Returns
sum of a float array

◆ a_real_sum1()

a_real a_real_sum1 ( a_size n,
a_real const * p )

calculate the absolute sum of a float array

Parameters
[in]nnumber of a float array
[in]ppoints to a float array
Returns
absolute sum of a float array

◆ a_real_sum2()

a_real a_real_sum2 ( a_size n,
a_real const * p )

calculate the sum of squares of a float array

Parameters
[in]nnumber of a float array
[in]ppoints to a float array
Returns
sum of squares of a float array

◆ a_real_swap()

void a_real_swap ( a_size n,
a_real *__restrict lhs,
a_real *__restrict rhs )

swap two different a_real blocks of the same size

Parameters
[in]nthe number of a_real block being swapped
[in,out]lhspoints to a_real block on the left
[in,out]rhspoints to a_real block on the right

◆ a_real_zero()

void a_real_zero ( a_size n,
a_real * p )

set all elements of an array of a_real numbers to zero.

Parameters
[in]nthe number of elements in the array to set to zero.
[out]ppoints to the array whose elements will be set to zero.