The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 1 | /* |
| 2 | * ==================================================== |
| 3 | * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. |
| 4 | * |
| 5 | * Developed at SunPro, a Sun Microsystems, Inc. business. |
| 6 | * Permission to use, copy, modify, and distribute this |
| 7 | * software is freely granted, provided that this notice |
| 8 | * is preserved. |
| 9 | * ==================================================== |
| 10 | */ |
| 11 | |
| 12 | /* |
| 13 | * from: @(#)fdlibm.h 5.1 93/09/24 |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 14 | * $FreeBSD$ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 15 | */ |
| 16 | |
| 17 | #ifndef _MATH_H_ |
Elliott Hughes | b662280 | 2015-08-14 14:04:30 -0700 | [diff] [blame^] | 18 | #define _MATH_H_ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 19 | |
| 20 | #include <sys/cdefs.h> |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 21 | #include <limits.h> |
| 22 | |
Elliott Hughes | de9ac71 | 2014-05-19 16:58:52 -0700 | [diff] [blame] | 23 | __BEGIN_DECLS |
| 24 | #pragma GCC visibility push(default) |
| 25 | |
Elliott Hughes | b662280 | 2015-08-14 14:04:30 -0700 | [diff] [blame^] | 26 | #define HUGE_VAL __builtin_huge_val() |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 27 | |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 28 | #if __ISO_C_VISIBLE >= 1999 |
Elliott Hughes | b662280 | 2015-08-14 14:04:30 -0700 | [diff] [blame^] | 29 | #define FP_ILOGB0 (-INT_MAX) |
| 30 | #define FP_ILOGBNAN INT_MAX |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 31 | |
Elliott Hughes | b662280 | 2015-08-14 14:04:30 -0700 | [diff] [blame^] | 32 | #define HUGE_VALF __builtin_huge_valf() |
| 33 | #define HUGE_VALL __builtin_huge_vall() |
| 34 | #define INFINITY __builtin_inff() |
| 35 | #define NAN __builtin_nanf("") |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 36 | |
Elliott Hughes | b662280 | 2015-08-14 14:04:30 -0700 | [diff] [blame^] | 37 | #define MATH_ERRNO 1 |
| 38 | #define MATH_ERREXCEPT 2 |
| 39 | #define math_errhandling MATH_ERREXCEPT |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 40 | |
Elliott Hughes | b662280 | 2015-08-14 14:04:30 -0700 | [diff] [blame^] | 41 | #if defined(__FP_FAST_FMA) |
| 42 | #define FP_FAST_FMA 1 |
| 43 | #endif |
| 44 | #if defined(__FP_FAST_FMAF) |
| 45 | #define FP_FAST_FMAF 1 |
| 46 | #endif |
| 47 | #if defined(__FP_FAST_FMAL) |
| 48 | #define FP_FAST_FMAL 1 |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 49 | #endif |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 50 | |
| 51 | /* Symbolic constants to classify floating point numbers. */ |
Elliott Hughes | b662280 | 2015-08-14 14:04:30 -0700 | [diff] [blame^] | 52 | #define FP_INFINITE 0x01 |
| 53 | #define FP_NAN 0x02 |
| 54 | #define FP_NORMAL 0x04 |
| 55 | #define FP_SUBNORMAL 0x08 |
| 56 | #define FP_ZERO 0x10 |
| 57 | #define fpclassify(x) \ |
| 58 | __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, x) |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 59 | |
Elliott Hughes | b662280 | 2015-08-14 14:04:30 -0700 | [diff] [blame^] | 60 | #define isfinite(x) __builtin_isfinite(x) |
| 61 | #define isinf(x) __builtin_isinf(x) |
| 62 | #define isnan(x) __builtin_isnan(x) |
| 63 | #define isnormal(x) __builtin_isnormal(x) |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 64 | |
Elliott Hughes | b662280 | 2015-08-14 14:04:30 -0700 | [diff] [blame^] | 65 | #define isgreater(x, y) __builtin_isgreater((x), (y)) |
| 66 | #define isgreaterequal(x, y) __builtin_isgreaterequal((x), (y)) |
| 67 | #define isless(x, y) __builtin_isless((x), (y)) |
| 68 | #define islessequal(x, y) __builtin_islessequal((x), (y)) |
| 69 | #define islessgreater(x, y) __builtin_islessgreater((x), (y)) |
| 70 | #define isunordered(x, y) __builtin_isunordered((x), (y)) |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 71 | |
Elliott Hughes | b662280 | 2015-08-14 14:04:30 -0700 | [diff] [blame^] | 72 | #define signbit(x) \ |
| 73 | ((sizeof(x) == sizeof(float)) ? __builtin_signbitf(x) \ |
| 74 | : (sizeof(x) == sizeof(double)) ? __builtin_signbit(x) \ |
| 75 | : __builtin_signbitl(x)) |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 76 | |
Elliott Hughes | 9f87a0b | 2014-02-07 14:55:58 -0800 | [diff] [blame] | 77 | typedef double __double_t; |
| 78 | typedef __double_t double_t; |
| 79 | typedef float __float_t; |
| 80 | typedef __float_t float_t; |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 81 | #endif /* __ISO_C_VISIBLE >= 1999 */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 82 | |
| 83 | /* |
| 84 | * XOPEN/SVID |
| 85 | */ |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 86 | #if __BSD_VISIBLE || __XSI_VISIBLE |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 87 | #define M_E 2.7182818284590452354 /* e */ |
| 88 | #define M_LOG2E 1.4426950408889634074 /* log 2e */ |
| 89 | #define M_LOG10E 0.43429448190325182765 /* log 10e */ |
| 90 | #define M_LN2 0.69314718055994530942 /* log e2 */ |
| 91 | #define M_LN10 2.30258509299404568402 /* log e10 */ |
| 92 | #define M_PI 3.14159265358979323846 /* pi */ |
| 93 | #define M_PI_2 1.57079632679489661923 /* pi/2 */ |
| 94 | #define M_PI_4 0.78539816339744830962 /* pi/4 */ |
| 95 | #define M_1_PI 0.31830988618379067154 /* 1/pi */ |
| 96 | #define M_2_PI 0.63661977236758134308 /* 2/pi */ |
| 97 | #define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */ |
| 98 | #define M_SQRT2 1.41421356237309504880 /* sqrt(2) */ |
| 99 | #define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */ |
| 100 | |
| 101 | #define MAXFLOAT ((float)3.40282346638528860e+38) |
| 102 | extern int signgam; |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 103 | #endif /* __BSD_VISIBLE || __XSI_VISIBLE */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 104 | |
| 105 | #if __BSD_VISIBLE |
| 106 | #if 0 |
| 107 | /* Old value from 4.4BSD-Lite math.h; this is probably better. */ |
| 108 | #define HUGE HUGE_VAL |
| 109 | #else |
| 110 | #define HUGE MAXFLOAT |
| 111 | #endif |
| 112 | #endif /* __BSD_VISIBLE */ |
| 113 | |
| 114 | /* |
| 115 | * Most of these functions depend on the rounding mode and have the side |
| 116 | * effect of raising floating-point exceptions, so they are not declared |
| 117 | * as __pure2. In C99, FENV_ACCESS affects the purity of these functions. |
| 118 | */ |
Elliott Hughes | de9ac71 | 2014-05-19 16:58:52 -0700 | [diff] [blame] | 119 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 120 | /* |
| 121 | * ANSI/POSIX |
| 122 | */ |
| 123 | int __fpclassifyd(double) __pure2; |
| 124 | int __fpclassifyf(float) __pure2; |
| 125 | int __fpclassifyl(long double) __pure2; |
| 126 | int __isfinitef(float) __pure2; |
| 127 | int __isfinite(double) __pure2; |
| 128 | int __isfinitel(long double) __pure2; |
| 129 | int __isinff(float) __pure2; |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 130 | int __isinfl(long double) __pure2; |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 131 | int __isnanf(float) __pure2; |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 132 | int __isnanl(long double) __pure2; |
| 133 | int __isnormalf(float) __pure2; |
| 134 | int __isnormal(double) __pure2; |
| 135 | int __isnormall(long double) __pure2; |
| 136 | int __signbit(double) __pure2; |
| 137 | int __signbitf(float) __pure2; |
| 138 | int __signbitl(long double) __pure2; |
| 139 | |
| 140 | double acos(double); |
| 141 | double asin(double); |
| 142 | double atan(double); |
| 143 | double atan2(double, double); |
| 144 | double cos(double); |
| 145 | double sin(double); |
| 146 | double tan(double); |
| 147 | |
| 148 | double cosh(double); |
| 149 | double sinh(double); |
| 150 | double tanh(double); |
| 151 | |
| 152 | double exp(double); |
| 153 | double frexp(double, int *); /* fundamentally !__pure2 */ |
| 154 | double ldexp(double, int); |
| 155 | double log(double); |
| 156 | double log10(double); |
| 157 | double modf(double, double *); /* fundamentally !__pure2 */ |
| 158 | |
| 159 | double pow(double, double); |
| 160 | double sqrt(double); |
| 161 | |
| 162 | double ceil(double); |
| 163 | double fabs(double) __pure2; |
| 164 | double floor(double); |
| 165 | double fmod(double, double); |
| 166 | |
| 167 | /* |
| 168 | * These functions are not in C90. |
| 169 | */ |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 170 | #if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 171 | double acosh(double); |
| 172 | double asinh(double); |
| 173 | double atanh(double); |
| 174 | double cbrt(double); |
| 175 | double erf(double); |
| 176 | double erfc(double); |
| 177 | double exp2(double); |
| 178 | double expm1(double); |
| 179 | double fma(double, double, double); |
| 180 | double hypot(double, double); |
| 181 | int ilogb(double) __pure2; |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 182 | int (isinf)(double) __pure2; |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 183 | int (isnan)(double) __pure2; |
| 184 | double lgamma(double); |
| 185 | long long llrint(double); |
| 186 | long long llround(double); |
| 187 | double log1p(double); |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 188 | double log2(double); |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 189 | double logb(double); |
| 190 | long lrint(double); |
| 191 | long lround(double); |
David 'Digit' Turner | 8e2ff16 | 2011-01-25 17:05:50 +0100 | [diff] [blame] | 192 | double nan(const char *) __pure2; |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 193 | double nextafter(double, double); |
| 194 | double remainder(double, double); |
| 195 | double remquo(double, double, int *); |
| 196 | double rint(double); |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 197 | #endif /* __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 198 | |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 199 | #if __BSD_VISIBLE || __XSI_VISIBLE |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 200 | double j0(double); |
| 201 | double j1(double); |
| 202 | double jn(int, double); |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 203 | double y0(double); |
| 204 | double y1(double); |
| 205 | double yn(int, double); |
| 206 | |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 207 | #if __XSI_VISIBLE <= 500 || __BSD_VISIBLE |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 208 | double gamma(double); |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 209 | #endif |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 210 | |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 211 | #if __XSI_VISIBLE <= 600 || __BSD_VISIBLE |
| 212 | double scalb(double, double); |
| 213 | #endif |
| 214 | #endif /* __BSD_VISIBLE || __XSI_VISIBLE */ |
| 215 | |
| 216 | #if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 217 | double copysign(double, double) __pure2; |
| 218 | double fdim(double, double); |
| 219 | double fmax(double, double) __pure2; |
| 220 | double fmin(double, double) __pure2; |
| 221 | double nearbyint(double); |
| 222 | double round(double); |
| 223 | double scalbln(double, long); |
| 224 | double scalbn(double, int); |
| 225 | double tgamma(double); |
| 226 | double trunc(double); |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 227 | #endif |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 228 | |
| 229 | /* |
| 230 | * BSD math library entry points |
| 231 | */ |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 232 | #if __BSD_VISIBLE |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 233 | double drem(double, double); |
| 234 | int finite(double) __pure2; |
| 235 | int isnanf(float) __pure2; |
Elliott Hughes | de9ac71 | 2014-05-19 16:58:52 -0700 | [diff] [blame] | 236 | long double significandl(long double); |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 237 | |
| 238 | /* |
| 239 | * Reentrant version of gamma & lgamma; passes signgam back by reference |
| 240 | * as the second argument; user must allocate space for signgam. |
| 241 | */ |
| 242 | double gamma_r(double, int *); |
| 243 | double lgamma_r(double, int *); |
| 244 | |
| 245 | /* |
| 246 | * IEEE Test Vector |
| 247 | */ |
| 248 | double significand(double); |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 249 | #endif /* __BSD_VISIBLE */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 250 | |
| 251 | /* float versions of ANSI/POSIX functions */ |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 252 | #if __ISO_C_VISIBLE >= 1999 |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 253 | float acosf(float); |
| 254 | float asinf(float); |
| 255 | float atanf(float); |
| 256 | float atan2f(float, float); |
| 257 | float cosf(float); |
| 258 | float sinf(float); |
| 259 | float tanf(float); |
| 260 | |
| 261 | float coshf(float); |
| 262 | float sinhf(float); |
| 263 | float tanhf(float); |
| 264 | |
| 265 | float exp2f(float); |
| 266 | float expf(float); |
| 267 | float expm1f(float); |
| 268 | float frexpf(float, int *); /* fundamentally !__pure2 */ |
| 269 | int ilogbf(float) __pure2; |
| 270 | float ldexpf(float, int); |
| 271 | float log10f(float); |
| 272 | float log1pf(float); |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 273 | float log2f(float); |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 274 | float logf(float); |
| 275 | float modff(float, float *); /* fundamentally !__pure2 */ |
| 276 | |
| 277 | float powf(float, float); |
| 278 | float sqrtf(float); |
| 279 | |
| 280 | float ceilf(float); |
| 281 | float fabsf(float) __pure2; |
| 282 | float floorf(float); |
| 283 | float fmodf(float, float); |
| 284 | float roundf(float); |
| 285 | |
| 286 | float erff(float); |
| 287 | float erfcf(float); |
| 288 | float hypotf(float, float); |
| 289 | float lgammaf(float); |
David 'Digit' Turner | 8e2ff16 | 2011-01-25 17:05:50 +0100 | [diff] [blame] | 290 | float tgammaf(float); |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 291 | |
| 292 | float acoshf(float); |
| 293 | float asinhf(float); |
| 294 | float atanhf(float); |
| 295 | float cbrtf(float); |
| 296 | float logbf(float); |
| 297 | float copysignf(float, float) __pure2; |
| 298 | long long llrintf(float); |
| 299 | long long llroundf(float); |
| 300 | long lrintf(float); |
| 301 | long lroundf(float); |
David 'Digit' Turner | 8e2ff16 | 2011-01-25 17:05:50 +0100 | [diff] [blame] | 302 | float nanf(const char *) __pure2; |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 303 | float nearbyintf(float); |
| 304 | float nextafterf(float, float); |
| 305 | float remainderf(float, float); |
| 306 | float remquof(float, float, int *); |
| 307 | float rintf(float); |
| 308 | float scalblnf(float, long); |
| 309 | float scalbnf(float, int); |
| 310 | float truncf(float); |
| 311 | |
| 312 | float fdimf(float, float); |
| 313 | float fmaf(float, float, float); |
| 314 | float fmaxf(float, float) __pure2; |
| 315 | float fminf(float, float) __pure2; |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 316 | #endif |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 317 | |
| 318 | /* |
| 319 | * float versions of BSD math library entry points |
| 320 | */ |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 321 | #if __BSD_VISIBLE |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 322 | float dremf(float, float); |
| 323 | int finitef(float) __pure2; |
| 324 | float gammaf(float); |
| 325 | float j0f(float); |
| 326 | float j1f(float); |
| 327 | float jnf(int, float); |
| 328 | float scalbf(float, float); |
| 329 | float y0f(float); |
| 330 | float y1f(float); |
| 331 | float ynf(int, float); |
| 332 | |
| 333 | /* |
| 334 | * Float versions of reentrant version of gamma & lgamma; passes |
| 335 | * signgam back by reference as the second argument; user must |
| 336 | * allocate space for signgam. |
| 337 | */ |
| 338 | float gammaf_r(float, int *); |
| 339 | float lgammaf_r(float, int *); |
| 340 | |
| 341 | /* |
| 342 | * float version of IEEE Test Vector |
| 343 | */ |
| 344 | float significandf(float); |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 345 | #endif /* __BSD_VISIBLE */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 346 | |
| 347 | /* |
| 348 | * long double versions of ISO/POSIX math functions |
| 349 | */ |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 350 | #if __ISO_C_VISIBLE >= 1999 |
Elliott Hughes | 9a5a3e8 | 2014-05-05 20:28:28 -0700 | [diff] [blame] | 351 | long double acoshl(long double); |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 352 | long double acosl(long double); |
Elliott Hughes | 9a5a3e8 | 2014-05-05 20:28:28 -0700 | [diff] [blame] | 353 | long double asinhl(long double); |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 354 | long double asinl(long double); |
| 355 | long double atan2l(long double, long double); |
Elliott Hughes | 9a5a3e8 | 2014-05-05 20:28:28 -0700 | [diff] [blame] | 356 | long double atanhl(long double); |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 357 | long double atanl(long double); |
| 358 | long double cbrtl(long double); |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 359 | long double ceill(long double); |
| 360 | long double copysignl(long double, long double) __pure2; |
Elliott Hughes | 9a5a3e8 | 2014-05-05 20:28:28 -0700 | [diff] [blame] | 361 | long double coshl(long double); |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 362 | long double cosl(long double); |
Elliott Hughes | 9a5a3e8 | 2014-05-05 20:28:28 -0700 | [diff] [blame] | 363 | long double erfcl(long double); |
| 364 | long double erfl(long double); |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 365 | long double exp2l(long double); |
| 366 | long double expl(long double); |
Elliott Hughes | 9a5a3e8 | 2014-05-05 20:28:28 -0700 | [diff] [blame] | 367 | long double expm1l(long double); |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 368 | long double fabsl(long double) __pure2; |
| 369 | long double fdiml(long double, long double); |
| 370 | long double floorl(long double); |
| 371 | long double fmal(long double, long double, long double); |
| 372 | long double fmaxl(long double, long double) __pure2; |
| 373 | long double fminl(long double, long double) __pure2; |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 374 | long double fmodl(long double, long double); |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 375 | long double frexpl(long double value, int *); /* fundamentally !__pure2 */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 376 | long double hypotl(long double, long double); |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 377 | int ilogbl(long double) __pure2; |
| 378 | long double ldexpl(long double, int); |
Elliott Hughes | 9a5a3e8 | 2014-05-05 20:28:28 -0700 | [diff] [blame] | 379 | long double lgammal(long double); |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 380 | long long llrintl(long double); |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 381 | long long llroundl(long double); |
Elliott Hughes | 9a5a3e8 | 2014-05-05 20:28:28 -0700 | [diff] [blame] | 382 | long double log10l(long double); |
| 383 | long double log1pl(long double); |
| 384 | long double log2l(long double); |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 385 | long double logbl(long double); |
Elliott Hughes | 9a5a3e8 | 2014-05-05 20:28:28 -0700 | [diff] [blame] | 386 | long double logl(long double); |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 387 | long lrintl(long double); |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 388 | long lroundl(long double); |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 389 | long double modfl(long double, long double *); /* fundamentally !__pure2 */ |
| 390 | long double nanl(const char *) __pure2; |
| 391 | long double nearbyintl(long double); |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 392 | long double nextafterl(long double, long double); |
| 393 | double nexttoward(double, long double); |
| 394 | float nexttowardf(float, long double); |
| 395 | long double nexttowardl(long double, long double); |
Elliott Hughes | 9a5a3e8 | 2014-05-05 20:28:28 -0700 | [diff] [blame] | 396 | long double powl(long double, long double); |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 397 | long double remainderl(long double, long double); |
| 398 | long double remquol(long double, long double, int *); |
| 399 | long double rintl(long double); |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 400 | long double roundl(long double); |
| 401 | long double scalblnl(long double, long); |
| 402 | long double scalbnl(long double, int); |
Elliott Hughes | 9a5a3e8 | 2014-05-05 20:28:28 -0700 | [diff] [blame] | 403 | long double sinhl(long double); |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 404 | long double sinl(long double); |
| 405 | long double sqrtl(long double); |
Elliott Hughes | 9a5a3e8 | 2014-05-05 20:28:28 -0700 | [diff] [blame] | 406 | long double tanhl(long double); |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 407 | long double tanl(long double); |
Elliott Hughes | 9a5a3e8 | 2014-05-05 20:28:28 -0700 | [diff] [blame] | 408 | long double tgammal(long double); |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 409 | long double truncl(long double); |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 410 | #endif /* __ISO_C_VISIBLE >= 1999 */ |
Elliott Hughes | b4f2f28 | 2014-05-08 21:19:12 -0700 | [diff] [blame] | 411 | |
Elliott Hughes | 7553185 | 2014-09-18 11:23:58 -0700 | [diff] [blame] | 412 | #if __BSD_VISIBLE |
| 413 | long double lgammal_r(long double, int *); |
| 414 | #endif |
| 415 | |
Elliott Hughes | 5f5cc45 | 2014-08-18 16:04:03 -0700 | [diff] [blame] | 416 | #if defined(__USE_GNU) |
Elliott Hughes | b4f2f28 | 2014-05-08 21:19:12 -0700 | [diff] [blame] | 417 | void sincos(double, double*, double*); |
| 418 | void sincosf(float, float*, float*); |
| 419 | void sincosl(long double, long double*, long double*); |
Elliott Hughes | 5f5cc45 | 2014-08-18 16:04:03 -0700 | [diff] [blame] | 420 | #endif /* __USE_GNU */ |
Elliott Hughes | b4f2f28 | 2014-05-08 21:19:12 -0700 | [diff] [blame] | 421 | |
Elliott Hughes | de9ac71 | 2014-05-19 16:58:52 -0700 | [diff] [blame] | 422 | #pragma GCC visibility pop |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 423 | __END_DECLS |
| 424 | |
| 425 | #endif /* !_MATH_H_ */ |