Embedded Artistry Framework
Embedded Systems C++ Framework
Classes | Macros | Functions
math_private.h File Reference
#include <openlibm_complex.h>
#include "cdefs-compat.h"
#include "types-compat.h"
#include "fpmath.h"
#include <stdint.h>
#include "math_private_openbsd.h"
Include dependency graph for math_private.h:
This graph shows which files directly or indirectly include this file:

Classes

union  ieee_double_shape_type
 
union  ieee_double_shape_type
 
union  ieee_float_shape_type
 
struct  ieee_double_shape_type.parts
 
struct  ieee_double_shape_type.xparts
 
struct  ieee_double_shape_type.parts
 
struct  ieee_double_shape_type.xparts
 

Macros

#define EXTRACT_WORDS(ix0, ix1, d)
 
#define EXTRACT_WORD64(ix, d)
 
#define GET_HIGH_WORD(i, d)
 
#define GET_LOW_WORD(i, d)
 
#define INSERT_WORDS(d, ix0, ix1)
 
#define INSERT_WORD64(d, ix)
 
#define SET_HIGH_WORD(d, v)
 
#define SET_LOW_WORD(d, v)
 
#define GET_FLOAT_WORD(i, d)
 
#define SET_FLOAT_WORD(d, i)
 
#define GET_LDBL_EXPSIGN(i, d)
 
#define SET_LDBL_EXPSIGN(d, v)
 
#define STRICT_ASSIGN(type, lval, rval)   ((lval) = (rval))
 
#define __ieee754_sqrt   sqrt
 
#define __ieee754_acos   acos
 
#define __ieee754_acosh   acosh
 
#define __ieee754_log   log
 
#define __ieee754_log2   log2
 
#define __ieee754_atanh   atanh
 
#define __ieee754_asin   asin
 
#define __ieee754_atan2   atan2
 
#define __ieee754_exp   exp
 
#define __ieee754_cosh   cosh
 
#define __ieee754_fmod   fmod
 
#define __ieee754_pow   pow
 
#define __ieee754_lgamma   lgamma
 
#define __ieee754_lgamma_r   lgamma_r
 
#define __ieee754_log10   log10
 
#define __ieee754_sinh   sinh
 
#define __ieee754_hypot   hypot
 
#define __ieee754_j0   j0
 
#define __ieee754_j1   j1
 
#define __ieee754_y0   y0
 
#define __ieee754_y1   y1
 
#define __ieee754_jn   jn
 
#define __ieee754_yn   yn
 
#define __ieee754_remainder   remainder
 
#define __ieee754_sqrtf   sqrtf
 
#define __ieee754_acosf   acosf
 
#define __ieee754_acoshf   acoshf
 
#define __ieee754_logf   logf
 
#define __ieee754_atanhf   atanhf
 
#define __ieee754_asinf   asinf
 
#define __ieee754_atan2f   atan2f
 
#define __ieee754_expf   expf
 
#define __ieee754_coshf   coshf
 
#define __ieee754_fmodf   fmodf
 
#define __ieee754_powf   powf
 
#define __ieee754_lgammaf   lgammaf
 
#define __ieee754_lgammaf_r   lgammaf_r
 
#define __ieee754_log10f   log10f
 
#define __ieee754_log2f   log2f
 
#define __ieee754_sinhf   sinhf
 
#define __ieee754_hypotf   hypotf
 
#define __ieee754_j0f   j0f
 
#define __ieee754_j1f   j1f
 
#define __ieee754_y0f   y0f
 
#define __ieee754_y1f   y1f
 
#define __ieee754_jnf   jnf
 
#define __ieee754_ynf   ynf
 
#define __ieee754_remainderf   remainderf
 
#define OLM_DLLEXPORT   __attribute__ ((visibility("default")))
 

Functions

void __scan_nan (u_int32_t *__words, int __num_words, const char *__s)
 
int __kernel_rem_pio2 (double *, double *, int, int, int)
 
int __ieee754_rem_pio2 (double, double *)
 
double __kernel_sin (double, double, int)
 
double __kernel_cos (double, double)
 
double __kernel_tan (double, double, int)
 
double __ldexp_exp (double, int)
 
double complex __ldexp_cexp (double complex, int)
 
int __ieee754_rem_pio2f (float, double *)
 
float __kernel_sindf (double)
 
float __kernel_cosdf (double)
 
float __kernel_tandf (double, int)
 
float __ldexp_expf (float, int)
 
float complex __ldexp_cexpf (float complex, int)
 
long double __kernel_sinl (long double, long double, int)
 
long double __kernel_cosl (long double, long double)
 
long double __kernel_tanl (long double, long double, int)
 

Class Documentation

◆ ieee_double_shape_type

union ieee_double_shape_type
Class Members
struct ieee_double_shape_type parts
struct ieee_double_shape_type parts
double value
struct ieee_double_shape_type xparts
struct ieee_double_shape_type xparts

◆ ieee_double_shape_type

union ieee_double_shape_type
Class Members
struct ieee_double_shape_type parts
struct ieee_double_shape_type parts
double value
struct ieee_double_shape_type xparts
struct ieee_double_shape_type xparts

◆ ieee_float_shape_type

union ieee_float_shape_type
Class Members
float value
unsigned int word

◆ ieee_double_shape_type.parts

struct ieee_double_shape_type.parts
Class Members
u_int32_t lsw
u_int32_t msw

◆ ieee_double_shape_type.xparts

struct ieee_double_shape_type.xparts
Class Members
u_int64_t w

◆ ieee_double_shape_type.parts

struct ieee_double_shape_type.parts
Class Members
u_int32_t lsw
u_int32_t msw

◆ ieee_double_shape_type.xparts

struct ieee_double_shape_type.xparts
Class Members
u_int64_t w

Macro Definition Documentation

◆ __ieee754_acos

#define __ieee754_acos   acos

◆ __ieee754_acosf

#define __ieee754_acosf   acosf

◆ __ieee754_acosh

#define __ieee754_acosh   acosh

◆ __ieee754_acoshf

#define __ieee754_acoshf   acoshf

◆ __ieee754_asin

#define __ieee754_asin   asin

◆ __ieee754_asinf

#define __ieee754_asinf   asinf

◆ __ieee754_atan2

#define __ieee754_atan2   atan2

◆ __ieee754_atan2f

#define __ieee754_atan2f   atan2f

◆ __ieee754_atanh

#define __ieee754_atanh   atanh

◆ __ieee754_atanhf

#define __ieee754_atanhf   atanhf

◆ __ieee754_cosh

#define __ieee754_cosh   cosh

◆ __ieee754_coshf

#define __ieee754_coshf   coshf

◆ __ieee754_exp

#define __ieee754_exp   exp

◆ __ieee754_expf

#define __ieee754_expf   expf

◆ __ieee754_fmod

#define __ieee754_fmod   fmod

◆ __ieee754_fmodf

#define __ieee754_fmodf   fmodf

◆ __ieee754_hypot

#define __ieee754_hypot   hypot

◆ __ieee754_hypotf

#define __ieee754_hypotf   hypotf

◆ __ieee754_j0

#define __ieee754_j0   j0

◆ __ieee754_j0f

#define __ieee754_j0f   j0f

◆ __ieee754_j1

#define __ieee754_j1   j1

◆ __ieee754_j1f

#define __ieee754_j1f   j1f

◆ __ieee754_jn

#define __ieee754_jn   jn

◆ __ieee754_jnf

#define __ieee754_jnf   jnf

◆ __ieee754_lgamma

#define __ieee754_lgamma   lgamma

◆ __ieee754_lgamma_r

#define __ieee754_lgamma_r   lgamma_r

◆ __ieee754_lgammaf

#define __ieee754_lgammaf   lgammaf

◆ __ieee754_lgammaf_r

#define __ieee754_lgammaf_r   lgammaf_r

◆ __ieee754_log

#define __ieee754_log   log

◆ __ieee754_log10

#define __ieee754_log10   log10

◆ __ieee754_log10f

#define __ieee754_log10f   log10f

◆ __ieee754_log2

#define __ieee754_log2   log2

◆ __ieee754_log2f

#define __ieee754_log2f   log2f

◆ __ieee754_logf

#define __ieee754_logf   logf

◆ __ieee754_pow

#define __ieee754_pow   pow

◆ __ieee754_powf

#define __ieee754_powf   powf

◆ __ieee754_remainder

#define __ieee754_remainder   remainder

◆ __ieee754_remainderf

#define __ieee754_remainderf   remainderf

◆ __ieee754_sinh

#define __ieee754_sinh   sinh

◆ __ieee754_sinhf

#define __ieee754_sinhf   sinhf

◆ __ieee754_sqrt

#define __ieee754_sqrt   sqrt

◆ __ieee754_sqrtf

#define __ieee754_sqrtf   sqrtf

◆ __ieee754_y0

#define __ieee754_y0   y0

◆ __ieee754_y0f

#define __ieee754_y0f   y0f

◆ __ieee754_y1

#define __ieee754_y1   y1

◆ __ieee754_y1f

#define __ieee754_y1f   y1f

◆ __ieee754_yn

#define __ieee754_yn   yn

◆ __ieee754_ynf

#define __ieee754_ynf   ynf

◆ EXTRACT_WORD64

#define EXTRACT_WORD64 (   ix,
 
)
Value:
do { \
ieee_double_shape_type ew_u; \
ew_u.value = (d); \
(ix) = ew_u.xparts.w; \
} while (0)

◆ EXTRACT_WORDS

#define EXTRACT_WORDS (   ix0,
  ix1,
 
)
Value:
do { \
ieee_double_shape_type ew_u; \
ew_u.value = (d); \
(ix0) = ew_u.parts.msw; \
(ix1) = ew_u.parts.lsw; \
} while (0)

◆ GET_FLOAT_WORD

#define GET_FLOAT_WORD (   i,
 
)
Value:
do { \
ieee_float_shape_type gf_u; \
gf_u.value = (d); \
(i) = gf_u.word; \
} while (0)

◆ GET_HIGH_WORD

#define GET_HIGH_WORD (   i,
 
)
Value:
do { \
ieee_double_shape_type gh_u; \
gh_u.value = (d); \
(i) = gh_u.parts.msw; \
} while (0)

◆ GET_LDBL_EXPSIGN

#define GET_LDBL_EXPSIGN (   i,
 
)
Value:
do { \
union IEEEl2bits ge_u; \
ge_u.e = (d); \
(i) = ge_u.xbits.expsign; \
} while (0)
long double e
Definition: aarch64_fpmath.h:31
Definition: aarch64_fpmath.h:30

◆ GET_LOW_WORD

#define GET_LOW_WORD (   i,
 
)
Value:
do { \
ieee_double_shape_type gl_u; \
gl_u.value = (d); \
(i) = gl_u.parts.lsw; \
} while (0)

◆ INSERT_WORD64

#define INSERT_WORD64 (   d,
  ix 
)
Value:
do { \
ieee_double_shape_type iw_u; \
iw_u.xparts.w = (ix); \
(d) = iw_u.value; \
} while (0)

◆ INSERT_WORDS

#define INSERT_WORDS (   d,
  ix0,
  ix1 
)
Value:
do { \
ieee_double_shape_type iw_u; \
iw_u.parts.msw = (ix0); \
iw_u.parts.lsw = (ix1); \
(d) = iw_u.value; \
} while (0)

◆ OLM_DLLEXPORT

#define OLM_DLLEXPORT   __attribute__ ((visibility("default")))

◆ SET_FLOAT_WORD

#define SET_FLOAT_WORD (   d,
 
)
Value:
do { \
ieee_float_shape_type sf_u; \
sf_u.word = (i); \
(d) = sf_u.value; \
} while (0)

◆ SET_HIGH_WORD

#define SET_HIGH_WORD (   d,
 
)
Value:
do { \
ieee_double_shape_type sh_u; \
sh_u.value = (d); \
sh_u.parts.msw = (v); \
(d) = sh_u.value; \
} while (0)

◆ SET_LDBL_EXPSIGN

#define SET_LDBL_EXPSIGN (   d,
 
)
Value:
do { \
union IEEEl2bits se_u; \
se_u.e = (d); \
se_u.xbits.expsign = (v); \
(d) = se_u.e; \
} while (0)
long double e
Definition: aarch64_fpmath.h:31
Definition: aarch64_fpmath.h:30

◆ SET_LOW_WORD

#define SET_LOW_WORD (   d,
 
)
Value:
do { \
ieee_double_shape_type sl_u; \
sl_u.value = (d); \
sl_u.parts.lsw = (v); \
(d) = sl_u.value; \
} while (0)

◆ STRICT_ASSIGN

#define STRICT_ASSIGN (   type,
  lval,
  rval 
)    ((lval) = (rval))

Function Documentation

◆ __ieee754_rem_pio2()

int __ieee754_rem_pio2 ( double  ,
double *   
)

References __kernel_rem_pio2(), fn, GET_HIGH_WORD, GET_LOW_WORD, high, INSERT_WORDS, invpio2, low, n, pio2_1, pio2_1t, pio2_2, pio2_2t, pio2_3, pio2_3t, r, STRICT_ASSIGN, t, two24, w, z, and zero.

Referenced by cos(), sin(), sincos(), and tan().

Here is the caller graph for this function:

◆ __ieee754_rem_pio2f()

int __ieee754_rem_pio2f ( float  ,
double *   
)

References __kernel_rem_pio2(), fn, GET_FLOAT_WORD, invpio2, n, pio2_1, pio2_1t, r, SET_FLOAT_WORD, STRICT_ASSIGN, w, and z.

Referenced by cosf(), sincosf(), sinf(), and tanf().

Here is the caller graph for this function:

◆ __kernel_cos()

double __kernel_cos ( double  ,
double   
)

References C1, C2, C3, C4, C5, C6, one, r, w, and z.

Referenced by cos(), sin(), and sin_pi().

Here is the caller graph for this function:

◆ __kernel_cosdf()

float __kernel_cosdf ( double  )

References C0, C1, C2, C3, one, r, w, and z.

Referenced by cosf(), sin_pif(), and sinf().

Here is the caller graph for this function:

◆ __kernel_cosl()

long double __kernel_cosl ( long double  ,
long double   
)

References C1, C10, C11, C2, C3, C4, C5, C6, C7, C8, C9, one, r, w, and z.

Referenced by cosl(), and sinl().

Here is the caller graph for this function:

◆ __kernel_rem_pio2()

int __kernel_rem_pio2 ( double *  ,
double *  ,
int  ,
int  ,
int   
)

References floor(), init_jk, ipio2, k, n, one, PIo2, scalbn(), STRICT_ASSIGN, two24, twon24, z, and zero.

Referenced by __ieee754_rem_pio2(), __ieee754_rem_pio2f(), and __ieee754_rem_pio2l().

Here is the caller graph for this function:

◆ __kernel_sin()

double __kernel_sin ( double  ,
double  ,
int   
)

References half, r, S1, S2, S3, S4, S5, S6, w, and z.

Referenced by cos(), sin(), and sin_pi().

Here is the caller graph for this function:

◆ __kernel_sindf()

float __kernel_sindf ( double  )

References r, s, S1, S2, S3, S4, w, and z.

Referenced by cosf(), sin_pif(), and sinf().

Here is the caller graph for this function:

◆ __kernel_sinl()

long double __kernel_sinl ( long double  ,
long double  ,
int   
)

References half, r, S1, S10, S11, S12, S2, S3, S4, S5, S6, S7, S8, S9, and z.

Referenced by cosl(), and sinl().

Here is the caller graph for this function:

◆ __kernel_tan()

double __kernel_tan ( double  ,
double  ,
int   
)

References a, GET_HIGH_WORD, pio4, pio4lo, r, s, SET_LOW_WORD, T, t, w, and z.

Referenced by tan().

Here is the caller graph for this function:

◆ __kernel_tandf()

float __kernel_tandf ( double  ,
int   
)

References r, s, T, t, u, w, and z.

Referenced by tanf().

Here is the caller graph for this function:

◆ __kernel_tanl()

long double __kernel_tanl ( long double  ,
long double  ,
int   
)

References a, fabsl(), pio4, pio4lo, r, s, t, T11, T13, T15, T17, T19, T21, T23, T25, T27, T29, T3, T31, T33, T35, T37, T39, T41, T43, T45, T47, T49, T5, T51, T53, T55, T57, T7, T9, w, and z.

Referenced by tanl().

Here is the caller graph for this function:

◆ __ldexp_cexp()

double complex __ldexp_cexp ( double  complex,
int   
)

References __frexp_exp(), cimag(), CMPLX(), cos(), creal(), INSERT_WORDS, sin(), and z.

Referenced by ccosh(), cexp(), and csinh().

Here is the caller graph for this function:

◆ __ldexp_cexpf()

float complex __ldexp_cexpf ( float  complex,
int   
)

References __frexp_expf(), cimagf(), CMPLXF(), cosf(), crealf(), SET_FLOAT_WORD, sinf(), and z.

Referenced by ccoshf(), cexpf(), and csinhf().

Here is the caller graph for this function:

◆ __ldexp_exp()

double __ldexp_exp ( double  ,
int   
)

References __frexp_exp(), and INSERT_WORDS.

Referenced by __ieee754_cosh(), and __ieee754_sinh().

Here is the caller graph for this function:

◆ __ldexp_expf()

float __ldexp_expf ( float  ,
int   
)

References __frexp_expf(), and SET_FLOAT_WORD.

Referenced by __ieee754_coshf(), and __ieee754_sinhf().

Here is the caller graph for this function:

◆ __scan_nan()

void __scan_nan ( u_int32_t __words,
int  __num_words,
const char *  __s 
)

Referenced by nanl().

Here is the caller graph for this function: