/* IBM_PROLOG_BEGIN_TAG */ /* This is an automatically generated prolog. */ /* */ /* bos72X src/bos/usr/include/math.h 1.28.14.8 */ /* */ /* Licensed Materials - Property of IBM */ /* */ /* COPYRIGHT International Business Machines Corp. 1985,2021 */ /* All Rights Reserved */ /* */ /* US Government Users Restricted Rights - Use, duplication or */ /* disclosure restricted by GSA ADP Schedule Contract with IBM Corp. */ /* */ /* IBM_PROLOG_END_TAG */ /* "@(#)30 1.28.14.8 src/bos/usr/include/math.h, libm, bos72X, x2021_29A6 7/14/21 11:08:32" */ /* * COMPONENT_NAME: (LIBM) math header file * * FUNCTIONS: * * ORIGINS: 27 * * (C) COPYRIGHT International Business Machines Corp. 1985, 2007 * All Rights Reserved * Licensed Materials - Property of IBM * * US Government Users Restricted Rights - Use, duplication or * disclosure restricted by GSA ADP Schedule Contract with IBM Corp. */ #ifndef _H_MATH #define _H_MATH #ifndef _H_STANDARDS #include #endif #include #if defined(__IBMCPP__) extern "C++" { # ifdef __MATH__ extern "C" { inline double _NOTHROW(acos, (double)); inline double _NOTHROW(asin, (double)); inline double _NOTHROW(atan, (double)); inline double _NOTHROW(atan2, (double, double)); inline double _NOTHROW(cos, (double)); inline double _NOTHROW(exp, (double)); inline double _NOTHROW(fabs, (double)); inline double _NOTHROW(log, (double)); inline double _NOTHROW(log10, (double)); inline double _NOTHROW(sin, (double)); inline double _NOTHROW(sqrt, (double)); inline double _NOTHROW(tan, (double)); #if (__xlC__ >= 0x0800) /* VAC version 8 and above */ inline double _NOTHROW(cosh, (double)); inline double _NOTHROW(sinh, (double)); inline double _NOTHROW(tanh, (double)); inline double _NOTHROW(pow, (double, double)); inline double _NOTHROW(acosh, (double)); inline double _NOTHROW(asinh, (double)); inline double _NOTHROW(atanh, (double)); inline double _NOTHROW(cbrt, (double)); inline double _NOTHROW(expm1, (double)); inline double _NOTHROW(log1p, (double)); #endif /* __xlC__ >= 0x0800 */ inline float _NOTHROW(floorf, (float)); inline double _NOTHROW(floor, (double)); inline long double _NOTHROW(floorl, (long double)); inline float _NOTHROW(ceilf, (float)); inline double _NOTHROW(ceil, (double)); inline long double _NOTHROW(ceill, (long double)); }; # if defined(__XLC121__) && defined (_ALL_SOURCE) extern "C" { inline double _NOTHROW(copysign, (double, double)); }; # endif /* def __XLC121__ */ # endif /* def __MATH__ */ } #endif /* __IBMCPP__ */ #ifdef __cplusplus extern "C" { #endif /* * The ANSI standard requires that certain values be in math.h. * It also requires that if _ANSI_C_SOURCE is defined then ONLY these * values are present. * * This header includes all the ANSI required entries. In addition * other entries for the AIX system are included. * */ /* * ANSI required entries in math.h * */ #ifdef _ANSI_C_SOURCE extern unsigned _DBLINF[2]; static const unsigned int _SINFINITY = 0x7f800000; static const unsigned int _SQNAN = 0x7fc00000; #define HUGE_VAL (*((double *)(_DBLINF))) #ifdef _ISOC99_SOURCE /* The types float_t and double_t are intended to be the implementation's * most efficient types at least as wide as float and double, respectively. * That's double for POWER. */ typedef double float_t; typedef double double_t; #if __has_builtin(__builtin_inff) #define INFINITY (__builtin_inff()) #else #define INFINITY (*((float *)(&_SINFINITY))) #endif #if __has_builtin(__builtin_nanf) #define NAN (__builtin_nanf("")) #else #define NAN (*((float *)(&_SQNAN))) #endif #define HUGE_VALF INFINITY #define HUGE_VALL HUGE_VAL #ifndef _FP_CLASSVALS /* Also cdeclared in float.h */ #define FP_PLUS_NORM 0 #define FP_MINUS_NORM 1 #define FP_PLUS_ZERO 2 #define FP_MINUS_ZERO 3 #define FP_PLUS_INF 4 #define FP_MINUS_INF 5 #define FP_PLUS_DENORM 6 #define FP_MINUS_DENORM 7 #define FP_SNAN 8 #define FP_QNAN 9 #endif /* _FP_CLASSVALS */ #define FP_INFINITE FP_PLUS_INF #define FP_NAN FP_QNAN #define FP_NORMAL FP_PLUS_NORM #define FP_SUBNORMAL FP_PLUS_DENORM #define FP_ZERO FP_PLUS_ZERO #define FP_ILOGB0 (-2147483647 - 1) /* INT_MIN */ #define FP_ILOGBNAN (2147483647) /* INT_MAX */ #define MATH_ERRNO 1 #define MATH_ERREXCEPT 2 #define math_errhandling MATH_ERRNO /* PowerPC has a combined multiply/add instruction, so we can define the fast fma macros. */ #if !defined(__xlC__) || (__xlC__ >= 0x1100) || defined(__ibmxl__) #define FP_FAST_FMA 1 #define FP_FAST_FMAF 1 #define FP_FAST_FMAL 1 #endif /* !defined(__xlC__) || (__xlC__ >= 0x1100) || defined(__ibmxl__) */ #endif #ifdef _NO_PROTO extern double _NOTHROW(acos, ()); extern double _NOTHROW(asin, ()); extern double _NOTHROW(atan, ()); extern double _NOTHROW(atan2, ()); extern double _NOTHROW(ceil, ()); extern double _NOTHROW(copysign, ()); extern double _NOTHROW(cos, ()); extern double _NOTHROW(cosh, ()); extern double _NOTHROW(exp, ()); extern double _NOTHROW(fabs, ()); extern double _NOTHROW(floor, ()); extern double _NOTHROW(fmod, ()); extern double _NOTHROW(frexp, ()); extern double _NOTHROW(ldexp, ()); extern double _NOTHROW(log, ()); extern double _NOTHROW(log10, ()); extern double _NOTHROW(modf, ()); extern double _NOTHROW(pow, ()); extern double _NOTHROW(sin, ()); extern double _NOTHROW(sinh, ()); extern double _NOTHROW(sqrt, ()); extern double _NOTHROW(tan, ()); extern double _NOTHROW(tanh, ()); extern double _NOTHROW(trunc, ()); /* Symbols new in C99 */ #ifdef _ISOC99_SOURCE extern float _NOTHROW(acosf, ()); extern float _NOTHROW(acoshf, ()); extern long double _NOTHROW(acoshl, ()); extern float _NOTHROW(asinf, ()); extern float _NOTHROW(asinhf, ()); extern long double _NOTHROW(asinhl, ()); extern float _NOTHROW(atan2f, ()); extern long double _NOTHROW(atan2l, ()); extern float _NOTHROW(atanf, ()); extern float _NOTHROW(atanhf, ()); extern long double _NOTHROW(atanhl, ()); extern float _NOTHROW(cbrtf, ()); extern long double _NOTHROW(cbrtl, ()); extern float _NOTHROW(ceilf, ()); extern float _NOTHROW(copysignf, ()); extern long double _NOTHROW(copysignl, ()); extern float _NOTHROW(cosf, ()); extern float _NOTHROW(coshf, ()); extern float _NOTHROW(erfcf, ()); extern float _NOTHROW(erff, ()); extern double _NOTHROW(exp2, ()); extern float _NOTHROW(exp2f, ()); extern long double _NOTHROW(exp2l, ()); extern float _NOTHROW(expf, ()); extern float _NOTHROW(expm1f, ()); extern long double _NOTHROW(expm1l, ()); extern float _NOTHROW(fabsf, ()); extern double _NOTHROW(fdim, ()); extern float _NOTHROW(fdimf, ()); extern long double _NOTHROW(fdiml, ()); extern float _NOTHROW(floorf, ()); extern double _NOTHROW(fma, ()); extern float _NOTHROW(fmaf, ()); extern long double _NOTHROW(fmal, ()); extern double _NOTHROW(fmax, ()); extern float _NOTHROW(fmaxf, ()); extern long double _NOTHROW(fmaxl, ()); extern double _NOTHROW(fmin, ()); extern float _NOTHROW(fminf, ()); extern long double _NOTHROW(fminl, ()); extern float _NOTHROW(fmodf, ()); extern float _NOTHROW(frexpf, ()); extern float _NOTHROW(hypotf, ()); extern long double _NOTHROW(hypotl, ()); extern int _NOTHROW(ilogbf, ()); extern int _NOTHROW(ilogbl, ()); extern float _NOTHROW(ldexpf, ()); extern float _NOTHROW(lgammaf, ()); #ifdef _LONG_LONG extern long long int _NOTHROW(llrint, ()); extern long long int _NOTHROW(llrintf, ()); extern long long int _NOTHROW(llrintl, ()); extern long long int _NOTHROW(llround, ()); extern long long int _NOTHROW(llroundf, ()); extern long long int _NOTHROW(llroundl, ()); #endif extern float _NOTHROW(log10f, ()); extern long double _NOTHROW(log10l, ()); extern float _NOTHROW(log1pf, ()); extern long double _NOTHROW(log1pl, ()); extern float _NOTHROW(log2f, ()); extern double _NOTHROW(log2, ()); extern long double _NOTHROW(log2l, ()); extern float _NOTHROW(logbf, ()); extern long double _NOTHROW(logbl, ()); extern float _NOTHROW(logf, ()); extern long int _NOTHROW(lrint, ()); extern long int _NOTHROW(lrintf, ()); extern long int _NOTHROW(lrintl, ()); extern long int _NOTHROW(lround, ()); extern long int _NOTHROW(lroundf, ()); extern long int _NOTHROW(lroundl, ()); extern float _NOTHROW(modff, ()); extern double _NOTHROW(nan, ()); extern float _NOTHROW(nanf, ()); extern long double _NOTHROW(nanl, ()); extern double _NOTHROW(nearbyint, ()); extern float _NOTHROW(nearbyintf, ()); extern long double _NOTHROW(nearbyintl, ()); extern float _NOTHROW(nextafterf, ()); extern long double _NOTHROW(nextafterl, ()); extern double _NOTHROW(nexttoward, ()); extern float _NOTHROW(nexttowardf, ()); extern long double _NOTHROW(nexttowardl, ()); extern float _NOTHROW(powf, ()); extern float _NOTHROW(remainderf, ()); extern long double _NOTHROW(remainderl, ()); extern double _NOTHROW(remquo, ()); extern float _NOTHROW(remquof, ()); extern long double _NOTHROW(remquol, ()); extern float _NOTHROW(rintf, ()); extern long double _NOTHROW(rintl, ()); extern double _NOTHROW(round, ()); extern float _NOTHROW(roundf, ()); extern long double _NOTHROW(roundl, ()); extern double _NOTHROW(scalbln, ()); extern float _NOTHROW(scalblnf, ()); extern long double _NOTHROW(scalblnl, ()); extern double _NOTHROW(scalbn, ()); extern float _NOTHROW(scalbnf, ()); extern long double _NOTHROW(scalbnl, ()); extern float _NOTHROW(sinf, ()); extern float _NOTHROW(sinhf, ()); extern float _NOTHROW(sqrtf, ()); extern float _NOTHROW(tanf, ()); extern float _NOTHROW(tanhf, ()); extern double _NOTHROW(tgamma, ()); extern float _NOTHROW(tgammaf, ()); extern long double _NOTHROW(tgammal, ()); extern float _NOTHROW(truncf, ()); extern long double _NOTHROW(truncl, ()); #endif /* * The following interfaces are available only for the * non-default 128-bit long double mode. By default long * double is the same as double (64-bit) and should use the * the double precision versions of these routines. * * Many of these routine may not actually exist. The standards interfaces * are redefined in 128-mode later in this file. The redefinitions are * are added here to cause link errors rather than runtime errors * when attempting to use these routines in 128-bit long double mode. * Without these redefinitions the 64-bit versions in the libraries * would be invoked at runtime. */ #ifdef __LONGDOUBLE128 long double _NOTHROW(__acosl128, ()); long double _NOTHROW(__asinl128, ()); long double _NOTHROW(__atanl128, ()); long double _NOTHROW(__atan2l128, ()); long double _NOTHROW(__cosl128, ()); long double _NOTHROW(__coshl128, ()); long double _NOTHROW(__sinl128, ()); long double _NOTHROW(__sinhl128, ()); long double _NOTHROW(__tanl128, ()); long double _NOTHROW(__tanhl128, ()); long double _NOTHROW(__expl128, ()); long double _NOTHROW(__logl128, ()); long double _NOTHROW(__log10l128, ()); long double _NOTHROW(__powl128, ()); long double _NOTHROW(__sqrtl128, ()); long double _NOTHROW(__ceill128, ()); long double _NOTHROW(__fabsl128, ()); long double _NOTHROW(__floorl128, ()); long double _NOTHROW(__fmodl128, ()); long double _NOTHROW(frexpl, ()); long double _NOTHROW(ldexpl, ()); long double _NOTHROW(modfl, ()); #endif /* #ifdef __LONGDOUBLE128 */ #else /*_NO_PROTO */ /* Use ANSI C required prototyping */ extern double _NOTHROW(acos, (double)); extern double _NOTHROW(asin, (double)); extern double _NOTHROW(atan, (double)); extern double _NOTHROW(atan2, (double,double)); extern double _NOTHROW(ceil, (double)); extern double _NOTHROW(copysign, (double, double)); extern double _NOTHROW(cos, (double)); extern double _NOTHROW(cosh, (double)); extern double _NOTHROW(exp, (double)); extern double _NOTHROW(fabs, (double)); extern double _NOTHROW(floor, (double)); extern double _NOTHROW(fmod, (double, double)); extern double _NOTHROW(frexp, (double, int *)); extern double _NOTHROW(ldexp, (double, int)); extern double _NOTHROW(log, (double)); extern double _NOTHROW(log10, (double)); extern double _NOTHROW(modf, (double, double *)); extern double _NOTHROW(pow, (double, double)); extern double _NOTHROW(sin, (double)); extern double _NOTHROW(sinh, (double)); extern double _NOTHROW(sqrt, (double)); extern double _NOTHROW(tan, (double)); extern double _NOTHROW(tanh, (double)); extern double _NOTHROW(trunc, (double)); extern double _NOTHROW(acosh, (double)); extern double _NOTHROW(asinh, (double)); extern double _NOTHROW(atanh, (double)); extern double _NOTHROW(cbrt, (double)); extern double _NOTHROW(expm1, (double)); extern double _NOTHROW(log1p, (double)); /* Symbols new in C99 */ #if defined(_ISOC99_SOURCE) || defined(__cplusplus) #if !defined(_ISOC99_SOURCE) && !defined(__LONGDOUBLE128) extern long double _NOTHROW(frexpl, (long double , int *)); extern long double _NOTHROW(ldexpl, (long double , int )); extern long double _NOTHROW(modfl, (long double , long double *)); #endif extern float _NOTHROW(acosf, (float)); extern float _NOTHROW(acoshf, (float)); extern long double _NOTHROW(acoshl, (long double)); extern long double _NOTHROW(acosl, (long double)); extern float _NOTHROW(asinf, (float)); extern float _NOTHROW(asinhf, (float)); extern long double _NOTHROW(asinhl, (long double)); extern long double _NOTHROW(asinl, (long double)); extern float _NOTHROW(atan2f, (float, float)); extern long double _NOTHROW(atan2l, (long double, long double)); extern float _NOTHROW(atanf, (float)); extern float _NOTHROW(atanhf, (float)); extern long double _NOTHROW(atanhl, (long double)); extern long double _NOTHROW(atanl, (long double)); extern float _NOTHROW(cbrtf, (float)); extern long double _NOTHROW(cbrtl, (long double)); extern float _NOTHROW(ceilf, (float)); extern long double _NOTHROW(ceill, (long double)); extern float _NOTHROW(copysignf, (float, float)); extern long double _NOTHROW(copysignl, (long double, long double)); extern float _NOTHROW(cosf, (float)); extern float _NOTHROW(coshf, (float)); extern long double _NOTHROW(coshl, (long double)); extern long double _NOTHROW(cosl, (long double)); extern float _NOTHROW(erfcf, (float)); extern long double _NOTHROW(erfcl, (long double)); extern float _NOTHROW(erff, (float)); extern long double _NOTHROW(erfl, (long double)); extern double _NOTHROW(exp2, (double)); extern float _NOTHROW(exp2f, (float)); extern long double _NOTHROW(exp2l, (long double)); extern float _NOTHROW(expf, (float)); extern long double _NOTHROW(expl, (long double)); extern float _NOTHROW(expm1f, (float)); extern long double _NOTHROW(expm1l, (long double)); extern float _NOTHROW(fabsf, (float)); extern long double _NOTHROW(fabsl, (long double)); extern double _NOTHROW(fdim, (double, double)); extern float _NOTHROW(fdimf, (float, float)); extern long double _NOTHROW(fdiml, (long double, long double)); extern float _NOTHROW(floorf, (float)); extern long double _NOTHROW(floorl, (long double)); extern double _NOTHROW(fma, (double, double, double)); extern float _NOTHROW(fmaf, (float, float, float)); extern long double _NOTHROW(fmal, (long double, long double, long double)); extern double _NOTHROW(fmax, (double, double)); extern float _NOTHROW(fmaxf, (float, float)); extern long double _NOTHROW(fmaxl, (long double, long double)); extern double _NOTHROW(fmin, (double, double)); extern float _NOTHROW(fminf, (float, float)); extern long double _NOTHROW(fminl, (long double, long double)); extern float _NOTHROW(fmodf, (float, float)); extern long double _NOTHROW(fmodl, (long double, long double)); extern float _NOTHROW(frexpf, (float, int *)); extern float _NOTHROW(hypotf, (float, float)); extern long double _NOTHROW(hypotl, (long double, long double)); extern int _NOTHROW(ilogbf, (float)); extern int _NOTHROW(ilogbl, (long double )); extern float _NOTHROW(ldexpf, (float, int)); extern float _NOTHROW(lgammaf, (float)); extern long double _NOTHROW(lgammal, (long double)); #ifdef _LONG_LONG extern long long int _NOTHROW(llrint, (double)); extern long long int _NOTHROW(llrintf, (float)); extern long long int _NOTHROW(llrintl, (long double)); extern long long int _NOTHROW(llround, (double)); extern long long int _NOTHROW(llroundf, (float)); extern long long int _NOTHROW(llroundl, (long double)); #endif extern float _NOTHROW(log10f, (float)); extern long double _NOTHROW(log10l, (long double)); extern float _NOTHROW(log1pf, (float)); extern long double _NOTHROW(log1pl, (long double)); extern float _NOTHROW(log2f, (float)); extern double _NOTHROW(log2, (double)); extern long double _NOTHROW(log2l, (long double)); extern float _NOTHROW(logbf, (float)); extern long double _NOTHROW(logbl, (long double)); extern float _NOTHROW(logf, (float)); extern long double _NOTHROW(logl, (long double)); extern long int _NOTHROW(lrint, (double)); extern long int _NOTHROW(lrintf, (float)); extern long int _NOTHROW(lrintl, (long double)); extern long int _NOTHROW(lround, (double)); extern long int _NOTHROW(lroundf, (float)); extern long int _NOTHROW(lroundl, (long double)); extern float _NOTHROW(modff, (float, float *)); extern double _NOTHROW(nan, (const char *)); extern float _NOTHROW(nanf, (const char *)); extern long double _NOTHROW(nanl, (const char *)); extern double _NOTHROW(nearbyint, (double)); extern float _NOTHROW(nearbyintf, (float)); extern long double _NOTHROW(nearbyintl, (long double)); extern float _NOTHROW(nextafterf, (float, float)); extern long double _NOTHROW(nextafterl, (long double, long double)); extern double _NOTHROW(nexttoward, (double, long double)); extern float _NOTHROW(nexttowardf, (float, long double)); extern long double _NOTHROW(nexttowardl, (long double, long double)); extern float _NOTHROW(powf, (float, float)); extern long double _NOTHROW(powl, (long double, long double)); extern float _NOTHROW(remainderf, (float, float)); extern long double _NOTHROW(remainderl, (long double, long double)); extern double _NOTHROW(remquo, (double, double, int *)); extern float _NOTHROW(remquof, (float, float, int *)); extern long double _NOTHROW(remquol, (long double, long double, int *)); extern float _NOTHROW(rintf, (float)); extern long double _NOTHROW(rintl, (long double)); extern double _NOTHROW(round, (double)); extern float _NOTHROW(roundf, (float)); extern long double _NOTHROW(roundl, (long double)); extern double _NOTHROW(scalbln, (double, long)); extern float _NOTHROW(scalblnf, (float, long)); extern long double _NOTHROW(scalblnl, (long double, long)); extern double _NOTHROW(scalbn, (double, int)); extern float _NOTHROW(scalbnf, (float, int)); extern long double _NOTHROW(scalbnl, (long double, int)); extern float _NOTHROW(sinf, (float)); extern float _NOTHROW(sinhf, (float)); extern long double _NOTHROW(sinhl, (long double)); extern long double _NOTHROW(sinl, (long double)); extern float _NOTHROW(sqrtf, (float)); extern long double _NOTHROW(sqrtl, (long double)); extern float _NOTHROW(tanf, (float)); extern float _NOTHROW(tanhf, (float)); extern long double _NOTHROW(tanhl, (long double)); extern long double _NOTHROW(tanl, (long double)); extern double _NOTHROW(tgamma, (double)); extern float _NOTHROW(tgammaf, (float)); extern long double _NOTHROW(tgammal, (long double)); extern float _NOTHROW(truncf, (float)); extern long double _NOTHROW(truncl, (long double)); #endif #ifdef __LONGDOUBLE128 long double _NOTHROW(__acosl128, (long double)); long double _NOTHROW(__asinl128, (long double)); long double _NOTHROW(__atanl128, (long double)); long double _NOTHROW(__atan2l128, (long double , long double)); long double _NOTHROW(__cosl128, (long double)); long double _NOTHROW(__coshl128, (long double)); long double _NOTHROW(__sinl128, (long double)); long double _NOTHROW(__sinhl128, (long double)); long double _NOTHROW(__tanl128, (long double)); long double _NOTHROW(__tanhl128, (long double)); long double _NOTHROW(__exp2l128, (long double)); long double _NOTHROW(__expl128, (long double)); long double _NOTHROW(__logl128, (long double)); long double _NOTHROW(__log10l128, (long double)); long double _NOTHROW(__powl128, (long double , long double)); long double _NOTHROW(__sqrtl128, (long double)); long double _NOTHROW(__ceill128, (long double)); long double _NOTHROW(__copysignl128, (long double, long double)); long double _NOTHROW(__fabsl128, (long double)); long double _NOTHROW(__fdiml128, (long double, long double)); long double _NOTHROW(__floorl128, (long double)); long double _NOTHROW(__fmal128, (long double, long double, long double)); long double _NOTHROW(__fmaxl128, (long double, long double)); long double _NOTHROW(__fminl128, (long double, long double)); long double _NOTHROW(__fmodl128, (long double , long double)); #ifdef _LONG_LONG long long int _NOTHROW(__llrintl128, (long double)); long long int _NOTHROW(__llroundl128, (long double)); #endif long double _NOTHROW(__log2l128, (long double)); long int _NOTHROW(__lrintl128, (long double)); long int _NOTHROW(__lroundl128, (long double)); long double _NOTHROW(__nanl128, (const char *)); long double _NOTHROW(__nearbyintl128, (long double)); double _NOTHROW(__nexttoward128, (double, long double)); float _NOTHROW(__nexttowardf128, (float, long double)); long double _NOTHROW(__nexttowardl128, (long double, long double)); long double _NOTHROW(__remquol128, (long double, long double, int *)); long double _NOTHROW(__roundl128, (long double)); long double _NOTHROW(__scalblnl128, (long double, long)); long double _NOTHROW(__scalbnl128, (long double, int)); long double _NOTHROW(__tgammal128, (long double)); long double _NOTHROW(__truncl128, (long double)); long double _NOTHROW(frexpl, (long double , /* value */ int *)); /* exponent */ long double _NOTHROW(ldexpl, (long double , /* value */ int)); /* exponent */ long double _NOTHROW(modfl, (long double , /* value */ long double *)); /* integer part */ #endif /* #ifdef __LONGDOUBLE128 */ #endif /*_NO_PROTO */ /* * frexpl(), ldexpl(), and modfl() have preexisting shared versions which are * 128-bit only. 64-bit versions must be made available for C99 for the * default 64-bit long double. These cannot simply be macros because the * actual routines will be the incorrect form in 64-bit mode if the user * forces the actual routines to be used through undef or macro suppression * per the standard. */ #if defined(_ISOC99_SOURCE) && !defined(__LONGDOUBLE128) static long double _NOTHROW(frexpl, (long double __x, int *__i)) { return (long double) frexp((double) __x, __i); } static long double _NOTHROW(ldexpl, (long double __x, int __i)) { return (long double) ldexp((double) __x, __i); } #ifndef __MODFL static long double _NOTHROW(modfl, (long double __x, long double *__y)) { return (long double) modf((double) __x, (double *) __y); } #endif #endif /* * The following macro definitions cause the XLC compiler to inline * these functions whenever possible. __MATH__ is defined by the compiler. */ #ifdef __MATH__ #ifndef __cplusplus #define acos(__x) __acos(__x) #define asin(__x) __asin(__x) #define atan(__x) __atan(__x) #define atan2(__x,__y) __atan2(__x,__y) #define cos(__x) __cos(__x) #define exp(__x) __exp(__x) #define fabs(__x) __fabs(__x) #define log(__x) __log(__x) #define log10(__x) __log10(__x) #define sin(__x) __sin(__x) #define sqrt(__x) __sqrt(__x) #define tan(__x) __tan(__x) #ifdef __IBMC__ #if (__xlC__ >= 0x0600) /* VAC version 6 and above */ #define floor(__x) __floor(__x) #define floorf(__x) __floorf(__x) #define ceil(__x) __ceil(__x) #define ceilf(__x) __ceilf(__x) #endif /* __xlC__ >= 0x0600 */ #if (__xlC__ >= 0x0800) /* VAC version 8 and above */ #define cosh(__x) __cosh(__x) #define cbrtf(__x) __cbrtf(__x) #define cosf(__x) __cosf(__x) #define expm1f(__x) __expm1f(__x) #define fabsf(__x) __fabsf(__x) #define log1pf(__x) __log1pf(__x) #define nanf(__x) __nanf(__x) #define pow(__x,__y) __pow(__x,__y) #define sinf(__x) __sinf(__x) #define sinh(__x) __sinh(__x) #define sqrtf(__x) __sqrtf(__x) #define tanh(__x) __tanh(__x) #endif /* __xlC__ >= 0x0800 */ /* There is a change in the naming of the first * release from '0' to '1' starting from V10. * e.g., the first release of V11 is V11.1, instead of V11.0 */ #if (__xlC__ >= 0x0b01) /* VAC version 11 and above */ #define exp2f(__x) __exp2f(__x) #define expf(__x) __expf(__x) #define logf(__x) __logf(__x) #define powf(__x,__y) __powf(__x,__y) #endif /* __xlC__ >= 0x0b01 */ #if (__xlC__ >= 0x0d01) /* VAC version 13 and above */ #define frexp(__x, __y) __frexp(__x, __y) #define ldexp(__x, __y) __ldexp(__x, __y) #define frexpf(__x, __y) __frexpf(__x, __y) #define ldexpf(__x, __y) __ldexpf(__x, __y) #endif /* __xlC__ >= 0x0d01 */ #endif /* __IBMC__ */ #else /* __cplusplus */ extern "C" { extern "builtin" double __acos(double); extern "builtin" double __asin(double); extern "builtin" double __atan(double); extern "builtin" double __atan2(double, double); extern "builtin" double __cos(double); extern "builtin" double __exp(double); extern "builtin" double __fabs(double); extern "builtin" double __log(double); extern "builtin" double __log10(double); extern "builtin" double __sin(double); extern "builtin" double __sqrt(double); extern "builtin" double __tan(double); #ifdef __IBMCPP__ #if (__xlC__ >= 0x0600) /* VAC version 6 and above */ extern "builtin" double __floor(double); extern "builtin" float __floorf(float); extern "builtin" long double __floorl(long double); extern "builtin" double __ceil(double); extern "builtin" float __ceilf(float); extern "builtin" long double __ceill(long double); #endif /* __xlC__ >=0x600 */ #if (__xlC__ >= 0x0800) /* VAC version 8 and above */ extern "builtin" float __cbrtf(float); extern "builtin" float __cosf(float); extern "builtin" double __cosh(double); extern "builtin" float __expm1f(float); extern "builtin" float __fabsf(float); extern "builtin" float __log1pf(float); extern "builtin" float __nanf(const char *); extern "builtin" double __pow(double, double); extern "builtin" float __sinf(float); extern "builtin" double __sinh(double); extern "builtin" float __sqrtf(float); extern "builtin" double __tanh(double); #endif /* __xlC__ >= 0x0800 */ #if (__xlC__ >= 0x0b01) /* VAC version 11 and above */ extern "builtin" float __exp2f(float); extern "builtin" float __expf(float); extern "builtin" float __logf(float); extern "builtin" float __powf(float, float); #endif /* __xlC__ >= 0x0b01 */ #if (__xlC__ >= 0x0d01) /* VAC version 13 and above */ extern "builtin" double __frexp(double, int *); extern "builtin" double __ldexp(double, int); extern "builtin" float __frexpf(float, int *); extern "builtin" float __ldexpf(float, int); #endif /* __xlC__ >= 0x0d01 */ #endif /* def __IBMCPP__ */ inline double _NOTHROW(acos, (double __x)) {return __acos(__x);} inline double _NOTHROW(asin, (double __x)) {return __asin(__x);} inline double _NOTHROW(atan, (double __x)) {return __atan(__x);} inline double _NOTHROW(atan2, (double __x, double __y)) {return __atan2(__x,__y);} inline double _NOTHROW(cos, (double __x)) {return __cos(__x);} inline double _NOTHROW(exp, (double __x)) {return __exp(__x);} inline double _NOTHROW(fabs, (double __x)) {return __fabs(__x);} inline double _NOTHROW(log, (double __x)) {return __log(__x);} inline double _NOTHROW(log10, (double __x)) {return __log10(__x);} inline double _NOTHROW(sin, (double __x)) {return __sin(__x);} inline double _NOTHROW(sqrt, (double __x)) {return __sqrt(__x);} inline double _NOTHROW(tan, (double __x)) {return __tan(__x);} #ifdef __IBMCPP__ #if (__xlC__ >= 0x0600) /* VAC version 6 and above */ inline double _NOTHROW(floor, (double __x)) { return __floor(__x); } inline float _NOTHROW(floorf, (float __x)) { return __floorf(__x); } inline long double _NOTHROW(floorl, (long double __x)) { return __floorl(__x); } inline double _NOTHROW(ceil, (double __x)) { return __ceil(__x); } inline float _NOTHROW(ceilf, (float __x)) { return __ceilf(__x); } inline long double _NOTHROW(ceill, (long double __x)) { return __ceill(__x); } #endif #if (__xlC__ >= 0x0800) /* VAC version 8 and above */ inline float _NOTHROW(cbrtf, (float __x)) {return __cbrtf(__x);} inline double _NOTHROW(cosh, (double __x)) {return __cosh(__x);} inline float _NOTHROW(cosf, (float __x)) {return __cosf(__x);} inline float _NOTHROW(expm1f, (float __x)) {return __expm1f(__x);} inline float _NOTHROW(fabsf, (float __x)) {return __fabsf(__x);} inline float _NOTHROW(log1pf, (float __x)) {return __log1pf(__x);} inline float _NOTHROW(nanf, (const char * __x)) {return __nanf(__x);} inline double _NOTHROW(pow, (double __x, double __y)) {return __pow(__x, __y);} inline double _NOTHROW(sinh, (double __x)) {return __sinh(__x);} inline float _NOTHROW(sinf, (float __x)) {return __sinf(__x);} inline double _NOTHROW(tanh, (double __x)) {return __tanh(__x);} inline float _NOTHROW(sqrtf, (float __x)) {return __sqrtf(__x);} #endif #if (__xlC__ >= 0x0b01) /* VAC version 11 and above */ inline float _NOTHROW(exp2f, (float __x)) {return __exp2f(__x);} inline float _NOTHROW(expf, (float __x)) {return __expf(__x);} inline float _NOTHROW(logf, (float __x)) {return __logf(__x);} inline float _NOTHROW(powf, (float __x, float __y)) {return __powf(__x, __y);} #endif /* __xlC__ >= 0x0b01 */ #if (__xlC__ >= 0x0d01) /* VAC version 13 and above */ inline double _NOTHROW(frexp, (double __x, int *__y)) {return __frexp(__x, __y);} inline double _NOTHROW(ldexp, (double __x, int __y)) {return __ldexp(__x, __y);} inline float _NOTHROW(frexpf, (float __x, int *__y)) {return __frexpf(__x, __y);} inline float _NOTHROW(ldexpf, (float __x, int __y)) {return __ldexpf(__x, __y);} #endif /* __xlC__ >= 0x0d01 */ #endif } # ifdef __COMPAT__ inline int sqr(int __x) {return(__x*__x);} inline double sqr(double __x) {return(__x*__x);} # endif /* def __COMPAT__ */ #endif /* __cplusplus */ #endif /* __MATH__ */ #if defined(_ISOC99_SOURCE) || defined(__cplusplus) #ifndef __cplusplus #ifdef __LONGDOUBLE128 #define acosl(__x) __acosl128((long double) (__x)) #define asinl(__x) __asinl128((long double) (__x)) #define atan2l(__x, __y) __atan2l128((long double) (__x), (long double) (__y)) #define atanl(__x) __atanl128((long double) (__x)) #define ceill(__x) __ceill128((long double) (__x)) #define copysignl(__x, __y) __copysignl128((long double) (__x), (long double) (__y)) #define coshl(__x) __coshl128((long double) (__x)) #define cosl(__x) __cosl128((long double) (__x)) #define exp2l(__x) __exp2l128((long double) (__x)) #define expl(__x) __expl128((long double) (__x)) #define fabsl(__x) __fabsl128((long double) (__x)) #define fdiml(__x, __y) __fdiml128((long double) (__x), (long double) (__y)) #define floorl(__x) __floorl128((long double) (__x)) #define fmal(__x, __y, __z) __fmal128((long double) (__x), (long double) (__y), (long double) (__z)) #define fmaxl(__x, __y) __fmaxl128((long double) (__x), (long double) (__y)) #define fminl(__x, __y) __fminl128((long double) (__x), (long double) (__y)) #define fmodl(__x, __y) __fmodl128((long double) (__x), (long double) (__y)) #ifdef _LONG_LONG #define llrintl(__x) __llrintl128((long double) (__x)) #define llroundl(__x) __llroundl128((long double) (__x)) #endif #define log10l(__x) __log10l128((long double) (__x)) #define log2l(__x) __log2l128((long double) (__x)) #define logbl(__x) __logbl128((long double) (__x)) #define logl(__x) __logl128((long double) (__x)) #define lroundl(__x) __lroundl128((long double) (__x)) #define nanl(__x) __nanl128( __x) #define nearbyintl(__x) __nearbyintl128((long double) (__x)) #define nexttoward(__x, __y) __nexttoward128((double) (__x), (long double) (__y)) #define nexttowardf(__x, __y) __nexttowardf128((float) (__x), (long double) (__y)) #define nexttowardl(__x, __y) __nexttowardl128((long double) (__x), (long double) (__y)) #define powl(__x, __y) __powl128((long double) (__x), (long double) (__y)) #define remquol(__x, __y, __z) __remquol128((long double) (__x), (long double) (__y), __z) #define rintl(__x) __rintl128((long double) (__x)) #define roundl(__x) __roundl128((long double) (__x)) #define scalblnl(__x, __y) __scalblnl128((long double) (__x), __y) #define scalbnl(__x, __y) __scalbnl128((long double) (__x), __y) #define sinhl(__x) __sinhl128((long double) (__x)) #define sinl(__x) __sinl128((long double) (__x)) #define sqrtl(__x) __sqrtl128((long double) (__x)) #define tanhl(__x) __tanhl128((long double) (__x)) #define tanl(__x) __tanl128((long double) (__x)) #define tgammal(__x) __tgammal128((long double) (__x)) #define truncl(__x) __truncl128((long double) (__x)) #else /* __LONGDOUBLE128 */ /* Provide direct macros for the long double routines to avoid the * overhead of an extra call. The actual linkable routines simply reinvoke * the routines referenced below. */ #define acosl(__x) acos((double) (__x)) #define asinl(__x) asin((double) (__x)) #define atan2l(__x, __y) atan2((double) (__x), (double) (__y)) #define atanl(__x) atan((double) (__x)) #define ceill(__x) ceil((double) (__x)) #define copysignl(__x, __y) copysign((double) (__x), (double) (__y)) #define coshl(__x) cosh((double) (__x)) #define cosl(__x) cos((double) (__x)) #define exp2l(__x) exp2((double) (__x)) #define expl(__x) exp((double) (__x)) #define fabsl(__x) fabs((double) (__x)) #define fdiml(__x, __y) fdim((double) (__x), (double) (__y)) #define floorl(__x) floor((double) (__x)) #define fmal(__x, __y, __z) fma((double) (__x), (double) (__y), (double) (__z)) #define fmaxl(__x, __y) fmax((double) (__x), (double) (__y)) #define fminl(__x, __y) fmin((double) (__x), (double) (__y)) #define fmodl(__x, __y) fmod((double) (__x), (double) (__y)) #define ilogbl(__x) ilogb((double) (__x)) #ifdef _LONG_LONG #define llrintl(__x) llrint((double) (__x)) #define llroundl(__x) llround((double) (__x)) #endif #define log10l(__x) log10((double) (__x)) #define log2l(__x) log2((double) (__x)) #define logl(__x) log((double) (__x)) #define lrintl(__x) lrint((double) (__x)) #define lroundl(__x) lround((double) (__x)) #define nanl(__x) nan(__x) #define nearbyintl(__x) nearbyint((double) (__x)) #define nextafterl(__x, __y) nextafter((double) (__x), (double) (__y)) #define powl(__x, __y) pow((double) (__x), (double) (__y)) #define remquol(__x, __y, __z) remquo((double) (__x), (double) (__y), __z) #define roundl(__x) round((double) (__x)) #define scalblnl(__x, __y) scalbln((double) (__x), __y) #define scalbnl(__x, __y) scalbn((double) (__x), __y) #define sinhl(__x) sinh((double) (__x)) #define sinl(__x) sin((double) (__x)) #define sqrtl(__x) sqrt((double) (__x)) #define tanhl(__x) tanh((double) (__x)) #define tanl(__x) tan((double) (__x)) #define tgammal(__x) tgamma((double) (__x)) #define truncl(__x) trunc((double) (__x)) #endif /* __LONGDOUBLE128 */ #else /* def __cplusplus */ #ifdef __LONGDOUBLE128 inline long double _NOTHROW(acosl, (long double __x)) { return __acosl128( __x); } inline long double _NOTHROW(asinl, (long double __x)) { return __asinl128( __x); } inline long double _NOTHROW(atan2l, (long double __x, long double __y)) { return __atan2l128( __x, __y); } inline long double _NOTHROW(atanl, (long double __x)) { return __atanl128( __x); } #ifndef __IBMCPP__ #define ceill(__x) __ceill128((long double) (__x)) #define floorl(__x) __floorl128((long double) (__x)) #endif inline long double _NOTHROW(copysignl, (long double __x, long double __y)) { return __copysignl128( __x, __y); } inline long double _NOTHROW(coshl, (long double __x)) { return __coshl128( __x); } inline long double _NOTHROW(cosl, (long double __x)) { return __cosl128( __x); } inline long double _NOTHROW(exp2l, (long double __x)) { return __exp2l128( __x); } inline long double _NOTHROW(expl, (long double __x)) { return __expl128( __x); } inline long double _NOTHROW(fabsl, (long double __x)) { return __fabsl128( __x); } inline long double _NOTHROW(fdiml, (long double __x, long double __y)) { return __fdiml128( __x, __y); } inline long double _NOTHROW(fmal, (long double __x, long double __y, long double __z)) { return __fmal128( __x, __y, (__z)); } inline long double _NOTHROW(fmaxl, (long double __x, long double __y)) { return __fmaxl128( __x, __y); } inline long double _NOTHROW(fminl, (long double __x, long double __y)) { return __fminl128( __x, __y); } inline long double _NOTHROW(fmodl, (long double __x, long double __y)) { return __fmodl128( __x, __y); } #ifdef _LONG_LONG inline long long _NOTHROW(llrintl, (long double __x)) { return __llrintl128( __x); } inline long long _NOTHROW(llroundl, (long double __x)) { return __llroundl128( __x); } #endif inline long double _NOTHROW(log10l, (long double __x)) { return __log10l128( __x); } inline long double _NOTHROW(log2l, (long double __x)) { return __log2l128( __x); } inline long double _NOTHROW(logl, (long double __x)) { return __logl128( __x); } inline long _NOTHROW(lrintl, (long double __x)) { return __lrintl128( __x); } inline long _NOTHROW(lroundl, (long double __x)) { return __lroundl128( __x); } inline long double _NOTHROW(nanl, (const char * __x)) { return __nanl128( __x); } inline long double _NOTHROW(nearbyintl, (long double __x)) { return __nearbyintl128( __x); } inline double _NOTHROW(nexttoward, (double __x, long double __y)) { return __nexttoward128(__x, __y); } inline float _NOTHROW(nexttowardf, (float __x, long double __y)) { return __nexttowardf128(__x, __y); } inline long double _NOTHROW(nexttowardl, (long double __x, long double __y)) { return __nexttowardl128( __x, __y); } inline long double _NOTHROW(powl, (long double __x, long double __y)) { return __powl128( __x, __y); } inline long double _NOTHROW(remquol, (long double __x, long double __y, int *__z)) { return __remquol128( __x, __y, __z); } inline long double _NOTHROW(roundl, (long double __x)) { return __roundl128( __x); } inline long double _NOTHROW(scalblnl, (long double __x, long __y)) { return __scalblnl128( __x, __y); } inline long double _NOTHROW(scalbnl, (long double __x, int __y)) { return __scalbnl128( __x, __y); } inline long double _NOTHROW(sinhl, (long double __x)) { return __sinhl128( __x); } inline long double _NOTHROW(sinl, (long double __x)) { return __sinl128( __x); } inline long double _NOTHROW(sqrtl, (long double __x)) { return __sqrtl128( __x); } inline long double _NOTHROW(tanhl, (long double __x)) { return __tanhl128( __x); } inline long double _NOTHROW(tanl, (long double __x)) { return __tanl128( __x); } inline long double _NOTHROW(tgammal, (long double __x)) { return __tgammal128( __x); } inline long double _NOTHROW(truncl, (long double __x)) { return __truncl128( __x); } #else /* __LONGDOUBLE128 */ /* Provide direct macros for the long double routines to avoid the * overhead of an extra call. The actual linkable routines simply reinvoke * the routines referenced below. */ _FAST_INLINE long double _NOTHROW(acoshl, (long double __x)) { return acosh((double) (__x)); } _FAST_INLINE long double _NOTHROW(acosl, (long double __x)) { return acos((double) (__x)); } _FAST_INLINE long double _NOTHROW(asinhl, (long double __x)) { return asinh((double) (__x)); } _FAST_INLINE long double _NOTHROW(asinl, (long double __x)) { return asin((double) (__x)); } _FAST_INLINE long double _NOTHROW(atan2l, (long double __x, long double __y)) { return atan2((double) (__x), (double) (__y)); } _FAST_INLINE long double _NOTHROW(atanhl, (long double __x)) { return atanh((double) (__x)); } _FAST_INLINE long double _NOTHROW(atanl, (long double __x)) { return atan((double) (__x)); } _FAST_INLINE long double _NOTHROW(cbrtl, (long double __x)) { return cbrt((double) (__x)); } #if !defined(__xlC__) || (__xlC__ >= 0x1100) || defined(__ibmxl__) _FAST_INLINE long double _NOTHROW(ceill, (long double __x)) { return ceil((double) (__x)); } #endif _FAST_INLINE long double _NOTHROW(copysignl, (long double __x, long double __y)) { return copysign((double) (__x), (double) (__y)); } _FAST_INLINE long double _NOTHROW(coshl, (long double __x)) { return cosh((double) (__x)); } _FAST_INLINE long double _NOTHROW(cosl, (long double __x)) { return cos((double) (__x)); } _FAST_INLINE long double _NOTHROW(exp2l, (long double __x)) { return exp2((double) (__x)); } _FAST_INLINE long double _NOTHROW(expl, (long double __x)) { return exp((double) (__x)); } _FAST_INLINE long double _NOTHROW(expm1l, (long double __x)) { return expm1((double) (__x)); } _FAST_INLINE long double _NOTHROW(fabsl, (long double __x)) { return fabs((double) (__x)); } _FAST_INLINE long double _NOTHROW(fdiml, (long double __x, long double __y)) { return fdim((double) (__x), (double) (__y)); } #if !defined(__xlC__) || (__xlC__ >= 0x1100) || defined(__ibmxl__) _FAST_INLINE long double _NOTHROW(floorl, (long double __x)) { return floor((double) (__x)); } #endif _FAST_INLINE long double _NOTHROW(fmal, (long double __x, long double __y, long double __z)) { return fma((double) (__x), (double) (__y), (double) (__z)); } _FAST_INLINE long double _NOTHROW(fmaxl, (long double __x, long double __y)) { return fmax((double) (__x), (double) (__y)); } _FAST_INLINE long double _NOTHROW(fminl, (long double __x, long double __y)) { return fmin((double) (__x), (double) (__y)); } _FAST_INLINE long double _NOTHROW(fmodl, (long double __x, long double __y)) { return fmod((double) (__x), (double) (__y)); } #ifdef _LONG_LONG _FAST_INLINE long _NOTHROW(long llrintl, (long double __x)) { return llrint((double) (__x)); } _FAST_INLINE long _NOTHROW(long llroundl, (long double __x)) { return llround((double) (__x)); } #endif _FAST_INLINE long double _NOTHROW(log10l, (long double __x)) { return log10((double) (__x)); } _FAST_INLINE long double _NOTHROW(log1pl, (long double __x)) { return log1p((double) (__x)); } _FAST_INLINE long double _NOTHROW(log2l, (long double __x)) { return log2((double) (__x)); } _FAST_INLINE long double _NOTHROW(logl, (long double __x)) { return log((double) (__x)); } _FAST_INLINE long _NOTHROW(lrintl, (long double __x)) { return lrint((double) (__x)); } _FAST_INLINE long _NOTHROW(lroundl, (long double __x)) { return lround((double) (__x)); } _FAST_INLINE long double _NOTHROW(nanl, (const char * __x)) { return nan(__x); } _FAST_INLINE long double _NOTHROW(nearbyintl, (long double __x)) { return nearbyint((double) (__x)); } _FAST_INLINE long double _NOTHROW(nexttowardl, (long double __x, long double __y)) { return nexttoward((double) (__x), (double) (__y)); } _FAST_INLINE long double _NOTHROW(powl, (long double __x, long double __y)) { return pow((double) (__x), (double) (__y)); } _FAST_INLINE long double _NOTHROW(remquol, (long double __x, long double __y, int *__z)) { return remquo((double) (__x), (double) (__y), __z); } _FAST_INLINE long double _NOTHROW(roundl, (long double __x)) { return round((double) (__x)); } _FAST_INLINE long double _NOTHROW(scalblnl, (long double __x, long __y)) { return scalbln((double) (__x), __y); } _FAST_INLINE long double _NOTHROW(scalbnl, (long double __x, int __y)) { return scalbn((double) (__x), __y); } _FAST_INLINE long double _NOTHROW(sinhl, (long double __x)) { return sinh((double) (__x)); } _FAST_INLINE long double _NOTHROW(sinl, (long double __x)) { return sin((double) (__x)); } _FAST_INLINE long double _NOTHROW(sqrtl, (long double __x)) { return sqrt((double) (__x)); } _FAST_INLINE long double _NOTHROW(tanhl, (long double __x)) { return tanh((double) (__x)); } _FAST_INLINE long double _NOTHROW(tanl, (long double __x)) { return tan((double) (__x)); } _FAST_INLINE long double _NOTHROW(tgammal, (long double __x)) { return tgamma((double) (__x)); } _FAST_INLINE long double _NOTHROW(truncl, (long double __x)) { return trunc((double) (__x)); } #endif /* __LONGDOUBLE128 */ #endif /* def __cplusplus */ #else /* _ISOC99_SOURCE || __cplusplus */ #ifdef __LONGDOUBLE128 /* If not compiling C99, define the __LONGDOUBLE128 routines which * existed before C99 to use the 128bit version of the routine. */ #define acosl __acosl128 #define asinl __asinl128 #define atanl __atanl128 #define atan2l __atan2l128 #define cosl __cosl128 #define coshl __coshl128 #define sinl __sinl128 #define sinhl __sinhl128 #define tanl __tanl128 #define tanhl __tanhl128 #define expl __expl128 #define logl __logl128 #define log10l __log10l128 #define powl __powl128 #define sqrtl __sqrtl128 #define ceill __ceill128 #define fabsl __fabsl128 #define floorl __floorl128 #define fmodl __fmodl128 #endif /* __LONGDOUBLE128 */ #endif /* _ISOC99_SOURCE */ #ifdef __cplusplus extern "C++" { #if !defined(__COMPATMATH__) && !defined(__LIBC_NO_CPP_MATH_OVERLOADS__) /* If C++ standard library implementations may not want math.h C++ overloads */ /*============================================================================*/ inline double _NOTHROW(abs, (double d)) { return fabs(d); } inline float _NOTHROW(abs, (float _X)) { return fabsf(_X); } inline float _NOTHROW(acos, (float _X)) { return acosf(_X); } inline float _NOTHROW(asin, (float _X)) { return asinf(_X); } inline float _NOTHROW(atan, (float _X)) { return atanf(_X); } inline float _NOTHROW(atan2, (float _X, float _Y)) { return atan2f(_X, _Y); } inline float _NOTHROW(ceil, (float _X)) { return ceilf(_X); } inline float _NOTHROW(cos, (float _X)) { return cosf(_X); } inline float _NOTHROW(cosh, (float _X)) { return coshf(_X); } inline float _NOTHROW(exp, (float _X)) { return expf(_X); } inline float _NOTHROW(fabs, (float _X)) { return fabsf(_X); } inline float _NOTHROW(floor, (float _X)) { return floorf(_X); } inline float _NOTHROW(fmod, (float _X, float _Y)) { return fmodf(_X,_Y ); } inline float _NOTHROW(frexp, (float _X, int* _Y)) { return frexpf(_X, _Y ); } inline float _NOTHROW(ldexp, (float _X, int _Y)) { return ldexpf(_X, _Y); } inline float _NOTHROW(log, (float _X)) { return logf( _X ); } inline float _NOTHROW(log10, (float _X)) { return log10f(_X ); } inline float _NOTHROW(modf, (float _X, float* _Y)) { return modff(_X,_Y); } inline float _NOTHROW(pow, (float _X, float _Y)) { return powf(_X,_Y); } inline float _NOTHROW(pow, (float _X, int _Y)) { return powf(_X,_Y); } inline float _NOTHROW(sin, (float _X)) { return sinf(_X); } inline float _NOTHROW(sinh, (float _X)) { return sinhf(_X); } inline float _NOTHROW(sqrt, (float _X)) { return sqrtf(_X); } inline float _NOTHROW(tan, (float _X)) { return tanf(_X); } inline float _NOTHROW(tanh, (float _X)) { return tanhf(_X ); } /****************************************************************************** Functions implemented by the standard AIX C library ******************************************************************************/ inline long double _NOTHROW(abs, (long double _X)) { return fabsl( _X ); } inline long double _NOTHROW(acos, (long double _X)) { return acosl( _X ); } inline long double _NOTHROW(asin, (long double _X)) { return asinl( _X ); } inline long double _NOTHROW(atan, (long double _X)) { return atanl( _X ); } inline long double _NOTHROW(atan2, (long double _X, long double _Y)) { return atan2l( _X, _Y ); } inline long double _NOTHROW(ceil, (long double _X)) { return ceill( _X ); } inline long double _NOTHROW(cos, (long double _X)) { return cosl( _X ); } inline long double _NOTHROW(cosh, (long double _X)) { return coshl( _X ); } inline long double _NOTHROW(exp, (long double _X)) { return expl( _X ); } inline long double _NOTHROW(fabs, (long double _X)) { return fabsl( _X ); } inline long double _NOTHROW(floor, (long double _X)) { return floorl( _X ); } inline long double _NOTHROW(fmod, (long double _X, long double _Y)) { return fmodl( _X, _Y ); } inline long double _NOTHROW(frexp, (long double _X, int* _Y)) { return frexpl( _X, _Y ); } inline long double _NOTHROW(ldexp, (long double _X, int _Y)) { return ldexpl( _X, _Y ); } inline long double _NOTHROW(log, (long double _X)) { return logl( _X ); } inline long double _NOTHROW(log10, (long double _X)) { return log10l( _X ); } inline long double _NOTHROW(modf, (long double _X, long double* _Y)) { return modfl( _X, _Y); } inline long double _NOTHROW(pow, (long double _X, long double _Y)) { return powl( _X, _Y ); } inline long double _NOTHROW(pow, (long double _X, int _Y)) { return powl( _X, (long double)_Y ); } inline long double _NOTHROW(sin, (long double _X)) { return sinl( _X ); } inline long double _NOTHROW(sinh, (long double _X)) { return sinhl( _X ); } inline long double _NOTHROW(sqrt, (long double _X)) { return sqrtl( _X ); } inline long double _NOTHROW(tan, (long double _X)) { return tanl( _X ); } inline long double _NOTHROW(tanh, (long double _X)) { return tanhl( _X ); } inline double _NOTHROW(pow, (double _X, int _Y)) { return pow( _X, (double)_Y ); } namespace std { /* hoist names to global namespace */ using ::abs; using ::acos; using ::acosh; using ::asin; using ::asinh; using ::atan; using ::atanh; using ::atan2; using ::ceil; using ::cos; using ::cosh; using ::exp; using ::fabs; using ::floor; using ::fmod; using ::frexp; using ::ldexp; using ::log; using ::log10; using ::modf; using ::pow; using ::sin; using ::sinh; using ::sqrt; using ::tan; using ::tanh; } /*============================================================================*/ #endif } #endif /* __cplusplus */ #endif /*_ANSI_C_SOURCE */ #if defined(_ISOC99_SOURCE) || defined(_XOPEN_SOURCE) || defined(__cplusplus) #ifdef _NO_PROTO extern double _NOTHROW(erf, ()); extern double _NOTHROW(erfc, ()); extern double _NOTHROW(hypot, ()); extern double _NOTHROW(lgamma, ()); #ifdef _ALL_SOURCE extern double _NOTHROW(lgamma_r, ()); #endif #ifdef __LONGDOUBLE128 long double _NOTHROW(__erfl128, ()); long double _NOTHROW(__erfcl128, ()); long double _NOTHROW(__lgammal128, ()); #ifdef _ALL_SOURCE long double _NOTHROW(__lgammal128_r, ()); #endif /* _ALL_SOURCE */ #endif /* #ifdef __LONGDOUBLE128 */ #if _XOPEN_SOURCE_EXTENDED==1 || defined(_ISOC99_SOURCE) extern double _NOTHROW(acosh, ()); extern double _NOTHROW(asinh, ()); extern double _NOTHROW(atanh, ()); extern double _NOTHROW(cbrt, ()); extern double _NOTHROW(expm1, ()); extern int _NOTHROW(ilogb, ()); extern double _NOTHROW(log1p, ()); extern double _NOTHROW(logb, ()); extern double _NOTHROW(nextafter, ()); extern double _NOTHROW(remainder, ()); extern double _NOTHROW(rint, ()); #endif /* _XOPEN_SOURCE_EXTENDED */ #else /* _NO_PROTO */ extern double _NOTHROW(erf, (double)); extern double _NOTHROW(erfc, (double)); extern double _NOTHROW(hypot, (double,double)); extern double _NOTHROW(lgamma, (double)); #ifdef _ALL_SOURCE extern double _NOTHROW(lgamma_r, (double, int *)); #endif /* _ALL_SOURCE */ #ifdef __LONGDOUBLE128 extern long double _NOTHROW(__erfl128, (long double)); extern long double _NOTHROW(__erfcl128, (long double)); extern long double _NOTHROW(__hypotl128, (long double,long double)); extern long double _NOTHROW(__lgammal128, (long double)); #ifdef _ALL_SOURCE long double _NOTHROW(__lgammal128_r, (long double, int *)); #endif /* _ALL_SOURCE */ #endif /* #ifdef __LONGDOUBLE128 */ #ifndef __cplusplus #ifdef __LONGDOUBLE128 #define erfcl(__x) __erfcl128((long double) (__x)) #define erfl(__x) __erfl128((long double) (__x)) #define hypotl(__x, __y) __hypotl128((long double) (__x), (long double) (__y)) #define lgammal(__x) __lgammal128((__x)) #ifdef _ALL_SOURCE #define lgammal_r(__x, __y) __lgammal128_r((__x), (__y)) #endif #else #define erfcl(__x) erfc((double) (__x)) #define erfl(__x) erf((double) (__x)) #define hypotl(__x, __y) hypot((double) (__x), (double) (__y)) #define lgammal(__x) lgamma((double) (__x)) #ifdef _ALL_SOURCE #define lgammal_r(__x, __y) lgamma_r((double) (__x), (__y)) #endif #endif #else /* def __cplusplus */ #ifdef __LONGDOUBLE128 inline long double _NOTHROW(erfl, (long double __x)) { return __erfl128( __x); } inline long double _NOTHROW(erfcl, (long double __x)) { return __erfcl128( __x); } inline long double _NOTHROW(hypotl, (long double __x, long double __y)) { return __hypotl128(__x, __y); } inline long double _NOTHROW(lgammal, (long double __x)) { return __lgammal128((double) (__x)); } #ifdef _ALL_SOURCE inline long double _NOTHROW(lgammal_r, (long double __x, int *__y)) { return __lgammal128_r((double) (__x), __y); } #endif #else _FAST_INLINE long double _NOTHROW(erfl, (long double __x)) { return erf((double) (__x)); } _FAST_INLINE long double _NOTHROW(erfcl, (long double __x)) { return erfc((double) (__x)); } _FAST_INLINE long double _NOTHROW(hypotl, (long double __x, long double __y)) { return hypot((double) (__x), (double) (__y)); } _FAST_INLINE long double _NOTHROW(lgammal, (long double __x)) { return lgamma((double) (__x)); } #ifdef _ALL_SOURCE _FAST_INLINE long double _NOTHROW(lgammal_r, (long double __x, int *__y)) { return lgamma_r((double) (__x), __y); } #endif #endif /* def __LONGDOUBLE128 */ #endif /* def __cplusplus */ #if _XOPEN_SOURCE_EXTENDED==1 || defined(_ISOC99_SOURCE) extern double _NOTHROW(acosh, (double)); extern double _NOTHROW(asinh, (double)); extern double _NOTHROW(atanh, (double)); extern double _NOTHROW(cbrt, (double)); extern double _NOTHROW(expm1, (double)); extern int _NOTHROW(ilogb, (double)); extern double _NOTHROW(log1p, (double)); extern double _NOTHROW(logb, (double)); extern double _NOTHROW(nextafter, (double, double)); extern double _NOTHROW(remainder, (double, double)); extern double _NOTHROW(rint, (double)); #ifdef __LONGDOUBLE128 extern long double _NOTHROW(__acoshl128, (long double)); extern long double _NOTHROW(__asinhl128, (long double)); extern long double _NOTHROW(__atanhl128, (long double)); extern long double _NOTHROW(__cbrtl128, (long double)); extern long double _NOTHROW(__expm1l128, (long double)); extern int _NOTHROW(__ilogbl128, (long double)); extern long double _NOTHROW(__log1pl128, (long double)); extern long double _NOTHROW(__logbl128, (long double)); extern long double _NOTHROW(__nextafterl128, (long double, long double)); extern long double _NOTHROW(__remainderl128, (long double, long double)); extern long double _NOTHROW(__rintl128, (long double)); #endif /* * The following macro definitions cause the XLC compiler to inline * these functions whenever possible. __MATH__ is defined by the compiler. */ #ifdef __MATH__ #ifndef __cplusplus #ifdef __IBMC__ #if (__xlC__ >= 0x0800) /* VAC version 8 and above */ #define acosh(__x) __acosh(__x) #define asinh(__x) __asinh(__x) #define atanh(__x) __atanh(__x) #define cbrt(__x) __cbrt(__x) #define expm1(__x) __expm1(__x) #define log1p(__x) __log1p(__x) #endif /* __xlC__ >= 0x0800 */ #endif /* __IBMC__ */ #else /* __cplusplus */ #ifdef __IBMCPP__ #if (__xlC__ >= 0x0800) /* VAC version 8 and above */ extern "builtin" double __acosh(double); extern "builtin" double __asinh(double); extern "builtin" double __atanh(double); extern "builtin" double __cbrt(double); extern "builtin" double __expm1(double); extern "builtin" double __log1p(double); inline double _NOTHROW(acosh, (double __x)) {return __acosh(__x);} inline double _NOTHROW(asinh, (double __x)) {return __asinh(__x);} inline double _NOTHROW(atanh, (double __x)) {return __atanh(__x);} inline double _NOTHROW(cbrt, (double __x)) { return __cbrt(__x);} inline double _NOTHROW(expm1, (double __x)) {return __expm1(__x);} inline double _NOTHROW(log1p, (double __x)) {return __log1p(__x);} #endif /* __xlC__ >= 0x0800 */ #endif /* __IBMCPP__ */ #endif /* __cplusplus */ #endif /* __MATH__ */ #ifndef __cplusplus #ifdef __LONGDOUBLE128 #define acoshl(__x) __acoshl128((long double) (__x)) #define asinhl(__x) __asinhl128((long double) (__x)) #define atanhl(__x) __atanhl128((long double) (__x)) #define cbrtl(__x) __cbrtl128((long double) (__x)) #define expm1l(__x) __expm1l128((long double) (__x)) #define ilogbl(__x) __ilogbl128((long double) (__x)) #define log1pl(__x) __log1pl128((long double) (__x)) #define nextafterl(__x, __y) __nextafterl128((long double) (__x), (long double) (__y)) #define remainderl(__x, __y) __remainderl128((long double) (__x), (long double) (__y)) #define lrintl(__x) __lrintl128((long double) (__x)) #else #define acoshl(__x) acosh((double) (__x)) #define asinhl(__x) asinh((double) (__x)) #define atanhl(__x) atanh((double) (__x)) #define cbrtl(__x) cbrt((double) (__x)) #define expm1l(__x) expm1((double) (__x)) #define log1pl(__x) log1p((double) (__x)) #define logbl(__x) logb((double) (__x)) #define nexttowardl(__x, __y) nexttoward((double) (__x), (long double) (__y)) #define remainderl(__x, __y) remainder((double) (__x), (double) (__y)) #define rintl(__x) rint((double) (__x)) #endif /* def __LONGDOUBLE128 */ #else #ifdef __LONGDOUBLE128 inline long double _NOTHROW(acoshl, (long double __x)) { return __acoshl128( __x); } inline long double _NOTHROW(asinhl, (long double __x)) { return __asinhl128( __x); } inline long double _NOTHROW(atanhl, (long double __x)) { return __atanhl128( __x); } inline long double _NOTHROW(cbrtl, (long double __x)) { return __cbrtl128( __x); } inline long double _NOTHROW(expm1l, (long double __x)) { return __expm1l128( __x); } inline int _NOTHROW(ilogbl, (long double __x)) { return __ilogbl128( __x); } inline long double _NOTHROW(log1pl, (long double __x)) { return __log1pl128( __x); } inline long double _NOTHROW(logbl, (long double __x)) { return __logbl128( __x); } inline long double _NOTHROW(nextafterl, (long double __x, long double __y)) { return __nextafterl128( __x, __y); } inline long double _NOTHROW(remainderl, (long double __x, long double __y)) { return __remainderl128( __x, __y); } inline long double _NOTHROW(rintl, (long double __x)) { return __rintl128( __x); } #else _FAST_INLINE int _NOTHROW(ilogbl, (long double __x)) { return ilogb((double) (__x)); } _FAST_INLINE long double _NOTHROW(logbl, (long double __x)) { return logb((double) (__x)); } _FAST_INLINE long double _NOTHROW(nextafterl, (long double __x, long double __y)) { return nextafter((double) (__x), (double) (__y)); } _FAST_INLINE long double _NOTHROW(remainderl, (long double __x, long double __y)) { return remainder((double) (__x), (double) (__y)); } _FAST_INLINE long double _NOTHROW(rintl, (long double __x)) { return rint((double) (__x)); } #endif /* def __LONGDOUBLE128 */ #endif /* def __cplusplus */ #endif /* _XOPEN_SOURCE_EXTENDED==1 || defined(_ISOC99_SOURCE) */ #endif /* _NO_PROTO */ #endif /* _ISOC99_SOURCE || _XOPEN_SOURCE */ /* * * The following function prototypes define functions available in the * AIX system but not required by the ANSI standard. They will not be * included if only _ANSI_C_SOURCE is defined (strict ANSI conformance). * */ #ifdef _XOPEN_SOURCE extern int signgam; /* * Useful mathmatical constants: * * M_E -- e * M_LOG2E -- log2(e) * M_LOG10E -- log10(e) * M_LN2 -- ln(2) * M_PI -- pi * M_PI_2 -- pi/2 * M_PI_4 -- pi/4 * M_1_PI -- 1/pi * M_2_PI -- 2/pi * M_2_SQRTPI -- 2/(sqrt(pi)) * M_SQRT2 -- sqrt(2) * M_SQRT1_2 -- 1/sqrt(2) * * These constants are provided to more significant digits * than is necessary for a 64-bit double precision number; they * may be used for other purposes where the extra precision * is necessary or useful. */ #define M_E 2.71828182845904523536028747135266250 #define M_LOG2E 1.44269504088896340735992468100189214 #define M_LOG10E 0.434294481903251827651128918916605082 #define M_LN2 0.693147180559945309417232121458176568 #define M_LN10 2.30258509299404568401799145468436421 #define M_PI 3.14159265358979323846264338327950288 #define M_PI_2 1.57079632679489661923132169163975144 #define M_PI_4 0.785398163397448309615660845819875721 #define M_1_PI 0.318309886183790671537767526745028724 #define M_2_PI 0.636619772367581343075535053490057448 #define M_2_SQRTPI 1.12837916709551257389615890312154517 #define M_SQRT2 1.41421356237309504880168872420969808 #define M_SQRT1_2 0.707106781186547524400844362104849039 /* MAXFLOAT is also defined in values.h */ #ifndef MAXFLOAT extern unsigned int _SFPMAX; #define MAXFLOAT (*((float *) (&_SFPMAX))) #endif #ifdef _NO_PROTO #if (_XOPEN_SOURCE<600) || defined(_ALL_SOURCE) #if !defined(__cplusplus) || (defined(__xlC__) && !defined(__ibmxl__)) \ || defined(_GLIBCXX_HAVE_OBSOLETE_ISNAN) extern int _NOTHROW(isnan, ()); #endif /* !defined(__cplusplus) || (defined(__xlC__) && !defined(__ibmxl__)) */ extern double _NOTHROW(gamma, ()); extern double _NOTHROW(gamma_r, ()); #endif extern double _NOTHROW(j0, ()); extern double _NOTHROW(j1, ()); extern double _NOTHROW(jn, ()); extern double _NOTHROW(y0, ()); extern double _NOTHROW(y1, ()); extern double _NOTHROW(yn, ()); #if _XOPEN_SOURCE_EXTENDED==1 #if (_XOPEN_SOURCE < 700) || defined(_ALL_SOURCE) extern double _NOTHROW(scalb, ()); #endif #endif /* _XOPEN_SOURCE_EXTENDED */ #else /* _NO_PROTO */ #if (_XOPEN_SOURCE<600) || defined(_ALL_SOURCE) #if !defined(__cplusplus) || (defined(__xlC__) && !defined(__ibmxl__)) \ || defined(_GLIBCXX_HAVE_OBSOLETE_ISNAN) extern int _NOTHROW(isnan, (double)); #endif /* !defined(__cplusplus) || (defined(__xlC__) && !defined(__ibmxl__)) */ extern double _NOTHROW(gamma, (double)); extern double _NOTHROW(gamma_r, (double, int *)); #endif extern double _NOTHROW(j0, (double)); extern double _NOTHROW(j1, (double)); extern double _NOTHROW(jn, (int, double)); extern double _NOTHROW(y0, (double)); extern double _NOTHROW(y1, (double)); extern double _NOTHROW(yn, (int, double)); #if _XOPEN_SOURCE_EXTENDED==1 #if (_XOPEN_SOURCE < 700) || defined(_ALL_SOURCE) extern double _NOTHROW(scalb, (double, double)); #endif #endif /* _XOPEN_SOURCE_EXTENDED */ #endif /* _NO_PROTO */ #endif /* _XOPEN_SOURCE */ #ifdef _ALL_SOURCE #define DINFINITY _DBLINF #ifndef _BSD #ifndef _H_STDLIB #include #endif #else /* _BSD */ /* * Any changes to the below declaration must be verified with * changes to the same function declaration in */ #ifndef _NO_PROTO extern double _NOTHROW(atof, (const char *)); #else /* _NO_PROTO */ extern double _NOTHROW(atof, ()); #endif /* _NO_PROTO */ #endif /* _BSD */ /* * C99 defines a conflicting version of cabs from AIX versions * prior to AIX 5.2. The previous version is renamed to _cabshypot * since it is the non-standard version and is only available as a * statically linked routine. */ #if (!defined(_ISOC99_SOURCE)) || defined(_HYPOTCABS) #define cabs _cabshypot #endif #ifdef _NO_PROTO extern double _cabshypot(); extern double _NOTHROW(drem, ()); extern double exp__E(); extern double log__L(); extern double nearest(); extern double rsqrt(); #ifndef __cplusplus extern int class(); #else extern int _class(); #endif extern int _NOTHROW(finite, ()); extern int itrunc(); extern int unordered(); extern unsigned uitrunc(); #if !defined(__cplusplus) || (defined(__xlC__) && !defined(__ibmxl__)) \ || defined(_GLIBCXX_HAVE_OBSOLETE_ISINF) extern int _NOTHROW(isinf, ()); #endif /* !defined(__cplusplus) || (defined(__xlC__) && !defined(__ibmxl__)) */ #ifdef _POWER extern int dtoi(); #endif #else /* _NO_PROTO */ /* Use ANSI C required prototyping */ struct dbl_hypot { double x, y; }; extern double _cabshypot(struct dbl_hypot); extern double _NOTHROW(drem, (double, double)); extern double exp__E(double, double); extern double log__L(double); extern double nearest(double); extern double rsqrt(double); extern int _NOTHROW(finite, (double)); extern int itrunc(double); extern int unordered(double, double); extern unsigned uitrunc(double); #if !defined(__cplusplus) || (defined(__xlC__) && !defined(__ibmxl__)) \ || defined(_GLIBCXX_HAVE_OBSOLETE_ISINF) extern int _NOTHROW(isinf, (double)); #endif /* !defined(__cplusplus) || (defined(__xlC__) && !defined(__ibmxl__)) */ #ifdef _POWER extern int dtoi(double); /* The POWER wants arguments in both GPR's and FPR's * By not specifying a prototype of double, the compiler * will put the argument in both types of registers. */ #ifndef __cplusplus extern int class(); #else /* _class does nothing but calls class subroutine * internally. So prototyping like this will * still work and avoid compilation errors */ extern int _class(double); #endif #else #ifndef __cplusplus extern int class(double); #else extern int _class(double); #endif #endif #endif /* _NO_PROTO */ #ifndef __cplusplus struct exception { int type; char *name; double arg1; double arg2; double retval; }; #else struct __exception { int type; char *name; double arg1; double arg2; double retval; }; #endif /* __cplusplus */ #define DOMAIN 01 #define SING 02 #define OVERFLOW 03 #define UNDERFLOW 04 #define TLOSS 05 #define PLOSS 06 /* * Useful mathmatical constants: * * HUGE - +infinity * M_2PI - 2*pi * */ #define HUGE HUGE_VAL #define M_2PI 6.2831853071795862320E0 /*Hex 2^ 2 * 1.921FB54442D18 */ /* This is the nearest number to the cube root of MAXDOUBLE that */ /* doesn't cause the cube of it to overflow. */ /* In double precision hex this constant is: 554428a2 f98d728a */ #define CUBRTHUGE 5.6438030941223618e102 #define INV_CUBRTHUGE 1.7718548704178434e-103 #endif /* ALL_SOURCE */ #ifdef _ISOC99_SOURCE /* * This section contains a series of "real-floating-type" macros as * prescribed by C99 */ extern int _class(double) _CONST; extern int _classf(float) _CONST; extern int _isfinite(double) _CONST; extern int _isfinitef(float) _CONST; extern int _isinf(double) _CONST; extern int _isinff(float) _CONST; extern int _isnan(double) _CONST; extern int _isnanf(float) _CONST; extern int _isnormal(double) _CONST; extern int _isnormalf(float) _CONST; extern int _signbit(double) _CONST; extern int _signbitf(float) _CONST; #ifdef __LONGDOUBLE128 extern int _classl128(long double); extern int _isfinitel128(long double); extern int _isinfl128(long double); extern int _isnanl128(long double); extern int _isnormall128(long double); extern int _signbitl128(long double); #endif #ifndef _USE_FP_CLASSIFICATION_BUILTIN #define _USE_FP_CLASSIFICATION_BUILTIN(__x) (__has_builtin(__x) && !defined(__ibmxl__)) #endif /* _USE_FP_CLASSIFICATION_MACROS */ #ifdef __STDC_WANT_DEC_FP__ #define __dfp_iszero(__x) ((sizeof(__x)== 4 || sizeof(__x)==8) ? __d64_iszero(__x) : __d128_iszero(__x)) #define __dfp_isfinite(__x) ((sizeof(__x)== 4 || sizeof(__x)==8) ? __d64_isfinite(__x) : __d128_isfinite(__x)) #define __dfp_isinf(__x) ((sizeof(__x)== 4 || sizeof(__x)==8) ? __d64_isinf(__x) : __d128_isinf(__x)) #define __dfp_isnan(__x) ((sizeof(__x)== 4 || sizeof(__x)==8) ? __d64_isnan(__x) : __d128_isnan(__x)) #define __dfp_issigned(__x) ((sizeof(__x)== 4 || sizeof(__x)==8) ? __d64_issigned(__x) : __d128_issigned(__x)) #ifndef _H_FLOAT #define DEC32_MIN 1E-95DF #define DEC32_MAX 9.999999E96DF #endif #define __d32_isnormal(__x) \ (__d64_isnan(__x) ? 0 : \ (((_Decimal32)(__x) >= DEC32_MIN) && ((_Decimal32)(__x) <= DEC32_MAX)) || \ (((_Decimal32)(__x) <= -DEC32_MIN) && ((_Decimal32)(__x) >= -DEC32_MAX))) #define __dfp_isnormal(__x) \ (sizeof(__x)== 4 ? __d32_isnormal(__x) :\ sizeof(__x)== 8 ? __d64_isnormal(__x) :\ __d128_isnormal(__x)) #define __dfp_fpclassify(__x) \ (__dfp_isinf(__x) ? FP_INFINITE :\ __dfp_isnan(__x) ? FP_NAN :\ __dfp_iszero(__x) ? FP_ZERO :\ __dfp_isnormal(__x) ? FP_NORMAL :\ FP_SUBNORMAL) /* If __x is binary floating point, returns 1, otherwise 0 */ #define __bfp_compatible(__x) (0, __extension__ (_Decimal128)1/(_Decimal128)10 != \ (_Decimal128)((__typeof(__x))1/(__typeof(__x))10)) #else #define __dfp_iszero(__x) (0) #define __dfp_isfinite(__x) (0) #define __dfp_isinf(__x) (0) #define __dfp_isnan(__x) (0) #define __dfp_isnormal(__x) (0) #define __dfp_issigned(__x) (0) #define __dfp_fpclassify(__x) (0) #define __bfp_compatible(__x) (1) #endif /* __STDC_WANT_DEC_FP__ */ /* Size-specific inline binary fp classify functions */ #if ((__STDC_VERSION__ >= 199901L) || __cplusplus) && !_USE_FP_CLASSIFICATION_BUILTIN(__builtin_fpclassify) static inline int __bfp_fpclassify_float(float __y) { float __x = __y; return ((_classf(__x) == FP_SNAN) || (_classf(__x) == FP_QNAN) ? \ FP_QNAN : \ (_classf(__x) & 0x00000001 ? \ _classf(__x) - 1 : \ _classf(__x))); } static inline int __bfp_fpclassify_double(double __y) { double __x = __y; return ((_class(__x) == FP_SNAN) || (_class(__x) == FP_QNAN) ? \ FP_QNAN : \ (_class(__x) & 0x00000001 ? \ _class(__x) - 1 : \ _class(__x))); } #ifdef __LONGDOUBLE128 static inline int __bfp_fpclassify_longdouble(long double __y) { long double __x = __y; return ((_classl128(__x) == FP_SNAN) || (_classl128(__x) == FP_QNAN) ? \ FP_QNAN: \ (_classl128(__x) & 0x00000001 ? \ _classl128(__x) - 1 : \ _classl128(__x))); } #endif #endif #ifndef __LONGDOUBLE128 #if _USE_FP_CLASSIFICATION_BUILTIN(__builtin_fpclassify) #define __bfp_fpclassify(__x) __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x) #elif ((defined(_ALL_SOURCE) && !defined(_ARGSAFE_MACROS)) || \ !(__STDC_VERSION__ >= 199901L || __cplusplus)) #define __bfp_fpclassify(__x) \ (sizeof(__x) == sizeof(float) ? \ ((_classf(__x) == FP_SNAN) || (_classf(__x) == FP_QNAN) ? \ FP_QNAN : \ (_classf(__x) & 0x00000001 ? \ _classf(__x) - 1 : \ _classf(__x)) ) : \ ((_class(__x) == FP_SNAN) || (_class(__x) == FP_QNAN) ? \ FP_QNAN : \ (_class(__x) & 0x00000001 ? \ _class(__x) - 1 : \ _class(__x)))) #else #define __bfp_fpclassify(__x) \ (sizeof(__x) == sizeof(float) ? __bfp_fpclassify_float(__x) : \ __bfp_fpclassify_double(__x)) #endif /* _USE_FP_CLASSIFICATION_BUILTIN(__builtin_fpclassify) */ #if _USE_FP_CLASSIFICATION_BUILTIN(__builtin_isfinite) #define __bfp_isfinite(__x) __builtin_isfinite(__x) #else #define __bfp_isfinite(__x) \ ((sizeof(__x) == sizeof(float)) ? _isfinitef(__x) : _isfinite(__x)) #endif /* _USE_FP_CLASSIFICATION_BUILTIN(__builtin_isfinite) */ #if _USE_FP_CLASSIFICATION_BUILTIN(__builtin_isinf_sign) #define __bfp_isinf(__x) __builtin_isinf_sign(__x) #else #define __bfp_isinf(__x) \ ((sizeof(__x) == sizeof(float)) ? _isinff(__x) : _isinf(__x)) #endif /* _USE_FP_CLASSIFICATION_BUILTIN(__builtin_isinf_sign) */ #if _USE_FP_CLASSIFICATION_BUILTIN(__builtin_isnan) #define __bfp_isnan(__x) __builtin_isnan(__x) #else #define __bfp_isnan(__x) \ ((sizeof(__x) == sizeof(float)) ? _isnanf(__x) : _isnan(__x)) #endif /* _USE_FP_CLASSIFICATION_BUILTIN(__builtin_isnan) */ #if _USE_FP_CLASSIFICATION_BUILTIN(__builtin_isnormal) #define __bfp_isnormal(__x) __builtin_isnormal(__x) #else #define __bfp_isnormal(__x) \ ((sizeof(__x) == sizeof(float)) ? _isnormalf(__x) : _isnormal(__x)) #endif /* _USE_FP_CLASSIFICATION_BUILTIN(__builtin_isnormal) */ #if _USE_FP_CLASSIFICATION_BUILTIN(__builtin_signbit) #define __bfp_signbit(__x) __builtin_signbit(__x) #else #define __bfp_signbit(__x) \ ((sizeof(__x) == sizeof(float)) ? _signbitf(__x) : _signbit(__x)) #endif /* _USE_FP_CLASSIFICATION_BUILTIN(__builtin_signbit) */ #else #if ((defined(_ALL_SOURCE) && !defined(_ARGSAFE_MACROS)) || \ !(__STDC_VERSION__ >= 199901L || __cplusplus)) #define __bfp_fpclassify(__x) \ (sizeof(__x) == sizeof(float) ? \ ((_classf(__x) == FP_SNAN) || (_classf(__x) == FP_QNAN) ? \ FP_QNAN : \ (_classf(__x) & 0x00000001 ? \ _classf(__x) - 1 : \ _classf(__x))) :\ (sizeof(__x) == sizeof(double) ? \ ((_class(__x) == FP_SNAN) || (_class(__x) == FP_QNAN) ? \ FP_QNAN : \ (_class(__x) & 0x00000001 ? \ _class(__x) - 1 : \ _class(__x))) :\ ((_classl128(__x) == FP_SNAN) || (_classl128(__x) == FP_QNAN) ? \ FP_QNAN: \ (_classl128(__x) & 0x00000001 ? \ _classl128(__x) - 1 : \ _classl128(__x))))) #else #define __bfp_fpclassify(__x) \ (sizeof(__x) == sizeof(float) ? __bfp_fpclassify_float(__x) : \ (sizeof(__x) == sizeof(double) ? __bfp_fpclassify_double(__x) : \ __bfp_fpclassify_longdouble(__x))) #endif /* ((_ALL_SOURCE && !_ARGSAFE_MACROS) || __STDC_VERSION < 199901L */ #define __bfp_isfinite(__x) \ ((sizeof(__x) == sizeof(float)) ? _isfinitef(__x) : \ (sizeof(__x) == sizeof(double)) ? _isfinite(__x) : \ _isfinitel128(__x)) #define __bfp_isinf(__x) \ ((sizeof(__x) == sizeof(float)) ? _isinff(__x) : \ (sizeof(__x) == sizeof(double)) ? _isinf(__x) : \ _isinfl128(__x)) #define __bfp_isnan(__x) \ ((sizeof(__x) == sizeof(float)) ? _isnanf(__x) : \ (sizeof(__x) == sizeof(double)) ? _isnan(__x) : \ _isnanl128(__x)) #define __bfp_isnormal(__x) \ ((sizeof(__x) == sizeof(float)) ? _isnormalf(__x) : \ (sizeof(__x) == sizeof(double)) ? _isnormal(__x) : \ _isnormall128(__x)) #define __bfp_signbit(__x) \ ((sizeof(__x) == sizeof(float)) ? _signbitf(__x) : \ (sizeof(__x) == sizeof(double)) ? _signbit(__x) : \ _signbitl128(__x)) #endif /* __LONGDOUBLE128 */ /* The compiler needs to define the required compiler BIFs (e.g. __d64_iszero) * to use the below macros if __STDC_WANT_DEC_FP__ macro is defined. */ #define fpclassify(__x) (__bfp_compatible(__x) ? __bfp_fpclassify(__x): __dfp_fpclassify(__x)) #define isfinite(__x) (__bfp_compatible(__x) ? __bfp_isfinite(__x) : __dfp_isfinite(__x)) #define isinf(__x) (__bfp_compatible(__x) ? __bfp_isinf(__x) : __dfp_isinf(__x)) #define isnan(__x) (__bfp_compatible(__x) ? __bfp_isnan(__x) : __dfp_isnan(__x)) #define isnormal(__x) (__bfp_compatible(__x) ? __bfp_isnormal(__x) : __dfp_isnormal(__x)) #define signbit(__x) (__bfp_compatible(__x) ? __bfp_signbit(__x) : __dfp_issigned(__x)) /* Use traditional macros for non-standard-specified compilations unless * _ARGSAFE_MACROS is set and the compiler supports inling. */ #if ((defined(_ALL_SOURCE) && !defined(_ARGSAFE_MACROS)) || \ !(__STDC_VERSION__ >= 199901L || __cplusplus)) /* Comparison macros which do not raise floating point e__xceptions */ #define isgreater(__x, __y) \ ((isnan(__x) || isnan(__y)) ? 0 : (__x) > (__y)) #define isgreaterequal(__x, __y) \ ((isnan(__x) || isnan(__y)) ? 0 : (__x) >= (__y)) #define isless(__x, __y) \ ((isnan(__x) || isnan(__y)) ? 0 : (__x) < (__y)) #define islessequal(__x, __y) \ ((isnan(__x) || isnan(__y)) ? 0 : (__x) <= (__y)) #define islessgreater(__x, __y) \ ((isnan(__x) || isnan(__y)) ? 0 : (__x) != (__y)) #else static inline int __isgreater_func(long double __x, long double __y) { return isnan(__x) || isnan(__y) ? 0 : (__x) > (__y); } #define isgreater(__x, __y) __isgreater_func((long double)(__x), (long double) (__y)) static inline int __isgreaterequal_func(long double __x, long double __y) { return isnan(__x) || isnan(__y) ? 0 : (__x) >= (__y); } #define isgreaterequal(__x, __y) __isgreaterequal_func((long double)(__x), (long double) (__y)) static inline int __isless_func(long double __x, long double __y) { return isnan(__x) || isnan(__y) ? 0 : (__x) < (__y); } #define isless(__x, __y) __isless_func((long double)(__x), (long double) (__y)) static inline int __islessequal_func(long double __x, long double __y) { return isnan(__x) || isnan(__y) ? 0 : (__x) <= (__y); } #define islessequal(__x, __y) __islessequal_func((long double)(__x), (long double) (__y)) static inline int __islessgreater_func(long double __x, long double __y) { return isnan(__x) || isnan(__y) ? 0 : (__x) != (__y); } #define islessgreater(__x, __y) __islessgreater_func((long double)(__x), (long double) (__y)) #endif /* !_ARGSAFE_MACROS_ */ #define isunordered(__x, __y) \ (isnan(__x) || isnan(__y)) #endif /* * 64-bit integer support, known as long long int and unsigned long long int */ #if (defined(_LONG_LONG) && defined(_ALL_SOURCE)) #ifdef _NO_PROTO extern long long int __multi64( ); extern long long int __divi64( ); extern unsigned long long int __divu64( ); extern long long int __maxi64( ); extern long long int __mini64( ); extern long long int __f64toi64rz( ); extern unsigned long long int __f64tou64rz( ); #ifdef __LONGDOUBLE128 extern long long int __f128toi64rz( ); extern unsigned long long int __f128tou64rz( ); #endif /* __LONGDOUBLE128 */ #else /* ifdef _NO_PROTO */ extern long long int __multi64( long long int, long long int ); extern long long int __divi64( long long int, long long int ); extern unsigned long long int __divu64( unsigned long long int, unsigned long long int ); extern long long int __maxi64( long long int, long long int ); extern long long int __mini64( long long int, long long int ); extern long long int __f64toi64rz( double ); extern unsigned long long int __f64tou64rz( double ); #ifdef __LONGDOUBLE128 extern long long int __f128toi64rz( long double ); extern unsigned long long int __f128tou64rz( long double ); #endif /* __LONGDOUBLE128 */ #endif /* _NO_PROTO */ #endif /* if defined(_LONG_LONG) && defined(_ALL_SOURCE) */ /* * __XLC121__ is automatically defined by the XLC 1.2.1 compiler so that * the compiler can inline the following function when possible. */ #if (defined (__MATH__) && defined (__XLC121__) && defined (_ALL_SOURCE) ) #ifndef __cplusplus #define copysign(x,y) __copysign(x,y) #else #ifdef __IBMCPP__ extern "C" { extern "builtin" double __copysign(double, double); inline double _NOTHROW(copysign, (double __x, double __y)) {return __copysign(__x,__y);}} #endif #endif #endif /* * This section is for Decimal Floating Point (DFP) items. * DFP support is only present if __STDC_WANT_DEC_FP__ is defined. */ #ifdef __STDC_WANT_DEC_FP__ static const unsigned int _DEC_QNAN = 0x7C000000; static const unsigned int _DEC_INF = 0x78000000; #ifndef _LITTLE_ENDIAN static const unsigned int _DEC64_INF[2] = {0x78000000, 0x00000000}; static const unsigned int _DEC128_INF[4] = {0x78000000, 0x00000000, 0x00000000, 0x00000000}; #else static const unsigned int _DEC64_INF[2] = {0x00000000, 0x78000000}; static const unsigned int _DEC128_INF[4] = {0x00000000, 0x00000000, 0x00000000, 0x78000000}; #endif #define DEC_NAN (*((_Decimal32 *)(&_DEC_QNAN))) #define DEC_INFINITY (*((_Decimal32 *)(&_DEC_INF))) #define HUGE_VAL_D32 DEC_INFINITY #define HUGE_VAL_D64 (*((_Decimal64 *)(&_DEC64_INF))) #define HUGE_VAL_D128 (*((_Decimal128 *)(&_DEC128_INF))) #ifdef __IBM_DFP_NATIVE /* Only native version is requested, which will run only on DFP hardware. * In this case all the calls to these DFP math APIs will be replaced * by the corresponding native versions. */ #define ceild32 ceild32_native #define ceild64 ceild64_native #define ceild128 ceild128_native #define floord32 floord32_native #define floord64 floord64_native #define floord128 floord128_native #define nearbyintd32 nearbyintd32_native #define nearbyintd64 nearbyintd64_native #define nearbyintd128 nearbyintd128_native #define rintd32 rintd32_native #define rintd64 rintd64_native #define rintd128 rintd128_native #define lrintd32 lrintd32_native #define lrintd64 lrintd64_native #define lrintd128 lrintd128_native #define llrintd32 llrintd32_native #define llrintd64 llrintd64_native #define llrintd128 llrintd128_native #define roundd32 roundd32_native #define roundd64 roundd64_native #define roundd128 roundd128_native #define lroundd32 lroundd32_native #define lroundd64 lroundd64_native #define lroundd128 lroundd128_native #define llroundd32 llroundd32_native #define llroundd64 llroundd64_native #define llroundd128 llroundd128_native #define truncd32 truncd32_native #define truncd64 truncd64_native #define truncd128 truncd128_native #define copysignd32 copysignd32_native #define copysignd64 copysignd64_native #define copysignd128 copysignd128_native #define nand32 nand32_native #define nand64 nand64_native #define nand128 nand128_native #define nextafterd32 nextafterd32_native #define nextafterd64 nextafterd64_native #define nextafterd128 nextafterd128_native #define nexttowardd32 nexttowardd32_native #define nexttowardd64 nexttowardd64_native #define nexttowardd128 nexttowardd128_native #define fdimd32 fdimd32_native #define fdimd64 fdimd64_native #define fdimd128 fdimd128_native #define fmaxd32 fmaxd32_native #define fmaxd64 fmaxd64_native #define fmaxd128 fmaxd128_native #define fmind32 fmind32_native #define fmind64 fmind64_native #define fmind128 fmind128_native #define fabsd32 fabsd32_native #define fabsd64 fabsd64_native #define fabsd128 fabsd128_native #define frexpd32 frexpd32_native #define frexpd64 frexpd64_native #define frexpd128 frexpd128_native #define ilogbd32 ilogbd32_native #define ilogbd64 ilogbd64_native #define ilogbd128 ilogbd128_native #define logbd32 logbd32_native #define logbd64 logbd64_native #define logbd128 logbd128_native #define ldexpd32 ldexpd32_native #define ldexpd64 ldexpd64_native #define ldexpd128 ldexpd128_native #define modfd32 modfd32_native #define modfd64 modfd64_native #define modfd128 modfd128_native #define scalbnd32 scalbnd32_native #define scalbnd64 scalbnd64_native #define scalbnd128 scalbnd128_native #define scalblnd32 scalblnd32_native #define scalblnd64 scalblnd64_native #define scalblnd128 scalblnd128_native #define quantized32 quantized32_native #define quantized64 quantized64_native #define quantized128 quantized128_native #define samequantumd32 samequantumd32_native #define samequantumd64 samequantumd64_native #define samequantumd128 samequantumd128_native #define expd32 expd32_native #define expd64 expd64_native #define expd128 expd128_native #define log10d32 log10d32_native #define log10d64 log10d64_native #define log10d128 log10d128_native #define logd32 logd32_native #define logd64 logd64_native #define logd128 logd128_native #define powd32 powd32_native #define powd64 powd64_native #define powd128 powd128_native #define sqrtd32 sqrtd32_native #define sqrtd64 sqrtd64_native #define sqrtd128 sqrtd128_native #define cosd32 cosd32_native #define cosd64 cosd64_native #define cosd128 cosd128_native #define cospid32 cospid32_native #define cospid64 cospid64_native #define cospid128 cospid128_native #define sind32 sind32_native #define sind64 sind64_native #define sind128 sind128_native #define sinpid32 sinpid32_native #define sinpid64 sinpid64_native #define sinpid128 sinpid128_native #define tand32 tand32_native #define tand64 tand64_native #define tand128 tand128_native #define atan2d32 atan2d32_native #define atan2d64 atan2d64_native #define atan2d128 atan2d128_native #define atand32 atand32_native #define atand64 atand64_native #define atand128 atand128_native #define atanpid32 atanpid32_native #define atanpid64 atanpid64_native #define atanpid128 atanpid128_native #define acosd32 acosd32_native #define acosd64 acosd64_native #define acosd128 acosd128_native #define asind32 asind32_native #define asind64 asind64_native #define asind128 asind128_native #define coshd32 coshd32_native #define coshd64 coshd64_native #define coshd128 coshd128_native #define sinhd32 sinhd32_native #define sinhd64 sinhd64_native #define sinhd128 sinhd128_native #define tanhd32 tanhd32_native #define tanhd64 tanhd64_native #define tanhd128 tanhd128_native #define erfcd32 erfcd32_native #define erfcd64 erfcd64_native #define erfcd128 erfcd128_native #define erfd32 erfd32_native #define erfd64 erfd64_native #define erfd128 erfd128_native #define lgammad32 lgammad32_native #define lgammad64 lgammad64_native #define lgammad128 lgammad128_native #define remainderd32 remainderd32_native #define remainderd64 remainderd64_native #define remainderd128 remainderd128_native #define tgammad32 tgammad32_native #define tgammad64 tgammad64_native #define tgammad128 tgammad128_native #define acoshd32 acoshd32_native #define acoshd64 acoshd64_native #define acoshd128 acoshd128_native #define asinhd32 asinhd32_native #define asinhd64 asinhd64_native #define asinhd128 asinhd128_native #define atanhd32 atanhd32_native #define atanhd64 atanhd64_native #define atanhd128 atanhd128_native #define cbrtd32 cbrtd32_native #define cbrtd64 cbrtd64_native #define cbrtd128 cbrtd128_native #define expm1d32 expm1d32_native #define expm1d64 expm1d64_native #define expm1d128 expm1d128_native #define log1pd32 log1pd32_native #define log1pd64 log1pd64_native #define log1pd128 log1pd128_native #define exp2d32 exp2d32_native #define exp2d64 exp2d64_native #define exp2d128 exp2d128_native #define hypotd32 hypotd32_native #define hypotd64 hypotd64_native #define hypotd128 hypotd128_native #define log2d32 log2d32_native #define log2d64 log2d64_native #define log2d128 log2d128_native #define remquod32 remquod32_native #define remquod64 remquod64_native #define remquod128 remquod128_native #define fmodd32 fmodd32_native #define fmodd64 fmodd64_native #define fmodd128 fmodd128_native #define fmad128 fmad128_native #endif /* __IBM_DFP_NATIVE */ #ifdef _NO_PROTO extern _Decimal32 _NOTHROW(ceild32, ()); extern _Decimal64 _NOTHROW(ceild64, ()); extern _Decimal128 _NOTHROW(ceild128, ()); extern _Decimal32 _NOTHROW(floord32, ()); extern _Decimal64 _NOTHROW(floord64, ()); extern _Decimal128 _NOTHROW(floord128, ()); extern _Decimal32 _NOTHROW(nearbyintd32, ()); extern _Decimal64 _NOTHROW(nearbyintd64, ()); extern _Decimal128 _NOTHROW(nearbyintd128, ()); extern _Decimal32 _NOTHROW(rintd32, ()); extern _Decimal64 _NOTHROW(rintd64, ()); extern _Decimal128 _NOTHROW(rintd128, ()); extern long int _NOTHROW(lrintd32, ()); extern long int _NOTHROW(lrintd64, ()); extern long int _NOTHROW(lrintd128, ()); #ifdef _LONG_LONG extern long long int _NOTHROW(llrintd32, ()); extern long long int _NOTHROW(llrintd64, ()); extern long long int _NOTHROW(llrintd128, ()); #endif extern _Decimal32 _NOTHROW(roundd32, ()); extern _Decimal64 _NOTHROW(roundd64, ()); extern _Decimal128 _NOTHROW(roundd128, ()); extern long int _NOTHROW(lroundd32, ()); extern long int _NOTHROW(lroundd64, ()); extern long int _NOTHROW(lroundd128, ()); #ifdef _LONG_LONG extern long long int _NOTHROW(llroundd32, ()); extern long long int _NOTHROW(llroundd64, ()); extern long long int _NOTHROW(llroundd128, ()); #endif extern _Decimal32 _NOTHROW(truncd32, ()); extern _Decimal64 _NOTHROW(truncd64, ()); extern _Decimal128 _NOTHROW(truncd128, ()); extern _Decimal32 _NOTHROW(copysignd32, ()); extern _Decimal64 _NOTHROW(copysignd64, ()); extern _Decimal128 _NOTHROW(copysignd128, ()); extern _Decimal32 _NOTHROW(nand32, ()); extern _Decimal64 _NOTHROW(nand64, ()); extern _Decimal128 _NOTHROW(nand128, ()); extern _Decimal32 _NOTHROW(nextafterd32, ()); extern _Decimal64 _NOTHROW(nextafterd64, ()); extern _Decimal128 _NOTHROW(nextafterd128, ()); extern _Decimal32 _NOTHROW(nexttowardd32, ()); extern _Decimal64 _NOTHROW(nexttowardd64, ()); extern _Decimal128 _NOTHROW(nexttowardd128, ()); extern _Decimal32 _NOTHROW(fdimd32, ()); extern _Decimal64 _NOTHROW(fdimd64, ()); extern _Decimal128 _NOTHROW(fdimd128, ()); extern _Decimal32 _NOTHROW(fmaxd32, ()); extern _Decimal64 _NOTHROW(fmaxd64, ()); extern _Decimal128 _NOTHROW(fmaxd128, ()); extern _Decimal32 _NOTHROW(fmind32, ()); extern _Decimal64 _NOTHROW(fmind64, ()); extern _Decimal128 _NOTHROW(fmind128, ()); extern _Decimal32 _NOTHROW(fabsd32, ()); extern _Decimal64 _NOTHROW(fabsd64, ()); extern _Decimal128 _NOTHROW(fabsd128, ()); extern _Decimal32 _NOTHROW(frexpd32, ()); extern _Decimal64 _NOTHROW(frexpd64, ()); extern _Decimal128 _NOTHROW(frexpd128, ()); extern int _NOTHROW(ilogbd32, ()); extern int _NOTHROW(ilogbd64, ()); extern int _NOTHROW(ilogbd128, ()); extern _Decimal32 _NOTHROW(logbd32, ()); extern _Decimal64 _NOTHROW(logbd64, ()); extern _Decimal128 _NOTHROW(logbd128, ()); extern _Decimal32 _NOTHROW(ldexpd32, ()); extern _Decimal64 _NOTHROW(ldexpd64, ()); extern _Decimal128 _NOTHROW(ldexpd128, ()); extern _Decimal32 _NOTHROW(modfd32, ()); extern _Decimal64 _NOTHROW(modfd64, ()); extern _Decimal128 _NOTHROW(modfd128, ()); extern _Decimal32 _NOTHROW(scalbnd32, ()); extern _Decimal64 _NOTHROW(scalbnd64, ()); extern _Decimal128 _NOTHROW(scalbnd128, ()); extern _Decimal32 _NOTHROW(scalblnd32, ()); extern _Decimal64 _NOTHROW(scalblnd64, ()); extern _Decimal128 _NOTHROW(scalblnd128, ()); extern _Decimal32 _NOTHROW(quantized32, ()); extern _Decimal64 _NOTHROW(quantized64, ()); extern _Decimal128 _NOTHROW(quantized128, ()); extern __bool__ _NOTHROW(samequantumd32, ()); extern __bool__ _NOTHROW(samequantumd64, ()); extern __bool__ _NOTHROW(samequantumd128, ()); extern _Decimal32 _NOTHROW(expd32, ()); extern _Decimal64 _NOTHROW(expd64, ()); extern _Decimal128 _NOTHROW(expd128, ()); extern _Decimal32 _NOTHROW(log10d32, ()); extern _Decimal64 _NOTHROW(log10d64, ()); extern _Decimal128 _NOTHROW(log10d128, ()); extern _Decimal32 _NOTHROW(logd32, ()); extern _Decimal64 _NOTHROW(logd64, ()); extern _Decimal128 _NOTHROW(logd128, ()); extern _Decimal32 _NOTHROW(powd32, ()); extern _Decimal64 _NOTHROW(powd64, ()); extern _Decimal128 _NOTHROW(powd128, ()); extern _Decimal32 _NOTHROW(sqrtd32, ()); extern _Decimal64 _NOTHROW(sqrtd64, ()); extern _Decimal128 _NOTHROW(sqrtd128, ()); extern _Decimal32 _NOTHROW(cosd32, ()); extern _Decimal64 _NOTHROW(cosd64, ()); extern _Decimal128 _NOTHROW(cosd128, ()); extern _Decimal32 _NOTHROW(cospid32, ()); extern _Decimal64 _NOTHROW(cospid64, ()); extern _Decimal128 _NOTHROW(cospid128, ()); extern _Decimal32 _NOTHROW(sind32, ()); extern _Decimal64 _NOTHROW(sind64, ()); extern _Decimal128 _NOTHROW(sind128, ()); extern _Decimal32 _NOTHROW(sinpid32, ()); extern _Decimal64 _NOTHROW(sinpid64, ()); extern _Decimal128 _NOTHROW(sinpid128, ()); extern _Decimal32 _NOTHROW(tand32, ()); extern _Decimal64 _NOTHROW(tand64, ()); extern _Decimal128 _NOTHROW(tand128, ()); extern _Decimal32 _NOTHROW(atan2d32, ()); extern _Decimal64 _NOTHROW(atan2d64, ()); extern _Decimal128 _NOTHROW(atan2d128, ()); extern _Decimal32 _NOTHROW(atand32, ()); extern _Decimal64 _NOTHROW(atand64, ()); extern _Decimal128 _NOTHROW(atand128, ()); extern _Decimal32 _NOTHROW(atanpid32, ()); extern _Decimal64 _NOTHROW(atanpid64, ()); extern _Decimal128 _NOTHROW(atanpid128, ()); extern _Decimal32 _NOTHROW(acosd32, ()); extern _Decimal64 _NOTHROW(acosd64, ()); extern _Decimal128 _NOTHROW(acosd128, ()); extern _Decimal32 _NOTHROW(asind32, ()); extern _Decimal64 _NOTHROW(asind64, ()); extern _Decimal128 _NOTHROW(asind128, ()); extern _Decimal32 _NOTHROW(coshd32, ()); extern _Decimal64 _NOTHROW(coshd64, ()); extern _Decimal128 _NOTHROW(coshd128, ()); extern _Decimal32 _NOTHROW(sinhd32, ()); extern _Decimal64 _NOTHROW(sinhd64, ()); extern _Decimal128 _NOTHROW(sinhd128, ()); extern _Decimal32 _NOTHROW(tanhd32, ()); extern _Decimal64 _NOTHROW(tanhd64, ()); extern _Decimal128 _NOTHROW(tanhd128, ()); extern _Decimal32 _NOTHROW(erfcd32, ()); extern _Decimal64 _NOTHROW(erfcd64, ()); extern _Decimal128 _NOTHROW(erfcd128, ()); extern _Decimal32 _NOTHROW(erfd32, ()); extern _Decimal64 _NOTHROW(erfd64, ()); extern _Decimal128 _NOTHROW(erfd128, ()); extern _Decimal32 _NOTHROW(lgammad32, ()); extern _Decimal64 _NOTHROW(lgammad64, ()); extern _Decimal128 _NOTHROW(lgammad128, ()); extern _Decimal32 _NOTHROW(remainderd32, ()); extern _Decimal64 _NOTHROW(remainderd64, ()); extern _Decimal128 _NOTHROW(remainderd128, ()); extern _Decimal32 _NOTHROW(tgammad32, ()); extern _Decimal64 _NOTHROW(tgammad64, ()); extern _Decimal128 _NOTHROW(tgammad128, ()); extern _Decimal32 _NOTHROW(acoshd32, ()); extern _Decimal64 _NOTHROW(acoshd64, ()); extern _Decimal128 _NOTHROW(acoshd128, ()); extern _Decimal32 _NOTHROW(asinhd32, ()); extern _Decimal64 _NOTHROW(asinhd64, ()); extern _Decimal128 _NOTHROW(asinhd128, ()); extern _Decimal32 _NOTHROW(atanhd32, ()); extern _Decimal64 _NOTHROW(atanhd64, ()); extern _Decimal128 _NOTHROW(atanhd128, ()); extern _Decimal32 _NOTHROW(cbrtd32, ()); extern _Decimal64 _NOTHROW(cbrtd64, ()); extern _Decimal128 _NOTHROW(cbrtd128, ()); extern _Decimal32 _NOTHROW(expm1d32, ()); extern _Decimal64 _NOTHROW(expm1d64, ()); extern _Decimal128 _NOTHROW(expm1d128, ()); extern _Decimal32 _NOTHROW(log1pd32, ()); extern _Decimal64 _NOTHROW(log1pd64, ()); extern _Decimal128 _NOTHROW(log1pd128, ()); extern _Decimal32 _NOTHROW(exp2d32, ()); extern _Decimal64 _NOTHROW(exp2d64, ()); extern _Decimal128 _NOTHROW(exp2d128, ()); extern _Decimal32 _NOTHROW(hypotd32, ()); extern _Decimal64 _NOTHROW(hypotd64, ()); extern _Decimal128 _NOTHROW(hypotd128, ()); extern _Decimal32 _NOTHROW(log2d32, ()); extern _Decimal64 _NOTHROW(log2d64, ()); extern _Decimal128 _NOTHROW(log2d128, ()); extern _Decimal32 _NOTHROW(remquod32, ()); extern _Decimal64 _NOTHROW(remquod64, ()); extern _Decimal128 _NOTHROW(remquod128, ()); extern _Decimal32 _NOTHROW(fmodd32, ()); extern _Decimal64 _NOTHROW(fmodd64, ()); extern _Decimal128 _NOTHROW(fmodd128, ()); extern _Decimal128 _NOTHROW(fmad128, ()); #else /* _NO_PROTO */ extern _Decimal32 _NOTHROW(ceild32, (_Decimal32)); extern _Decimal64 _NOTHROW(ceild64, (_Decimal64)); extern _Decimal128 _NOTHROW(ceild128, (_Decimal128)); extern _Decimal32 _NOTHROW(floord32, (_Decimal32)); extern _Decimal64 _NOTHROW(floord64, (_Decimal64)); extern _Decimal128 _NOTHROW(floord128, (_Decimal128)); extern _Decimal32 _NOTHROW(nearbyintd32, (_Decimal32)); extern _Decimal64 _NOTHROW(nearbyintd64, (_Decimal64)); extern _Decimal128 _NOTHROW(nearbyintd128, (_Decimal128)); extern _Decimal32 _NOTHROW(rintd32, (_Decimal32)); extern _Decimal64 _NOTHROW(rintd64, (_Decimal64)); extern _Decimal128 _NOTHROW(rintd128, (_Decimal128)); extern long int _NOTHROW(lrintd32, (_Decimal32)); extern long int _NOTHROW(lrintd64, (_Decimal64)); extern long int _NOTHROW(lrintd128, (_Decimal128)); #ifdef _LONG_LONG extern long long int _NOTHROW(llrintd32, (_Decimal32)); extern long long int _NOTHROW(llrintd64, (_Decimal64)); extern long long int _NOTHROW(llrintd128, (_Decimal128)); #endif extern _Decimal32 _NOTHROW(roundd32, (_Decimal32)); extern _Decimal64 _NOTHROW(roundd64, (_Decimal64)); extern _Decimal128 _NOTHROW(roundd128, (_Decimal128)); extern long int _NOTHROW(lroundd32, (_Decimal32)); extern long int _NOTHROW(lroundd64, (_Decimal64)); extern long int _NOTHROW(lroundd128, (_Decimal128)); #ifdef _LONG_LONG extern long long int _NOTHROW(llroundd32, (_Decimal32)); extern long long int _NOTHROW(llroundd64, (_Decimal64)); extern long long int _NOTHROW(llroundd128, (_Decimal128)); #endif extern _Decimal32 _NOTHROW(truncd32, (_Decimal32)); extern _Decimal64 _NOTHROW(truncd64, (_Decimal64)); extern _Decimal128 _NOTHROW(truncd128, (_Decimal128)); extern _Decimal32 _NOTHROW(copysignd32, (_Decimal32, _Decimal32)); extern _Decimal64 _NOTHROW(copysignd64, (_Decimal64, _Decimal64)); extern _Decimal128 _NOTHROW(copysignd128, (_Decimal128, _Decimal128)); extern _Decimal32 _NOTHROW(nand32, (const char *)); extern _Decimal64 _NOTHROW(nand64, (const char *)); extern _Decimal128 _NOTHROW(nand128, (const char *)); extern _Decimal32 _NOTHROW(nextafterd32, (_Decimal32, _Decimal32)); extern _Decimal64 _NOTHROW(nextafterd64, (_Decimal64, _Decimal64)); extern _Decimal128 _NOTHROW(nextafterd128, (_Decimal128, _Decimal128)); extern _Decimal32 _NOTHROW(nexttowardd32, (_Decimal32, _Decimal128)); extern _Decimal64 _NOTHROW(nexttowardd64, (_Decimal64, _Decimal128)); extern _Decimal128 _NOTHROW(nexttowardd128, (_Decimal128, _Decimal128)); extern _Decimal32 _NOTHROW(fdimd32, (_Decimal32, _Decimal32)); extern _Decimal64 _NOTHROW(fdimd64, (_Decimal64, _Decimal64)); extern _Decimal128 _NOTHROW(fdimd128, (_Decimal128, _Decimal128)); extern _Decimal32 _NOTHROW(fmaxd32, (_Decimal32, _Decimal32)); extern _Decimal64 _NOTHROW(fmaxd64, (_Decimal64, _Decimal64)); extern _Decimal128 _NOTHROW(fmaxd128, (_Decimal128, _Decimal128)); extern _Decimal32 _NOTHROW(fmind32, (_Decimal32, _Decimal32)); extern _Decimal64 _NOTHROW(fmind64, (_Decimal64, _Decimal64)); extern _Decimal128 _NOTHROW(fmind128, (_Decimal128, _Decimal128)); extern _Decimal32 _NOTHROW(fabsd32, (_Decimal32)); extern _Decimal64 _NOTHROW(fabsd64, (_Decimal64)); extern _Decimal128 _NOTHROW(fabsd128, (_Decimal128)); extern _Decimal32 _NOTHROW(frexpd32, (_Decimal32, int *)); extern _Decimal64 _NOTHROW(frexpd64, (_Decimal64, int *)); extern _Decimal128 _NOTHROW(frexpd128, (_Decimal128, int *)); extern int _NOTHROW(ilogbd32, (_Decimal32)); extern int _NOTHROW(ilogbd64, (_Decimal64)); extern int _NOTHROW(ilogbd128, (_Decimal128)); extern _Decimal32 _NOTHROW(logbd32, (_Decimal32)); extern _Decimal64 _NOTHROW(logbd64, (_Decimal64)); extern _Decimal128 _NOTHROW(logbd128, (_Decimal128)); extern _Decimal32 _NOTHROW(ldexpd32, (_Decimal32, int)); extern _Decimal64 _NOTHROW(ldexpd64, (_Decimal64, int)); extern _Decimal128 _NOTHROW(ldexpd128, (_Decimal128, int)); extern _Decimal32 _NOTHROW(modfd32, (_Decimal32, _Decimal32 *)); extern _Decimal64 _NOTHROW(modfd64, (_Decimal64, _Decimal64 *)); extern _Decimal128 _NOTHROW(modfd128, (_Decimal128, _Decimal128 *)); extern _Decimal32 _NOTHROW(scalbnd32, (_Decimal32, int)); extern _Decimal64 _NOTHROW(scalbnd64, (_Decimal64, int)); extern _Decimal128 _NOTHROW(scalbnd128, (_Decimal128, int)); extern _Decimal32 _NOTHROW(scalblnd32, (_Decimal32, long int)); extern _Decimal64 _NOTHROW(scalblnd64, (_Decimal64, long int)); extern _Decimal128 _NOTHROW(scalblnd128, (_Decimal128, long int)); extern _Decimal32 _NOTHROW(quantized32, (_Decimal32, _Decimal32)); extern _Decimal64 _NOTHROW(quantized64, (_Decimal64, _Decimal64)); extern _Decimal128 _NOTHROW(quantized128, (_Decimal128, _Decimal128)); extern __bool__ _NOTHROW(samequantumd32, (_Decimal32, _Decimal32)); extern __bool__ _NOTHROW(samequantumd64, (_Decimal64, _Decimal64)); extern __bool__ _NOTHROW(samequantumd128, (_Decimal128, _Decimal128)); extern _Decimal32 _NOTHROW(expd32, (_Decimal32)); extern _Decimal64 _NOTHROW(expd64, (_Decimal64)); extern _Decimal128 _NOTHROW(expd128, (_Decimal128)); extern _Decimal32 _NOTHROW(log10d32, (_Decimal32)); extern _Decimal64 _NOTHROW(log10d64, (_Decimal64)); extern _Decimal128 _NOTHROW(log10d128, (_Decimal128)); extern _Decimal32 _NOTHROW(logd32, (_Decimal32)); extern _Decimal64 _NOTHROW(logd64, (_Decimal64)); extern _Decimal128 _NOTHROW(logd128, (_Decimal128)); extern _Decimal32 _NOTHROW(powd32, (_Decimal32, _Decimal32)); extern _Decimal64 _NOTHROW(powd64, (_Decimal64, _Decimal64)); extern _Decimal128 _NOTHROW(powd128, (_Decimal128, _Decimal128)); extern _Decimal32 _NOTHROW(sqrtd32, (_Decimal32)); extern _Decimal64 _NOTHROW(sqrtd64, (_Decimal64)); extern _Decimal128 _NOTHROW(sqrtd128, (_Decimal128)); extern _Decimal32 _NOTHROW(cosd32, (_Decimal32)); extern _Decimal64 _NOTHROW(cosd64, (_Decimal64)); extern _Decimal128 _NOTHROW(cosd128, (_Decimal128)); extern _Decimal32 _NOTHROW(cospid32, (_Decimal32)); extern _Decimal64 _NOTHROW(cospid64, (_Decimal64)); extern _Decimal128 _NOTHROW(cospid128, (_Decimal128)); extern _Decimal32 _NOTHROW(sind32, (_Decimal32)); extern _Decimal64 _NOTHROW(sind64, (_Decimal64)); extern _Decimal128 _NOTHROW(sind128, (_Decimal128)); extern _Decimal32 _NOTHROW(sinpid32, (_Decimal32)); extern _Decimal64 _NOTHROW(sinpid64, (_Decimal64)); extern _Decimal128 _NOTHROW(sinpid128, (_Decimal128)); extern _Decimal32 _NOTHROW(tand32, (_Decimal32)); extern _Decimal64 _NOTHROW(tand64, (_Decimal64)); extern _Decimal128 _NOTHROW(tand128, (_Decimal128)); extern _Decimal32 _NOTHROW(atan2d32, (_Decimal32, _Decimal32)); extern _Decimal64 _NOTHROW(atan2d64, (_Decimal64, _Decimal64)); extern _Decimal128 _NOTHROW(atan2d128, (_Decimal128, _Decimal128)); extern _Decimal32 _NOTHROW(atand32, (_Decimal32)); extern _Decimal64 _NOTHROW(atand64, (_Decimal64)); extern _Decimal128 _NOTHROW(atand128, (_Decimal128)); extern _Decimal32 _NOTHROW(atanpid32, (_Decimal32)); extern _Decimal64 _NOTHROW(atanpid64, (_Decimal64)); extern _Decimal128 _NOTHROW(atanpid128, (_Decimal128)); extern _Decimal32 _NOTHROW(acosd32, (_Decimal32)); extern _Decimal64 _NOTHROW(acosd64, (_Decimal64)); extern _Decimal128 _NOTHROW(acosd128, (_Decimal128)); extern _Decimal32 _NOTHROW(asind32, (_Decimal32)); extern _Decimal64 _NOTHROW(asind64, (_Decimal64)); extern _Decimal128 _NOTHROW(asind128, (_Decimal128)); extern _Decimal32 _NOTHROW(coshd32, (_Decimal32)); extern _Decimal64 _NOTHROW(coshd64, (_Decimal64)); extern _Decimal128 _NOTHROW(coshd128, (_Decimal128)); extern _Decimal32 _NOTHROW(sinhd32, (_Decimal32)); extern _Decimal64 _NOTHROW(sinhd64, (_Decimal64)); extern _Decimal128 _NOTHROW(sinhd128, (_Decimal128)); extern _Decimal32 _NOTHROW(tanhd32, (_Decimal32)); extern _Decimal64 _NOTHROW(tanhd64, (_Decimal64)); extern _Decimal128 _NOTHROW(tanhd128, (_Decimal128)); extern _Decimal32 _NOTHROW(erfcd32, (_Decimal32)); extern _Decimal64 _NOTHROW(erfcd64, (_Decimal64)); extern _Decimal128 _NOTHROW(erfcd128, (_Decimal128)); extern _Decimal32 _NOTHROW(erfd32, (_Decimal32)); extern _Decimal64 _NOTHROW(erfd64, (_Decimal64)); extern _Decimal128 _NOTHROW(erfd128, (_Decimal128)); extern _Decimal32 _NOTHROW(lgammad32, (_Decimal32)); extern _Decimal64 _NOTHROW(lgammad64, (_Decimal64)); extern _Decimal128 _NOTHROW(lgammad128, (_Decimal128)); extern _Decimal32 _NOTHROW(remainderd32, (_Decimal32, _Decimal32)); extern _Decimal64 _NOTHROW(remainderd64, (_Decimal64, _Decimal64)); extern _Decimal128 _NOTHROW(remainderd128, (_Decimal128, _Decimal128)); extern _Decimal32 _NOTHROW(tgammad32, (_Decimal32)); extern _Decimal64 _NOTHROW(tgammad64, (_Decimal64)); extern _Decimal128 _NOTHROW(tgammad128, (_Decimal128)); extern _Decimal32 _NOTHROW(acoshd32, (_Decimal32)); extern _Decimal64 _NOTHROW(acoshd64, (_Decimal64)); extern _Decimal128 _NOTHROW(acoshd128, (_Decimal128)); extern _Decimal32 _NOTHROW(asinhd32, (_Decimal32)); extern _Decimal64 _NOTHROW(asinhd64, (_Decimal64)); extern _Decimal128 _NOTHROW(asinhd128, (_Decimal128)); extern _Decimal32 _NOTHROW(atanhd32, (_Decimal32)); extern _Decimal64 _NOTHROW(atanhd64, (_Decimal64)); extern _Decimal128 _NOTHROW(atanhd128, (_Decimal128)); extern _Decimal32 _NOTHROW(cbrtd32, (_Decimal32)); extern _Decimal64 _NOTHROW(cbrtd64, (_Decimal64)); extern _Decimal128 _NOTHROW(cbrtd128, (_Decimal128)); extern _Decimal32 _NOTHROW(expm1d32, (_Decimal32)); extern _Decimal64 _NOTHROW(expm1d64, (_Decimal64)); extern _Decimal128 _NOTHROW(expm1d128, (_Decimal128)); extern _Decimal32 _NOTHROW(log1pd32, (_Decimal32)); extern _Decimal64 _NOTHROW(log1pd64, (_Decimal64)); extern _Decimal128 _NOTHROW(log1pd128, (_Decimal128)); extern _Decimal32 _NOTHROW(exp2d32, (_Decimal32)); extern _Decimal64 _NOTHROW(exp2d64, (_Decimal64)); extern _Decimal128 _NOTHROW(exp2d128, (_Decimal128)); extern _Decimal32 _NOTHROW(hypotd32, (_Decimal32, _Decimal32)); extern _Decimal64 _NOTHROW(hypotd64, (_Decimal64, _Decimal64)); extern _Decimal128 _NOTHROW(hypotd128, (_Decimal128, _Decimal128)); extern _Decimal32 _NOTHROW(log2d32, (_Decimal32)); extern _Decimal64 _NOTHROW(log2d64, (_Decimal64)); extern _Decimal128 _NOTHROW(log2d128, (_Decimal128)); extern _Decimal32 _NOTHROW(remquod32, (_Decimal32, _Decimal32, int*)); extern _Decimal64 _NOTHROW(remquod64, (_Decimal64, _Decimal64, int*)); extern _Decimal128 _NOTHROW(remquod128, (_Decimal128, _Decimal128, int*)); extern _Decimal32 _NOTHROW(fmodd32, (_Decimal32, _Decimal32)); extern _Decimal64 _NOTHROW(fmodd64, (_Decimal64, _Decimal64)); extern _Decimal128 _NOTHROW(fmodd128, (_Decimal128, _Decimal128)); extern _Decimal128 _NOTHROW(fmad128, (_Decimal128, _Decimal128, _Decimal128)); #endif /* _NO_PROTO */ #endif /* __STDC_WANT_DEC_FP__ */ #ifdef __cplusplus } #endif #endif /*_H_MATH */