📄 math.h
字号:
extern _ARMABI_SOFTFP float scalbnf(float /*x*/, int /*n*/);
/*
* Compute x times 2^n quickly.
*/
extern _ARMABI_SOFTFP long double scalbnl(long double /*x*/, int /*n*/);
/*
* Compute x times 2^n quickly.
*/
#define signbit(x) \
((sizeof(x) == sizeof(float)) \
? __ARM_signbitf(x) \
: __ARM_signbit(x))
/*
* Returns the signbit of x, size independent macro
*/
extern _ARMABI double significand(double /*x*/);
/*
* Return the fraction part of x, in the range 1.0 to 2.0
* (including 1.0, excluding 2.0).
*/
extern _ARMABI double y0(double /*x*/);
/*
* Bessel function of the second kind, order 0. Returns ERANGE
* if x > 2^52 (total loss of significance).
*/
extern _ARMABI double y1(double /*x*/);
/*
* Bessel function of the second kind, order 1. Returns ERANGE
* if x > 2^52 (total loss of significance).
*/
extern _ARMABI double yn(int /*n*/, double /*x*/);
/*
* Bessel function of the second kind, order n. Returns ERANGE
* if x > 2^52 (total loss of significance).
*/
#endif
/* C99 float versions of functions. math.h has always reserved these
identifiers for this purpose (7.13.4). */
extern _ARMABI_PURE float _fabsf(float); /* old ARM name */
__inline _ARMABI_PURE float fabsf(float __f) { return _fabsf(__f); }
extern _ARMABI float sinf(float /*x*/);
extern _ARMABI float cosf(float /*x*/);
extern _ARMABI float tanf(float /*x*/);
extern _ARMABI float acosf(float /*x*/);
extern _ARMABI float asinf(float /*x*/);
extern _ARMABI float atanf(float /*x*/);
extern _ARMABI float atan2f(float /*y*/, float /*x*/);
extern _ARMABI float sinhf(float /*x*/);
extern _ARMABI float coshf(float /*x*/);
extern _ARMABI float tanhf(float /*x*/);
extern _ARMABI float expf(float /*x*/);
extern _ARMABI float logf(float /*x*/);
extern _ARMABI float log10f(float /*x*/);
extern _ARMABI float powf(float /*x*/, float /*y*/);
extern _ARMABI float sqrtf(float /*x*/);
extern _ARMABI float ldexpf(float /*x*/, int /*exp*/);
extern _ARMABI float frexpf(float /*value*/, int * /*exp*/);
extern _ARMABI_PURE float ceilf(float /*x*/);
extern _ARMABI_PURE float floorf(float /*x*/);
extern _ARMABI float fmodf(float /*x*/, float /*y*/);
extern _ARMABI float modff(float /*value*/, float * /*iptr*/);
#ifdef __cplusplus
extern "C++" {
inline float abs(float __x) { return fabsf(__x); }
inline float acos(float __x) { return acosf(__x); }
inline float asin(float __x) { return asinf(__x); }
inline float atan(float __x) { return atanf(__x); }
inline float atan2(float __y, float __x) { return atan2f(__y,__x); }
inline float ceil(float __x) { return ceilf(__x); }
inline float cos(float __x) { return cosf(__x); }
inline float cosh(float __x) { return coshf(__x); }
inline float exp(float __x) { return expf(__x); }
inline float fabs(float __x) { return fabsf(__x); }
inline float floor(float __x) { return floorf(__x); }
inline float fmod(float __x, float __y) { return fmodf(__x, __y); }
inline float frexp(float __x, int* __exp) { return frexpf(__x, __exp); }
inline float ldexp(float __x, int __exp) { return ldexpf(__x, __exp);}
inline float log(float __x) { return logf(__x); }
inline float log10(float __x) { return log10f(__x); }
inline float modf(float __x, float* __iptr) { return modff(__x, __iptr); }
inline float pow(float __x, float __y) { return powf(__x,__y); }
inline float pow(float __x, int __y) { return powf(__x, (float)__y); }
inline float sin(float __x) { return sinf(__x); }
inline float sinh(float __x) { return sinhf(__x); }
inline float sqrt(float __x) { return sqrtf(__x); }
inline float _sqrt(float __x) { return _sqrtf(__x); }
inline float tan(float __x) { return tanf(__x); }
inline float tanh(float __x) { return tanhf(__x); }
inline double abs(double __x) { return fabs(__x); }
inline double pow(double __x, int __y)
{ return pow(__x, (double) __y); }
inline long double abs(long double __x) // fabsl
{ return (long double)abs((double) __x); }
inline long double acos(long double __x) // acosl
{ return (long double)acos((double) __x); }
inline long double asin(long double __x) // asinl
{ return (long double)asin((double) __x); }
inline long double atan(long double __x) // atanl
{ return (long double)atan((double) __x); }
inline long double atan2(long double __y, long double __x) //atan2l
{ return (long double)atan2((double) __y, (double) __x); }
inline long double ceil(long double __x) // ceill
{ return (long double)ceil((double) __x); }
inline long double cos(long double __x) // cosl
{ return (long double)cos((double) __x); }
inline long double cosh(long double __x) // coshl
{ return (long double)cosh((double) __x); }
inline long double exp(long double __x) // expl
{ return (long double)exp((double) __x); }
inline long double fabs(long double __x) // fabsl
{ return (long double)fabs((double) __x); }
inline long double floor(long double __x) // floorl
{ return (long double)floor((double) __x); }
inline long double fmod(long double __x, long double __y) // fmodl
{ return (long double)fmod((double) __x, (double) __y); }
inline long double frexp(long double __x, int* __p) // frexpl
{ return (long double)frexp((double) __x, __p); }
inline long double ldexp(long double __x, int __exp) // ldexpl
{ return (long double)ldexp((double) __x, __exp); }
inline long double log(long double __x) // logl
{ return (long double)log((double) __x); }
inline long double log10(long double __x) // log10l
{ return (long double)log10((double) __x); }
inline long double modf(long double __x, long double* __p) //modfl
{ return (long double)modf((double) __x, (double *) __p); }
inline long double pow(long double __x, long double __y) // powl
{ return (long double)pow((double) __x, (double) __y); }
inline long double pow(long double __x, int __y)
{ return (long double)pow((double) __x, __y); }
inline long double sin(long double __x) //sinl
{ return (long double)sin((double) __x); }
inline long double sinh(long double __x) // sinhl
{ return (long double)sinh((double) __x); }
inline long double sqrt(long double __x) // sqrtl
{ return (long double)sqrt((double) __x); }
inline long double _sqrt(long double __x) // _sqrtl
{ return (long double)_sqrt((double) __x); }
inline long double tan(long double __x) // tanl
{ return (long double)tan((double) __x); }
inline long double tanh(long double __x) // tanhl
{ return (long double)tanh((double) __x); }
}
#endif
#ifdef __cplusplus
} /* extern "C" */
} /* namespace std */
#endif
#endif /* __MATH_DECLS */
#if !defined(__STRICT_ANSI__) || (defined(__STDC_VERSION__) && 199901L <= __STDC_VERSION__)
#ifdef __ENABLE_LEGACY_MATHLIB
/*
* LEGACY COMPATIBILITY:
* Legacy ilogb functions returned INT_MAX instead of INT_MIN for a NaN
* input. Here we override the functions declared above with macros which
* translate the output, and redeclare FP_ILOGBNAN to return the old value.
* Note: Not a perfect emulation of old behaviour as taking the address of
* ilogb, ilogbf, and ilogbl will still point to the new functions.
*/
extern __inline _ARMABI_SOFTFP int __ARM_legacyilogb(double __x)
{
int __r=(__CLIBNS ilogb)(__x);
return (__r == 0x80000000) ? 0x7fffffff : __r;
}
extern __inline _ARMABI_SOFTFP int __ARM_legacyilogbf(float __x)
{
int __r=(__CLIBNS ilogbf)(__x);
return (__r == 0x80000000) ? 0x7fffffff : __r;
}
extern __inline _ARMABI_SOFTFP int __ARM_legacyilogbl(long double __x)
{
int __r=(__CLIBNS ilogbl)(__x);
return (__r == 0x80000000) ? 0x7fffffff : __r;
}
#define ilogb(x) __ARM_legacyilogb(x)
#define ilogbf(x) __ARM_legacyilogbf(x)
#define ilogbl(x) __ARM_legacyilogbl(x)
#undef FP_ILOGBNAN
#define FP_ILOGBNAN (0x7fffffff)
/*
* We used provide a variant of isfinite called finite, lets provide a
* compatible version here. finite(x) always assumed its parameters were
* doubles
*/
#define finite(x) __ARM_isfinite(x)
/*
* The legacy isnan used to assume its arguments were doubles
*/
#undef isnan
#define isnan(x) __ARM_isnan(x)
#endif /* MATHLIB_LEGACY */
#endif
#if defined(__cplusplus) && !defined(__MATH_NO_EXPORTS)
using ::std::__use_accurate_range_reduction;
using ::std::abs;
using ::std::acos;
using ::std::asin;
using ::std::atan2;
using ::std::atan;
using ::std::ceil;
using ::std::cos;
using ::std::cosh;
using ::std::exp;
using ::std::fabs;
using ::std::floor;
using ::std::fmod;
using ::std::frexp;
using ::std::ldexp;
using ::std::log10;
using ::std::log;
using ::std::modf;
using ::std::pow;
using ::std::sin;
using ::std::sinh;
using ::std::sqrt;
using ::std::sqrtf;
using ::std::_sqrt;
using ::std::_sqrtf;
using ::std::tan;
using ::std::tanh;
using ::std::_fabsf;
#if !defined(__STRICT_ANSI__) || (defined(__STDC_VERSION__) && 199901L <= __STDC_VERSION__)
/* C99 additions */
using ::std::float_t;
using ::std::double_t;
using ::std::acosh;
using ::std::asinh;
using ::std::atanh;
using ::std::cbrt;
using ::std::copysign;
using ::std::copysignf;
using ::std::erf;
using ::std::erfc;
using ::std::expm1;
using ::std::gamma;
using ::std::gamma_r;
using ::std::hypot;
using ::std::ilogb;
using ::std::ilogbf;
using ::std::ilogbl;
using ::std::j0;
using ::std::j1;
using ::std::jn;
using ::std::lgamma;
using ::std::lgamma_r;
using ::std::log1p;
using ::std::logb;
using ::std::logbf;
using ::std::logbl;
using ::std::nextafter;
using ::std::nextafterf;
using ::std::nextafterl;
using ::std::nexttoward;
using ::std::nexttowardf;
using ::std::nexttowardl;
using ::std::remainder;
using ::std::rint;
using ::std::scalb;
using ::std::scalbln;
using ::std::scalblnf;
using ::std::scalblnl;
using ::std::scalbn;
using ::std::scalbnf;
using ::std::scalbnl;
using ::std::significand;
using ::std::y0;
using ::std::y1;
using ::std::yn;
/* C99 float versions */
using ::std::fabsf;
using ::std::sinf;
using ::std::cosf;
using ::std::tanf;
using ::std::acosf;
using ::std::asinf;
using ::std::atanf;
using ::std::atan2f;
using ::std::sinhf;
using ::std::coshf;
using ::std::tanhf;
using ::std::expf;
using ::std::logf;
using ::std::log10f;
using ::std::powf;
using ::std::ldexpf;
using ::std::frexpf;
using ::std::fmodf;
using ::std::modff;
using ::std::ceilf;
using ::std::floorf;
#endif
#endif
#endif /* __math_h */
/* end of math.h */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -