125c28e83SPiotr Jasiukajtis /* 225c28e83SPiotr Jasiukajtis * CDDL HEADER START 325c28e83SPiotr Jasiukajtis * 425c28e83SPiotr Jasiukajtis * The contents of this file are subject to the terms of the 525c28e83SPiotr Jasiukajtis * Common Development and Distribution License (the "License"). 625c28e83SPiotr Jasiukajtis * You may not use this file except in compliance with the License. 725c28e83SPiotr Jasiukajtis * 825c28e83SPiotr Jasiukajtis * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 925c28e83SPiotr Jasiukajtis * or http://www.opensolaris.org/os/licensing. 1025c28e83SPiotr Jasiukajtis * See the License for the specific language governing permissions 1125c28e83SPiotr Jasiukajtis * and limitations under the License. 1225c28e83SPiotr Jasiukajtis * 1325c28e83SPiotr Jasiukajtis * When distributing Covered Code, include this CDDL HEADER in each 1425c28e83SPiotr Jasiukajtis * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 1525c28e83SPiotr Jasiukajtis * If applicable, add the following below this CDDL HEADER, with the 1625c28e83SPiotr Jasiukajtis * fields enclosed by brackets "[]" replaced with your own identifying 1725c28e83SPiotr Jasiukajtis * information: Portions Copyright [yyyy] [name of copyright owner] 1825c28e83SPiotr Jasiukajtis * 1925c28e83SPiotr Jasiukajtis * CDDL HEADER END 2025c28e83SPiotr Jasiukajtis */ 2125c28e83SPiotr Jasiukajtis /* 2225c28e83SPiotr Jasiukajtis * Copyright 2011 Nexenta Systems, Inc. All rights reserved. 2325c28e83SPiotr Jasiukajtis */ 2425c28e83SPiotr Jasiukajtis /* 2525c28e83SPiotr Jasiukajtis * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 2625c28e83SPiotr Jasiukajtis * Use is subject to license terms. 2725c28e83SPiotr Jasiukajtis */ 2825c28e83SPiotr Jasiukajtis 2925c28e83SPiotr Jasiukajtis #ifndef _ISO_MATH_C99_H 3025c28e83SPiotr Jasiukajtis #define _ISO_MATH_C99_H 3125c28e83SPiotr Jasiukajtis 3225c28e83SPiotr Jasiukajtis #include <sys/isa_defs.h> 3325c28e83SPiotr Jasiukajtis #include <sys/feature_tests.h> 3425c28e83SPiotr Jasiukajtis 3525c28e83SPiotr Jasiukajtis #ifdef __cplusplus 3625c28e83SPiotr Jasiukajtis extern "C" { 3725c28e83SPiotr Jasiukajtis #endif 3825c28e83SPiotr Jasiukajtis 3925c28e83SPiotr Jasiukajtis #if defined(_STDC_C99) || _XOPEN_SOURCE - 0 >= 600 || defined(__C99FEATURES__) 4025c28e83SPiotr Jasiukajtis #if defined(__GNUC__) 4125c28e83SPiotr Jasiukajtis #undef HUGE_VAL 4225c28e83SPiotr Jasiukajtis #define HUGE_VAL (__builtin_huge_val()) 4325c28e83SPiotr Jasiukajtis #undef HUGE_VALF 4425c28e83SPiotr Jasiukajtis #define HUGE_VALF (__builtin_huge_valf()) 4525c28e83SPiotr Jasiukajtis #undef HUGE_VALL 4625c28e83SPiotr Jasiukajtis #define HUGE_VALL (__builtin_huge_vall()) 4725c28e83SPiotr Jasiukajtis #undef INFINITY 4825c28e83SPiotr Jasiukajtis #define INFINITY (__builtin_inff()) 4925c28e83SPiotr Jasiukajtis #undef NAN 5025c28e83SPiotr Jasiukajtis #define NAN (__builtin_nanf("")) 5125c28e83SPiotr Jasiukajtis 5225c28e83SPiotr Jasiukajtis /* 5325c28e83SPiotr Jasiukajtis * C99 7.12.3 classification macros 5425c28e83SPiotr Jasiukajtis */ 5525c28e83SPiotr Jasiukajtis #undef isnan 5625c28e83SPiotr Jasiukajtis #undef isinf 5725c28e83SPiotr Jasiukajtis #if __GNUC__ >= 4 5825c28e83SPiotr Jasiukajtis #define isnan(x) __builtin_isnan(x) 5925c28e83SPiotr Jasiukajtis #define isinf(x) __builtin_isinf(x) 6025c28e83SPiotr Jasiukajtis #else 6125c28e83SPiotr Jasiukajtis #define isnan(x) __extension__( \ 6225c28e83SPiotr Jasiukajtis { __typeof(x) __x_n = (x); \ 6325c28e83SPiotr Jasiukajtis __builtin_isunordered(__x_n, __x_n); }) 6425c28e83SPiotr Jasiukajtis #define isinf(x) __extension__( \ 6525c28e83SPiotr Jasiukajtis { __typeof(x) __x_i = (x); \ 6625c28e83SPiotr Jasiukajtis __x_i == (__typeof(__x_i)) INFINITY || \ 6725c28e83SPiotr Jasiukajtis __x_i == (__typeof(__x_i)) (-INFINITY); }) 6825c28e83SPiotr Jasiukajtis #endif 6925c28e83SPiotr Jasiukajtis #undef isfinite 7025c28e83SPiotr Jasiukajtis #define isfinite(x) __extension__( \ 7125c28e83SPiotr Jasiukajtis { __typeof(x) __x_f = (x); \ 7225c28e83SPiotr Jasiukajtis !isnan(__x_f) && !isinf(__x_f); }) 7325c28e83SPiotr Jasiukajtis #undef isnormal 7425c28e83SPiotr Jasiukajtis #define isnormal(x) __extension__( \ 7525c28e83SPiotr Jasiukajtis { __typeof(x) __x_r = (x); isfinite(__x_r) && \ 7625c28e83SPiotr Jasiukajtis (sizeof (__x_r) == sizeof (float) ? \ 7725c28e83SPiotr Jasiukajtis __builtin_fabsf(__x_r) >= __FLT_MIN__ : \ 7825c28e83SPiotr Jasiukajtis sizeof (__x_r) == sizeof (double) ? \ 7925c28e83SPiotr Jasiukajtis __builtin_fabs(__x_r) >= __DBL_MIN__ : \ 8025c28e83SPiotr Jasiukajtis __builtin_fabsl(__x_r) >= __LDBL_MIN__); }) 8125c28e83SPiotr Jasiukajtis #undef fpclassify 8225c28e83SPiotr Jasiukajtis #define fpclassify(x) __extension__( \ 8325c28e83SPiotr Jasiukajtis { __typeof(x) __x_c = (x); \ 8425c28e83SPiotr Jasiukajtis isnan(__x_c) ? FP_NAN : \ 8525c28e83SPiotr Jasiukajtis isinf(__x_c) ? FP_INFINITE : \ 8625c28e83SPiotr Jasiukajtis isnormal(__x_c) ? FP_NORMAL : \ 8725c28e83SPiotr Jasiukajtis __x_c == (__typeof(__x_c)) 0 ? FP_ZERO : \ 8825c28e83SPiotr Jasiukajtis FP_SUBNORMAL; }) 8925c28e83SPiotr Jasiukajtis #undef signbit 9025c28e83SPiotr Jasiukajtis #if defined(_BIG_ENDIAN) 9125c28e83SPiotr Jasiukajtis #define signbit(x) __extension__( \ 9225c28e83SPiotr Jasiukajtis { __typeof(x) __x_s = (x); \ 93*9938df9eSRichard Lowe (int)(*(unsigned *)&__x_s >> 31); }) 9425c28e83SPiotr Jasiukajtis #elif defined(_LITTLE_ENDIAN) 9525c28e83SPiotr Jasiukajtis #define signbit(x) __extension__( \ 9625c28e83SPiotr Jasiukajtis { __typeof(x) __x_s = (x); \ 9725c28e83SPiotr Jasiukajtis (sizeof (__x_s) == sizeof (float) ? \ 98*9938df9eSRichard Lowe (int)(*(unsigned *)&__x_s >> 31) : \ 9925c28e83SPiotr Jasiukajtis sizeof (__x_s) == sizeof (double) ? \ 100*9938df9eSRichard Lowe (int)(((unsigned *)&__x_s)[1] >> 31) : \ 101*9938df9eSRichard Lowe (int)(((unsigned short *)&__x_s)[4] >> 15)); }) 10225c28e83SPiotr Jasiukajtis #endif 10325c28e83SPiotr Jasiukajtis 10425c28e83SPiotr Jasiukajtis /* 10525c28e83SPiotr Jasiukajtis * C99 7.12.14 comparison macros 10625c28e83SPiotr Jasiukajtis */ 10725c28e83SPiotr Jasiukajtis #undef isgreater 10825c28e83SPiotr Jasiukajtis #define isgreater(x, y) __builtin_isgreater(x, y) 10925c28e83SPiotr Jasiukajtis #undef isgreaterequal 11025c28e83SPiotr Jasiukajtis #define isgreaterequal(x, y) __builtin_isgreaterequal(x, y) 11125c28e83SPiotr Jasiukajtis #undef isless 11225c28e83SPiotr Jasiukajtis #define isless(x, y) __builtin_isless(x, y) 11325c28e83SPiotr Jasiukajtis #undef islessequal 11425c28e83SPiotr Jasiukajtis #define islessequal(x, y) __builtin_islessequal(x, y) 11525c28e83SPiotr Jasiukajtis #undef islessgreater 11625c28e83SPiotr Jasiukajtis #define islessgreater(x, y) __builtin_islessgreater(x, y) 11725c28e83SPiotr Jasiukajtis #undef isunordered 11825c28e83SPiotr Jasiukajtis #define isunordered(x, y) __builtin_isunordered(x, y) 11925c28e83SPiotr Jasiukajtis #else /* defined(__GNUC__) */ 12025c28e83SPiotr Jasiukajtis #undef HUGE_VAL 12125c28e83SPiotr Jasiukajtis #define HUGE_VAL __builtin_huge_val 12225c28e83SPiotr Jasiukajtis #undef HUGE_VALF 12325c28e83SPiotr Jasiukajtis #define HUGE_VALF __builtin_huge_valf 12425c28e83SPiotr Jasiukajtis #undef HUGE_VALL 12525c28e83SPiotr Jasiukajtis #define HUGE_VALL __builtin_huge_vall 12625c28e83SPiotr Jasiukajtis #undef INFINITY 12725c28e83SPiotr Jasiukajtis #define INFINITY __builtin_infinity 12825c28e83SPiotr Jasiukajtis #undef NAN 12925c28e83SPiotr Jasiukajtis #define NAN __builtin_nan 13025c28e83SPiotr Jasiukajtis 13125c28e83SPiotr Jasiukajtis /* 13225c28e83SPiotr Jasiukajtis * C99 7.12.3 classification macros 13325c28e83SPiotr Jasiukajtis */ 13425c28e83SPiotr Jasiukajtis #undef fpclassify 13525c28e83SPiotr Jasiukajtis #define fpclassify(x) __builtin_fpclassify(x) 13625c28e83SPiotr Jasiukajtis #undef isfinite 13725c28e83SPiotr Jasiukajtis #define isfinite(x) __builtin_isfinite(x) 13825c28e83SPiotr Jasiukajtis #undef isinf 13925c28e83SPiotr Jasiukajtis #define isinf(x) __builtin_isinf(x) 14025c28e83SPiotr Jasiukajtis #undef isnan 14125c28e83SPiotr Jasiukajtis #define isnan(x) __builtin_isnan(x) 14225c28e83SPiotr Jasiukajtis #undef isnormal 14325c28e83SPiotr Jasiukajtis #define isnormal(x) __builtin_isnormal(x) 14425c28e83SPiotr Jasiukajtis #undef signbit 14525c28e83SPiotr Jasiukajtis #define signbit(x) __builtin_signbit(x) 14625c28e83SPiotr Jasiukajtis 14725c28e83SPiotr Jasiukajtis /* 14825c28e83SPiotr Jasiukajtis * C99 7.12.14 comparison macros 14925c28e83SPiotr Jasiukajtis */ 15025c28e83SPiotr Jasiukajtis #undef isgreater 15125c28e83SPiotr Jasiukajtis #define isgreater(x, y) ((x) __builtin_isgreater(y)) 15225c28e83SPiotr Jasiukajtis #undef isgreaterequal 15325c28e83SPiotr Jasiukajtis #define isgreaterequal(x, y) ((x) __builtin_isgreaterequal(y)) 15425c28e83SPiotr Jasiukajtis #undef isless 15525c28e83SPiotr Jasiukajtis #define isless(x, y) ((x) __builtin_isless(y)) 15625c28e83SPiotr Jasiukajtis #undef islessequal 15725c28e83SPiotr Jasiukajtis #define islessequal(x, y) ((x) __builtin_islessequal(y)) 15825c28e83SPiotr Jasiukajtis #undef islessgreater 15925c28e83SPiotr Jasiukajtis #define islessgreater(x, y) ((x) __builtin_islessgreater(y)) 16025c28e83SPiotr Jasiukajtis #undef isunordered 16125c28e83SPiotr Jasiukajtis #define isunordered(x, y) ((x) __builtin_isunordered(y)) 16225c28e83SPiotr Jasiukajtis #endif /* defined(__GNUC__) */ 16325c28e83SPiotr Jasiukajtis #endif /* defined(_STDC_C99) || _XOPEN_SOURCE - 0 >= 600 || ... */ 16425c28e83SPiotr Jasiukajtis 16525c28e83SPiotr Jasiukajtis #if defined(__EXTENSIONS__) || defined(_STDC_C99) || \ 16625c28e83SPiotr Jasiukajtis (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \ 16725c28e83SPiotr Jasiukajtis defined(__C99FEATURES__) 16825c28e83SPiotr Jasiukajtis #if defined(__FLT_EVAL_METHOD__) && __FLT_EVAL_METHOD__ - 0 == 0 16925c28e83SPiotr Jasiukajtis typedef float float_t; 17025c28e83SPiotr Jasiukajtis typedef double double_t; 17125c28e83SPiotr Jasiukajtis #elif __FLT_EVAL_METHOD__ - 0 == 1 17225c28e83SPiotr Jasiukajtis typedef double float_t; 17325c28e83SPiotr Jasiukajtis typedef double double_t; 17425c28e83SPiotr Jasiukajtis #elif __FLT_EVAL_METHOD__ - 0 == 2 17525c28e83SPiotr Jasiukajtis typedef long double float_t; 17625c28e83SPiotr Jasiukajtis typedef long double double_t; 17725c28e83SPiotr Jasiukajtis #elif defined(__sparc) || defined(__amd64) 17825c28e83SPiotr Jasiukajtis typedef float float_t; 17925c28e83SPiotr Jasiukajtis typedef double double_t; 18025c28e83SPiotr Jasiukajtis #elif defined(__i386) 18125c28e83SPiotr Jasiukajtis typedef long double float_t; 18225c28e83SPiotr Jasiukajtis typedef long double double_t; 18325c28e83SPiotr Jasiukajtis #endif 18425c28e83SPiotr Jasiukajtis 18525c28e83SPiotr Jasiukajtis #undef FP_ZERO 18625c28e83SPiotr Jasiukajtis #define FP_ZERO 0 18725c28e83SPiotr Jasiukajtis #undef FP_SUBNORMAL 18825c28e83SPiotr Jasiukajtis #define FP_SUBNORMAL 1 18925c28e83SPiotr Jasiukajtis #undef FP_NORMAL 19025c28e83SPiotr Jasiukajtis #define FP_NORMAL 2 19125c28e83SPiotr Jasiukajtis #undef FP_INFINITE 19225c28e83SPiotr Jasiukajtis #define FP_INFINITE 3 19325c28e83SPiotr Jasiukajtis #undef FP_NAN 19425c28e83SPiotr Jasiukajtis #define FP_NAN 4 19525c28e83SPiotr Jasiukajtis 19625c28e83SPiotr Jasiukajtis #undef FP_ILOGB0 19725c28e83SPiotr Jasiukajtis #define FP_ILOGB0 (-2147483647) 19825c28e83SPiotr Jasiukajtis #undef FP_ILOGBNAN 19925c28e83SPiotr Jasiukajtis #define FP_ILOGBNAN 2147483647 20025c28e83SPiotr Jasiukajtis 20125c28e83SPiotr Jasiukajtis #undef MATH_ERRNO 20225c28e83SPiotr Jasiukajtis #define MATH_ERRNO 1 20325c28e83SPiotr Jasiukajtis #undef MATH_ERREXCEPT 20425c28e83SPiotr Jasiukajtis #define MATH_ERREXCEPT 2 20525c28e83SPiotr Jasiukajtis #undef math_errhandling 20625c28e83SPiotr Jasiukajtis #define math_errhandling MATH_ERREXCEPT 20725c28e83SPiotr Jasiukajtis 208*9938df9eSRichard Lowe extern double acosh(double); 209*9938df9eSRichard Lowe extern double asinh(double); 210*9938df9eSRichard Lowe extern double atanh(double); 211*9938df9eSRichard Lowe 212*9938df9eSRichard Lowe extern double exp2(double); 213*9938df9eSRichard Lowe extern double expm1(double); 214*9938df9eSRichard Lowe extern int ilogb(double); 215*9938df9eSRichard Lowe extern double log1p(double); 216*9938df9eSRichard Lowe extern double log2(double); 217*9938df9eSRichard Lowe extern double logb(double); 218*9938df9eSRichard Lowe extern double scalbn(double, int); 219*9938df9eSRichard Lowe extern double scalbln(double, long int); 220*9938df9eSRichard Lowe 221*9938df9eSRichard Lowe extern double cbrt(double); 222*9938df9eSRichard Lowe extern double hypot(double, double); 223*9938df9eSRichard Lowe 224*9938df9eSRichard Lowe extern double erf(double); 225*9938df9eSRichard Lowe extern double erfc(double); 226*9938df9eSRichard Lowe extern double lgamma(double); 227*9938df9eSRichard Lowe extern double tgamma(double); 228*9938df9eSRichard Lowe 229*9938df9eSRichard Lowe extern double nearbyint(double); 230*9938df9eSRichard Lowe extern double rint(double); 231*9938df9eSRichard Lowe extern long int lrint(double); 232*9938df9eSRichard Lowe extern double round(double); 233*9938df9eSRichard Lowe extern long int lround(double); 234*9938df9eSRichard Lowe extern double trunc(double); 235*9938df9eSRichard Lowe 236*9938df9eSRichard Lowe extern double remainder(double, double); 237*9938df9eSRichard Lowe extern double remquo(double, double, int *); 238*9938df9eSRichard Lowe 239*9938df9eSRichard Lowe extern double copysign(double, double); 240*9938df9eSRichard Lowe extern double nan(const char *); 241*9938df9eSRichard Lowe extern double nextafter(double, double); 242*9938df9eSRichard Lowe extern double nexttoward(double, long double); 243*9938df9eSRichard Lowe 244*9938df9eSRichard Lowe extern double fdim(double, double); 245*9938df9eSRichard Lowe extern double fmax(double, double); 246*9938df9eSRichard Lowe extern double fmin(double, double); 247*9938df9eSRichard Lowe 248*9938df9eSRichard Lowe extern double fma(double, double, double); 249*9938df9eSRichard Lowe 250*9938df9eSRichard Lowe extern float acosf(float); 251*9938df9eSRichard Lowe extern float asinf(float); 252*9938df9eSRichard Lowe extern float atanf(float); 253*9938df9eSRichard Lowe extern float atan2f(float, float); 254*9938df9eSRichard Lowe extern float cosf(float); 255*9938df9eSRichard Lowe extern float sinf(float); 256*9938df9eSRichard Lowe extern float tanf(float); 257*9938df9eSRichard Lowe 258*9938df9eSRichard Lowe extern float acoshf(float); 259*9938df9eSRichard Lowe extern float asinhf(float); 260*9938df9eSRichard Lowe extern float atanhf(float); 261*9938df9eSRichard Lowe extern float coshf(float); 262*9938df9eSRichard Lowe extern float sinhf(float); 263*9938df9eSRichard Lowe extern float tanhf(float); 264*9938df9eSRichard Lowe 265*9938df9eSRichard Lowe extern float expf(float); 266*9938df9eSRichard Lowe extern float exp2f(float); 267*9938df9eSRichard Lowe extern float expm1f(float); 268*9938df9eSRichard Lowe extern float frexpf(float, int *); 269*9938df9eSRichard Lowe extern int ilogbf(float); 270*9938df9eSRichard Lowe extern float ldexpf(float, int); 271*9938df9eSRichard Lowe extern float logf(float); 272*9938df9eSRichard Lowe extern float log10f(float); 273*9938df9eSRichard Lowe extern float log1pf(float); 274*9938df9eSRichard Lowe extern float log2f(float); 275*9938df9eSRichard Lowe extern float logbf(float); 276*9938df9eSRichard Lowe extern float modff(float, float *); 277*9938df9eSRichard Lowe extern float scalbnf(float, int); 278*9938df9eSRichard Lowe extern float scalblnf(float, long int); 279*9938df9eSRichard Lowe 280*9938df9eSRichard Lowe extern float cbrtf(float); 281*9938df9eSRichard Lowe extern float fabsf(float); 282*9938df9eSRichard Lowe extern float hypotf(float, float); 283*9938df9eSRichard Lowe extern float powf(float, float); 284*9938df9eSRichard Lowe extern float sqrtf(float); 285*9938df9eSRichard Lowe 286*9938df9eSRichard Lowe extern float erff(float); 287*9938df9eSRichard Lowe extern float erfcf(float); 288*9938df9eSRichard Lowe extern float lgammaf(float); 289*9938df9eSRichard Lowe extern float tgammaf(float); 290*9938df9eSRichard Lowe 291*9938df9eSRichard Lowe extern float ceilf(float); 292*9938df9eSRichard Lowe extern float floorf(float); 293*9938df9eSRichard Lowe extern float nearbyintf(float); 294*9938df9eSRichard Lowe extern float rintf(float); 295*9938df9eSRichard Lowe extern long int lrintf(float); 296*9938df9eSRichard Lowe extern float roundf(float); 297*9938df9eSRichard Lowe extern long int lroundf(float); 298*9938df9eSRichard Lowe extern float truncf(float); 299*9938df9eSRichard Lowe 300*9938df9eSRichard Lowe extern float fmodf(float, float); 301*9938df9eSRichard Lowe extern float remainderf(float, float); 302*9938df9eSRichard Lowe extern float remquof(float, float, int *); 303*9938df9eSRichard Lowe 304*9938df9eSRichard Lowe extern float copysignf(float, float); 305*9938df9eSRichard Lowe extern float nanf(const char *); 306*9938df9eSRichard Lowe extern float nextafterf(float, float); 307*9938df9eSRichard Lowe extern float nexttowardf(float, long double); 308*9938df9eSRichard Lowe 309*9938df9eSRichard Lowe extern float fdimf(float, float); 310*9938df9eSRichard Lowe extern float fmaxf(float, float); 311*9938df9eSRichard Lowe extern float fminf(float, float); 312*9938df9eSRichard Lowe 313*9938df9eSRichard Lowe extern float fmaf(float, float, float); 314*9938df9eSRichard Lowe 315*9938df9eSRichard Lowe extern long double acosl(long double); 316*9938df9eSRichard Lowe extern long double asinl(long double); 317*9938df9eSRichard Lowe extern long double atanl(long double); 318*9938df9eSRichard Lowe extern long double atan2l(long double, long double); 319*9938df9eSRichard Lowe extern long double cosl(long double); 320*9938df9eSRichard Lowe extern long double sinl(long double); 321*9938df9eSRichard Lowe extern long double tanl(long double); 322*9938df9eSRichard Lowe 323*9938df9eSRichard Lowe extern long double acoshl(long double); 324*9938df9eSRichard Lowe extern long double asinhl(long double); 325*9938df9eSRichard Lowe extern long double atanhl(long double); 326*9938df9eSRichard Lowe extern long double coshl(long double); 327*9938df9eSRichard Lowe extern long double sinhl(long double); 328*9938df9eSRichard Lowe extern long double tanhl(long double); 329*9938df9eSRichard Lowe 330*9938df9eSRichard Lowe extern long double expl(long double); 331*9938df9eSRichard Lowe extern long double exp2l(long double); 332*9938df9eSRichard Lowe extern long double expm1l(long double); 333*9938df9eSRichard Lowe extern long double frexpl(long double, int *); 334*9938df9eSRichard Lowe extern int ilogbl(long double); 335*9938df9eSRichard Lowe extern long double ldexpl(long double, int); 336*9938df9eSRichard Lowe extern long double logl(long double); 337*9938df9eSRichard Lowe extern long double log10l(long double); 338*9938df9eSRichard Lowe extern long double log1pl(long double); 339*9938df9eSRichard Lowe extern long double log2l(long double); 340*9938df9eSRichard Lowe extern long double logbl(long double); 341*9938df9eSRichard Lowe extern long double modfl(long double, long double *); 342*9938df9eSRichard Lowe extern long double scalbnl(long double, int); 343*9938df9eSRichard Lowe extern long double scalblnl(long double, long int); 344*9938df9eSRichard Lowe 345*9938df9eSRichard Lowe extern long double cbrtl(long double); 346*9938df9eSRichard Lowe extern long double fabsl(long double); 347*9938df9eSRichard Lowe extern long double hypotl(long double, long double); 348*9938df9eSRichard Lowe extern long double powl(long double, long double); 349*9938df9eSRichard Lowe extern long double sqrtl(long double); 350*9938df9eSRichard Lowe 351*9938df9eSRichard Lowe extern long double erfl(long double); 352*9938df9eSRichard Lowe extern long double erfcl(long double); 353*9938df9eSRichard Lowe extern long double lgammal(long double); 354*9938df9eSRichard Lowe extern long double tgammal(long double); 355*9938df9eSRichard Lowe 356*9938df9eSRichard Lowe extern long double ceill(long double); 357*9938df9eSRichard Lowe extern long double floorl(long double); 358*9938df9eSRichard Lowe extern long double nearbyintl(long double); 359*9938df9eSRichard Lowe extern long double rintl(long double); 360*9938df9eSRichard Lowe extern long int lrintl(long double); 361*9938df9eSRichard Lowe extern long double roundl(long double); 362*9938df9eSRichard Lowe extern long int lroundl(long double); 363*9938df9eSRichard Lowe extern long double truncl(long double); 364*9938df9eSRichard Lowe 365*9938df9eSRichard Lowe extern long double fmodl(long double, long double); 366*9938df9eSRichard Lowe extern long double remainderl(long double, long double); 367*9938df9eSRichard Lowe extern long double remquol(long double, long double, int *); 368*9938df9eSRichard Lowe 369*9938df9eSRichard Lowe extern long double copysignl(long double, long double); 370*9938df9eSRichard Lowe extern long double nanl(const char *); 371*9938df9eSRichard Lowe extern long double nextafterl(long double, long double); 372*9938df9eSRichard Lowe extern long double nexttowardl(long double, long double); 373*9938df9eSRichard Lowe 374*9938df9eSRichard Lowe extern long double fdiml(long double, long double); 375*9938df9eSRichard Lowe extern long double fmaxl(long double, long double); 376*9938df9eSRichard Lowe extern long double fminl(long double, long double); 377*9938df9eSRichard Lowe 378*9938df9eSRichard Lowe extern long double fmal(long double, long double, long double); 37925c28e83SPiotr Jasiukajtis 38025c28e83SPiotr Jasiukajtis #if !defined(_STRICT_STDC) && !defined(_NO_LONGLONG) || defined(_STDC_C99) || \ 38125c28e83SPiotr Jasiukajtis defined(__C99FEATURES__) 382*9938df9eSRichard Lowe extern long long int llrint(double); 383*9938df9eSRichard Lowe extern long long int llround(double); 38425c28e83SPiotr Jasiukajtis 385*9938df9eSRichard Lowe extern long long int llrintf(float); 386*9938df9eSRichard Lowe extern long long int llroundf(float); 38725c28e83SPiotr Jasiukajtis 388*9938df9eSRichard Lowe extern long long int llrintl(long double); 389*9938df9eSRichard Lowe extern long long int llroundl(long double); 39025c28e83SPiotr Jasiukajtis #endif 39125c28e83SPiotr Jasiukajtis 39225c28e83SPiotr Jasiukajtis #if !defined(__cplusplus) 39325c28e83SPiotr Jasiukajtis #pragma does_not_read_global_data(asinh, exp2, expm1) 39425c28e83SPiotr Jasiukajtis #pragma does_not_read_global_data(ilogb, log2) 39525c28e83SPiotr Jasiukajtis #pragma does_not_read_global_data(scalbn, scalbln, cbrt) 39625c28e83SPiotr Jasiukajtis #pragma does_not_read_global_data(erf, erfc, tgamma) 39725c28e83SPiotr Jasiukajtis #pragma does_not_read_global_data(nearbyint, rint, lrint, round, lround, trunc) 39825c28e83SPiotr Jasiukajtis #pragma does_not_read_global_data(remquo) 39925c28e83SPiotr Jasiukajtis #pragma does_not_read_global_data(copysign, nan, nexttoward) 40025c28e83SPiotr Jasiukajtis #pragma does_not_read_global_data(fdim, fmax, fmin, fma) 40125c28e83SPiotr Jasiukajtis #pragma does_not_write_global_data(asinh, exp2, expm1) 40225c28e83SPiotr Jasiukajtis #pragma does_not_write_global_data(ilogb, log2) 40325c28e83SPiotr Jasiukajtis #pragma does_not_write_global_data(scalbn, scalbln, cbrt) 40425c28e83SPiotr Jasiukajtis #pragma does_not_write_global_data(erf, erfc, tgamma) 40525c28e83SPiotr Jasiukajtis #pragma does_not_write_global_data(nearbyint, rint, lrint, round, lround, trunc) 40625c28e83SPiotr Jasiukajtis #pragma does_not_write_global_data(copysign, nan, nexttoward) 40725c28e83SPiotr Jasiukajtis #pragma does_not_write_global_data(fdim, fmax, fmin, fma) 40825c28e83SPiotr Jasiukajtis 40925c28e83SPiotr Jasiukajtis #pragma does_not_read_global_data(acosf, asinf, atanf, atan2f) 41025c28e83SPiotr Jasiukajtis #pragma does_not_read_global_data(cosf, sinf, tanf) 41125c28e83SPiotr Jasiukajtis #pragma does_not_read_global_data(acoshf, asinhf, atanhf, coshf, sinhf, tanhf) 41225c28e83SPiotr Jasiukajtis #pragma does_not_read_global_data(expf, exp2f, expm1f, frexpf, ilogbf, ldexpf) 41325c28e83SPiotr Jasiukajtis #pragma does_not_read_global_data(logf, log10f, log1pf, log2f, logbf) 41425c28e83SPiotr Jasiukajtis #pragma does_not_read_global_data(modff, scalbnf, scalblnf) 41525c28e83SPiotr Jasiukajtis #pragma does_not_read_global_data(cbrtf, fabsf, hypotf, powf, sqrtf) 41625c28e83SPiotr Jasiukajtis #pragma does_not_read_global_data(erff, erfcf, lgammaf, tgammaf) 41725c28e83SPiotr Jasiukajtis #pragma does_not_read_global_data(ceilf, floorf, nearbyintf) 41825c28e83SPiotr Jasiukajtis #pragma does_not_read_global_data(rintf, lrintf, roundf, lroundf, truncf) 41925c28e83SPiotr Jasiukajtis #pragma does_not_read_global_data(fmodf, remainderf, remquof) 42025c28e83SPiotr Jasiukajtis #pragma does_not_read_global_data(copysignf, nanf, nextafterf, nexttowardf) 42125c28e83SPiotr Jasiukajtis #pragma does_not_read_global_data(fdimf, fmaxf, fminf, fmaf) 42225c28e83SPiotr Jasiukajtis #pragma does_not_write_global_data(acosf, asinf, atanf, atan2f) 42325c28e83SPiotr Jasiukajtis #pragma does_not_write_global_data(cosf, sinf, tanf) 42425c28e83SPiotr Jasiukajtis #pragma does_not_write_global_data(acoshf, asinhf, atanhf, coshf, sinhf, tanhf) 42525c28e83SPiotr Jasiukajtis #pragma does_not_write_global_data(expf, exp2f, expm1f, ilogbf, ldexpf) 42625c28e83SPiotr Jasiukajtis #pragma does_not_write_global_data(logf, log10f, log1pf, log2f, logbf) 42725c28e83SPiotr Jasiukajtis #pragma does_not_write_global_data(cbrtf, fabsf, hypotf, powf, sqrtf) 42825c28e83SPiotr Jasiukajtis #pragma does_not_write_global_data(erff, erfcf, tgammaf) 42925c28e83SPiotr Jasiukajtis #pragma does_not_write_global_data(ceilf, floorf, nearbyintf) 43025c28e83SPiotr Jasiukajtis #pragma does_not_write_global_data(rintf, lrintf, roundf, lroundf, truncf) 43125c28e83SPiotr Jasiukajtis #pragma does_not_write_global_data(fmodf, remainderf) 43225c28e83SPiotr Jasiukajtis #pragma does_not_write_global_data(copysignf, nanf, nextafterf, nexttowardf) 43325c28e83SPiotr Jasiukajtis #pragma does_not_write_global_data(fdimf, fmaxf, fminf, fmaf) 43425c28e83SPiotr Jasiukajtis 43525c28e83SPiotr Jasiukajtis #pragma does_not_read_global_data(acosl, asinl, atanl, atan2l) 43625c28e83SPiotr Jasiukajtis #pragma does_not_read_global_data(cosl, sinl, tanl) 43725c28e83SPiotr Jasiukajtis #pragma does_not_read_global_data(acoshl, asinhl, atanhl, coshl, sinhl, tanhl) 43825c28e83SPiotr Jasiukajtis #pragma does_not_read_global_data(expl, exp2l, expm1l, frexpl, ilogbl, ldexpl) 43925c28e83SPiotr Jasiukajtis #pragma does_not_read_global_data(logl, log10l, log1pl, log2l, logbl) 44025c28e83SPiotr Jasiukajtis #pragma does_not_read_global_data(modfl, scalbnl, scalblnl) 44125c28e83SPiotr Jasiukajtis #pragma does_not_read_global_data(cbrtl, fabsl, hypotl, powl, sqrtl) 44225c28e83SPiotr Jasiukajtis #pragma does_not_read_global_data(erfl, erfcl, lgammal, tgammal) 44325c28e83SPiotr Jasiukajtis #pragma does_not_read_global_data(ceill, floorl, nearbyintl) 44425c28e83SPiotr Jasiukajtis #pragma does_not_read_global_data(rintl, lrintl, roundl, lroundl, truncl) 44525c28e83SPiotr Jasiukajtis #pragma does_not_read_global_data(fmodl, remainderl, remquol) 44625c28e83SPiotr Jasiukajtis #pragma does_not_read_global_data(copysignl, nanl, nextafterl, nexttowardl) 44725c28e83SPiotr Jasiukajtis #pragma does_not_read_global_data(fdiml, fmaxl, fminl, fmal) 44825c28e83SPiotr Jasiukajtis #pragma does_not_write_global_data(acosl, asinl, atanl, atan2l) 44925c28e83SPiotr Jasiukajtis #pragma does_not_write_global_data(cosl, sinl, tanl) 45025c28e83SPiotr Jasiukajtis #pragma does_not_write_global_data(acoshl, asinhl, atanhl, coshl, sinhl, tanhl) 45125c28e83SPiotr Jasiukajtis #pragma does_not_write_global_data(expl, exp2l, expm1l, ilogbl, ldexpl) 45225c28e83SPiotr Jasiukajtis #pragma does_not_write_global_data(logl, log10l, log1pl, log2l, logbl) 45325c28e83SPiotr Jasiukajtis #pragma does_not_write_global_data(cbrtl, fabsl, hypotl, powl, sqrtl) 45425c28e83SPiotr Jasiukajtis #pragma does_not_write_global_data(erfl, erfcl, tgammal) 45525c28e83SPiotr Jasiukajtis #pragma does_not_write_global_data(ceill, floorl, nearbyintl) 45625c28e83SPiotr Jasiukajtis #pragma does_not_write_global_data(rintl, lrintl, roundl, lroundl, truncl) 45725c28e83SPiotr Jasiukajtis #pragma does_not_write_global_data(fmodl, remainderl) 45825c28e83SPiotr Jasiukajtis #pragma does_not_write_global_data(copysignl, nanl, nextafterl, nexttowardl) 45925c28e83SPiotr Jasiukajtis #pragma does_not_write_global_data(fdiml, fmaxl, fminl, fmal) 46025c28e83SPiotr Jasiukajtis 46125c28e83SPiotr Jasiukajtis #if !defined(_STRICT_STDC) && !defined(_NO_LONGLONG) || defined(_STDC_C99) || \ 46225c28e83SPiotr Jasiukajtis defined(__C99FEATURES__) 46325c28e83SPiotr Jasiukajtis #pragma does_not_read_global_data(llrint, llround) 46425c28e83SPiotr Jasiukajtis #pragma does_not_read_global_data(llrintf, llroundf, llrintl, llroundl) 46525c28e83SPiotr Jasiukajtis #pragma does_not_write_global_data(llrint, llround) 46625c28e83SPiotr Jasiukajtis #pragma does_not_write_global_data(llrintf, llroundf, llrintl, llroundl) 46725c28e83SPiotr Jasiukajtis #endif 46825c28e83SPiotr Jasiukajtis #endif /* !defined(__cplusplus) */ 46925c28e83SPiotr Jasiukajtis 47025c28e83SPiotr Jasiukajtis #if defined(__MATHERR_ERRNO_DONTCARE) 47125c28e83SPiotr Jasiukajtis #pragma does_not_read_global_data(acosh, atanh, hypot, lgamma, log1p, logb) 47225c28e83SPiotr Jasiukajtis #pragma does_not_read_global_data(nextafter, remainder) 47325c28e83SPiotr Jasiukajtis #pragma does_not_write_global_data(acosh, atanh, hypot, log1p, logb) 47425c28e83SPiotr Jasiukajtis #pragma does_not_write_global_data(nextafter, remainder) 47525c28e83SPiotr Jasiukajtis 47625c28e83SPiotr Jasiukajtis #pragma no_side_effect(acosh, asinh, atanh, exp2, expm1) 47725c28e83SPiotr Jasiukajtis #pragma no_side_effect(ilogb, log1p, log2, logb) 47825c28e83SPiotr Jasiukajtis #pragma no_side_effect(scalbn, scalbln, cbrt, hypot) 47925c28e83SPiotr Jasiukajtis #pragma no_side_effect(erf, erfc, tgamma) 48025c28e83SPiotr Jasiukajtis #pragma no_side_effect(nearbyint, rint, lrint, round, lround, trunc) 48125c28e83SPiotr Jasiukajtis #pragma no_side_effect(remainder) 48225c28e83SPiotr Jasiukajtis #pragma no_side_effect(copysign, nan, nextafter, nexttoward) 48325c28e83SPiotr Jasiukajtis #pragma no_side_effect(fdim, fmax, fmin, fma) 48425c28e83SPiotr Jasiukajtis 48525c28e83SPiotr Jasiukajtis #pragma no_side_effect(acosf, asinf, atanf, atan2f) 48625c28e83SPiotr Jasiukajtis #pragma no_side_effect(cosf, sinf, tanf, coshf, sinhf, tanhf) 48725c28e83SPiotr Jasiukajtis #pragma no_side_effect(acoshf, asinhf, atanhf, coshf, sinhf, tanhf) 48825c28e83SPiotr Jasiukajtis #pragma no_side_effect(expf, exp2f, expm1f, ilogbf, ldexpf) 48925c28e83SPiotr Jasiukajtis #pragma no_side_effect(logf, log10f, log1pf, log2f, logbf) 49025c28e83SPiotr Jasiukajtis #pragma no_side_effect(cbrtf, fabsf, hypotf, powf, sqrtf) 49125c28e83SPiotr Jasiukajtis #pragma no_side_effect(erff, erfcf, tgammaf) 49225c28e83SPiotr Jasiukajtis #pragma no_side_effect(ceilf, floorf, nearbyintf) 49325c28e83SPiotr Jasiukajtis #pragma no_side_effect(rintf, lrintf, roundf, lroundf, truncf) 49425c28e83SPiotr Jasiukajtis #pragma no_side_effect(fmodf, remainderf) 49525c28e83SPiotr Jasiukajtis #pragma no_side_effect(copysignf, nanf, nextafterf, nexttowardf) 49625c28e83SPiotr Jasiukajtis #pragma no_side_effect(fdimf, fmaxf, fminf, fmaf) 49725c28e83SPiotr Jasiukajtis 49825c28e83SPiotr Jasiukajtis #pragma no_side_effect(acosl, asinl, atanl, atan2l) 49925c28e83SPiotr Jasiukajtis #pragma no_side_effect(cosl, sinl, tanl, coshl, sinhl, tanhl) 50025c28e83SPiotr Jasiukajtis #pragma no_side_effect(acoshl, asinhl, atanhl, coshl, sinhl, tanhl) 50125c28e83SPiotr Jasiukajtis #pragma no_side_effect(expl, exp2l, expm1l, ilogbl, ldexpl) 50225c28e83SPiotr Jasiukajtis #pragma no_side_effect(logl, log10l, log1pl, log2l, logbl) 50325c28e83SPiotr Jasiukajtis #pragma no_side_effect(cbrtl, fabsl, hypotl, powl, sqrtl) 50425c28e83SPiotr Jasiukajtis #pragma no_side_effect(erfl, erfcl, tgammal) 50525c28e83SPiotr Jasiukajtis #pragma no_side_effect(ceill, floorl, nearbyintl) 50625c28e83SPiotr Jasiukajtis #pragma no_side_effect(rintl, lrintl, roundl, lroundl, truncl) 50725c28e83SPiotr Jasiukajtis #pragma no_side_effect(fmodl, remainderl) 50825c28e83SPiotr Jasiukajtis #pragma no_side_effect(copysignl, nanl, nextafterl, nexttowardl) 50925c28e83SPiotr Jasiukajtis #pragma no_side_effect(fdiml, fmaxl, fminl, fmal) 51025c28e83SPiotr Jasiukajtis 51125c28e83SPiotr Jasiukajtis #if !defined(_STRICT_STDC) && !defined(_NO_LONGLONG) || defined(_STDC_C99) || \ 51225c28e83SPiotr Jasiukajtis defined(__C99FEATURES__) 51325c28e83SPiotr Jasiukajtis #pragma no_side_effect(llrint, llround, llrintf, llroundf, llrintl, llroundl) 51425c28e83SPiotr Jasiukajtis #endif 51525c28e83SPiotr Jasiukajtis #endif /* defined(__MATHERR_ERRNO_DONTCARE) */ 51625c28e83SPiotr Jasiukajtis #endif /* defined(__EXTENSIONS__) || defined(_STDC_C99) || ... */ 51725c28e83SPiotr Jasiukajtis 51825c28e83SPiotr Jasiukajtis #ifdef __cplusplus 51925c28e83SPiotr Jasiukajtis } 52025c28e83SPiotr Jasiukajtis #endif 52125c28e83SPiotr Jasiukajtis 52225c28e83SPiotr Jasiukajtis #endif /* _ISO_MATH_C99_H */ 523