52#ifndef __SIZEOF_FLOAT__
53#define __SIZEOF_FLOAT__ 4
55#ifndef __SIZEOF_DOUBLE__
56#define __SIZEOF_DOUBLE__ 4
58#ifndef __SIZEOF_LONG_DOUBLE__
59#define __SIZEOF_LONG_DOUBLE__ 4
101#define M_E 2.7182818284590452354
104#define M_LOG2E 1.4426950408889634074
107#define M_LOG10E 0.43429448190325182765
110#define M_LN2 0.69314718055994530942
113#define M_LN10 2.30258509299404568402
116#define M_PI 3.14159265358979323846
119#define M_PI_2 1.57079632679489661923
122#define M_PI_4 0.78539816339744830962
125#define M_1_PI 0.31830988618379067154
128#define M_2_PI 0.63661977236758134308
131#define M_2_SQRTPI 1.12837916709551257390
134#define M_SQRT2 1.41421356237309504880
137#define M_SQRT1_2 0.70710678118654752440
140#define NAN __builtin_nan("")
144#define nanf(__tag) __builtin_nanf(__tag)
148#define nan(__tag) __builtin_nan(__tag)
152#define nanl(__tag) __builtin_nanl(__tag)
155#define INFINITY __builtin_inff()
158#define HUGE_VALF __builtin_huge_valf()
161#define HUGE_VAL __builtin_huge_val()
164#define HUGE_VALL __builtin_huge_vall()
166#include <bits/attribs.h>
169__ATTR_CONST__
extern float cosf (
float x);
171__ATTR_CONST__
extern double cos (
double x);
174__ATTR_CONST__
extern long double cosl (
long double x);
177__ATTR_CONST__
extern float sinf (
float x);
179__ATTR_CONST__
extern double sin (
double x);
182__ATTR_CONST__
extern long double sinl (
long double x);
189void sincosf (
float x,
float *psin,
float *pcos);
197void sincos (
double x,
double *psin,
double *pcos);
205void sincosl (
long double x,
long double *psin,
long double *pcos);
208__ATTR_CONST__
extern float tanf (
float x);
210__ATTR_CONST__
extern double tan (
double x);
213__ATTR_CONST__
extern long double tanl (
long double x);
217extern __ATTR_ALWAYS_INLINE__ __ATTR_GNU_INLINE__
220 return __builtin_fabsf (__x);
225extern __ATTR_ALWAYS_INLINE__ __ATTR_GNU_INLINE__
228 return __builtin_fabs (__x);
234extern __ATTR_ALWAYS_INLINE__ __ATTR_GNU_INLINE__
237 return __builtin_fabsl (__x);
241__ATTR_CONST__
extern float fmodf (
float x,
float y);
243__ATTR_CONST__
extern double fmod (
double x,
double y);
246__ATTR_CONST__
extern long double fmodl (
long double x,
long double y);
258extern float modff (
float x,
float *iptr);
265extern double modf (
double x,
double *iptr);
273extern long double modfl (
long double x,
long double *iptr);
276__ATTR_CONST__
extern float sqrtf (
float x);
278__ATTR_CONST__
extern double sqrt (
double x);
281__ATTR_CONST__
extern long double sqrtl (
long double x);
284__ATTR_CONST__
extern float cbrtf (
float x);
286__ATTR_CONST__
extern double cbrt (
double x);
289__ATTR_CONST__
extern long double cbrtl (
long double x);
297__ATTR_CONST__
extern float hypotf (
float x,
float y);
304__ATTR_CONST__
extern double hypot (
double x,
double y);
312__ATTR_CONST__
extern long double hypotl (
long double x,
long double y);
316__ATTR_CONST__
extern float floorf (
float x);
319__ATTR_CONST__
extern double floor (
double x);
323__ATTR_CONST__
extern long double floorl (
long double x);
327__ATTR_CONST__
extern float ceilf (
float x);
330__ATTR_CONST__
extern double ceil (
double x);
334__ATTR_CONST__
extern long double ceill (
long double x);
361extern double frexp (
double x,
int *pexp);
373extern long double frexpl (
long double x,
int *pexp);
378__ATTR_CONST__
extern float ldexpf (
float x,
int iexp);
382__ATTR_CONST__
extern double ldexp (
double x,
int iexp);
387__ATTR_CONST__
extern long double ldexpl (
long double x,
int iexp);
390__ATTR_CONST__
extern float expf (
float x);
392__ATTR_CONST__
extern double exp (
double x);
395__ATTR_CONST__
extern long double expl (
long double x);
398__ATTR_CONST__
extern float coshf (
float x);
400__ATTR_CONST__
extern double cosh (
double x);
403__ATTR_CONST__
extern long double coshl (
long double x);
406__ATTR_CONST__
extern float sinhf (
float x);
408__ATTR_CONST__
extern double sinh (
double x);
410__ATTR_CONST__
extern long double sinhl (
long double x);
413__ATTR_CONST__
extern float tanhf (
float x);
415__ATTR_CONST__
extern double tanh (
double x);
418__ATTR_CONST__
extern long double tanhl (
long double x);
424__ATTR_CONST__
extern float acosf (
float x);
427__ATTR_CONST__
extern double acos (
double x);
431__ATTR_CONST__
extern long double acosl (
long double x);
437__ATTR_CONST__
extern float asinf (
float x);
440__ATTR_CONST__
extern double asin (
double x);
444__ATTR_CONST__
extern long double asinl (
long double x);
449__ATTR_CONST__
extern float atanf (
float x);
452__ATTR_CONST__
extern double atan (
double x);
456__ATTR_CONST__
extern long double atanl (
long double x);
462__ATTR_CONST__
extern float atan2f (
float y,
float x);
467__ATTR_CONST__
extern double atan2 (
double y,
double x);
473__ATTR_CONST__
extern long double atan2l (
long double y,
long double x);
477__ATTR_CONST__
extern float logf (
float x);
479__ATTR_CONST__
extern double log (
double x);
482__ATTR_CONST__
extern long double logl (
long double x);
486__ATTR_CONST__
extern float log10f (
float x);
488__ATTR_CONST__
extern double log10 (
double x);
491__ATTR_CONST__
extern long double log10l (
long double x);
496__ATTR_CONST__
extern float log2f (
float x);
499__ATTR_CONST__
extern double log2 (
double x);
502__ATTR_CONST__
extern long double log2l (
long double x);
507__ATTR_CONST__
extern float powf (
float x,
float y);
511__ATTR_CONST__
extern double pow (
double x,
double y);
516__ATTR_CONST__
extern long double powl (
long double x,
long double y);
520__ATTR_CONST__
extern int isnanf (
float x);
523__ATTR_CONST__
extern int isnan (
double x);
527__ATTR_CONST__
extern int isnanl (
long double x);
531__ATTR_CONST__
extern int isinff (
float x);
534__ATTR_CONST__
extern int isinf (
double x);
538__ATTR_CONST__
extern int isinfl (
long double x);
542__ATTR_CONST__
static __ATTR_ALWAYS_INLINE__
int isfinitef (
float __x)
549 "rol %0 ; [[len=nl]]"
552 return __exp != 0xff;
558static __ATTR_ALWAYS_INLINE__
int isfinite (
double __x);
559#elif __SIZEOF_DOUBLE__ == __SIZEOF_FLOAT__
560static __ATTR_ALWAYS_INLINE__
int isfinite (
double __x)
572static __ATTR_ALWAYS_INLINE__
int isfinitel (
long double __x);
573#elif __SIZEOF_LONG_DOUBLE__ == __SIZEOF_FLOAT__
574static __ATTR_ALWAYS_INLINE__
int isfinitel (
long double __x)
584__ATTR_CONST__
static __ATTR_ALWAYS_INLINE__
float copysignf (
float __x,
float __y)
588 "bld %D0, 7 ; [[len=nl]]"
590 :
"0" (__x),
"r" (__y));
596__ATTR_CONST__
static __ATTR_ALWAYS_INLINE__
double copysign (
double __x,
double __y)
599 "bst %r1+%2-1, 7" "\n\t"
600 "bld %r0+%2-1, 7 ; [[len=nl]]"
602 :
"r" (__y),
"n" (__SIZEOF_DOUBLE__));
609__ATTR_CONST__
static __ATTR_ALWAYS_INLINE__
long double copysignl (
long double __x,
long double __y)
612 "bst %r1+%2-1, 7" "\n\t"
613 "bld %r0+%2-1, 7 ; [[len=nl]]"
615 :
"r" (__y),
"n" (__SIZEOF_LONG_DOUBLE__));
641__ATTR_CONST__
extern float fdimf (
float x,
float y);
644__ATTR_CONST__
extern double fdim (
double x,
double y);
648__ATTR_CONST__
extern long double fdiml (
long double x,
long double y);
654__ATTR_CONST__
extern float fmaf (
float x,
float y,
float z);
659__ATTR_CONST__
extern double fma (
double x,
double y,
double z);
665__ATTR_CONST__
extern long double fmal (
long double x,
long double y,
long double z);
670__ATTR_CONST__
extern float fmaxf (
float x,
float y);
674__ATTR_CONST__
extern double fmax (
double x,
double y);
679__ATTR_CONST__
extern long double fmaxl (
long double x,
long double y);
684__ATTR_CONST__
extern float fminf (
float x,
float y);
688__ATTR_CONST__
extern double fmin (
double x,
double y);
693__ATTR_CONST__
extern long double fminl (
long double x,
long double y);
697__ATTR_CONST__
extern float truncf (
float x);
700__ATTR_CONST__
extern double trunc (
double x);
704__ATTR_CONST__
extern long double truncl (
long double x);
712__ATTR_CONST__
extern float roundf (
float x);
719__ATTR_CONST__
extern double round (
double x);
727__ATTR_CONST__
extern long double roundl (
long double x);
746__ATTR_CONST__
extern long lround (
double x);
756__ATTR_CONST__
extern long lroundl (
long double x);
767__ATTR_CONST__
extern long lrintf (
float x);
777__ATTR_CONST__
extern long lrint (
double x);
788__ATTR_CONST__
extern long lrintl (
long double x);
805#if defined(__DOXYGEN__) || __SIZEOF_DOUBLE__ == __SIZEOF_FLOAT__
806__ATTR_CONST__
extern double square (
double x);
807#elif defined(__WITH_LIBF7_MATH__)
808__ATTR_CONST__
extern double square (
double x) __asm(
"__f7_square");
814#if defined(__DOXYGEN__) || __SIZEOF_LONG_DOUBLE__ == __SIZEOF_FLOAT__
815__ATTR_CONST__
extern long double squarel (
long double x);
816#elif defined(__WITH_LIBF7_MATH__)
817__ATTR_CONST__
extern long double squarel (
long double x) __asm(
"__f7_square");
double fabs(double __x)
Definition: math.h:226
long double fmaxl(long double x, long double y)
long double ldexpl(long double x, int iexp)
long double squarel(long double x)
long double floorl(long double x)
long double tanl(long double x)
long double powl(long double x, long double y)
void sincosl(long double x, long double *psin, long double *pcos)
double atan2(double y, double x)
double fmax(double x, double y)
long double asinl(long double x)
static int isfinitef(float __x)
Definition: math.h:542
double ldexp(double x, int iexp)
int isinfl(long double x)
long double frexpl(long double x, int *pexp)
int isnanl(long double x)
long double cbrtl(long double x)
double fmod(double x, double y)
long double coshl(long double x)
static int isfinitel(long double __x)
float fabsf(float __x)
Definition: math.h:218
long double atanl(long double x)
long double roundl(long double x)
long double cosl(long double x)
double hypot(double x, double y)
int signbitl(long double x)
double fdim(double x, double y)
long lrintl(long double x)
float fmaxf(float x, float y)
long double fminl(long double x, long double y)
long double truncl(long double x)
double frexp(double x, int *pexp)
long double hypotl(long double x, long double y)
long double tanhl(long double x)
float fminf(float x, float y)
long double sqrtl(long double x)
float hypotf(float x, float y)
long double log2l(long double x)
double pow(double x, double y)
float fmaf(float x, float y, float z)
long double fabsl(long double __x)
Definition: math.h:235
float frexpf(float x, int *pexp)
long double fmodl(long double x, long double y)
long double atan2l(long double y, long double x)
float ldexpf(float x, int iexp)
static double copysign(double __x, double __y)
Definition: math.h:596
long double fdiml(long double x, long double y)
long double modfl(long double x, long double *iptr)
float powf(float x, float y)
double fma(double x, double y, double z)
static float copysignf(float __x, float __y)
Definition: math.h:584
long double sinhl(long double x)
float modff(float x, float *iptr)
long double ceill(long double x)
long double log10l(long double x)
long double acosl(long double x)
long lroundl(long double x)
long double sinl(long double x)
long double expl(long double x)
static long double copysignl(long double __x, long double __y)
Definition: math.h:609
float fdimf(float x, float y)
double fmin(double x, double y)
float fmodf(float x, float y)
long double fmal(long double x, long double y, long double z)
long double logl(long double x)
void sincos(double x, double *psin, double *pcos)
float atan2f(float y, float x)
static int isfinite(double __x)
double modf(double x, double *iptr)
void sincosf(float x, float *psin, float *pcos)