blob: 343ab987f8bfd3d391c6b21670c1eb7476095db7 [file] [log] [blame]
The Android Open Source Project1dc9e472009-03-03 19:28:35 -08001/*
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/*
Elliott Hughesfee514e2020-09-17 11:57:50 -070013 * Originally based on fdlibm.h 5.1 via FreeBSD.
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080014 */
15
Elliott Hughesfee514e2020-09-17 11:57:50 -070016#pragma once
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080017
18#include <sys/cdefs.h>
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080019#include <limits.h>
20
Elliott Hughesde9ac712014-05-19 16:58:52 -070021__BEGIN_DECLS
Elliott Hughesde9ac712014-05-19 16:58:52 -070022
Elliott Hughes50cda382017-09-14 15:30:08 -070023/* C11. */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080024
Elliott Hughes50cda382017-09-14 15:30:08 -070025typedef double __double_t;
26typedef __double_t double_t;
27typedef float __float_t;
28typedef __float_t float_t;
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080029
Elliott Hughes50cda382017-09-14 15:30:08 -070030#define HUGE_VAL __builtin_huge_val()
31#define HUGE_VALF __builtin_huge_valf()
32#define HUGE_VALL __builtin_huge_vall()
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080033
Elliott Hughes50cda382017-09-14 15:30:08 -070034#define INFINITY __builtin_inff()
35
36#define NAN __builtin_nanf("")
37
38#define FP_INFINITE 0x01
39#define FP_NAN 0x02
40#define FP_NORMAL 0x04
41#define FP_SUBNORMAL 0x08
42#define FP_ZERO 0x10
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080043
Elliott Hughesb6622802015-08-14 14:04:30 -070044#if defined(__FP_FAST_FMA)
45#define FP_FAST_FMA 1
46#endif
47#if defined(__FP_FAST_FMAF)
48#define FP_FAST_FMAF 1
49#endif
50#if defined(__FP_FAST_FMAL)
51#define FP_FAST_FMAL 1
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080052#endif
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080053
Elliott Hughes50cda382017-09-14 15:30:08 -070054#define FP_ILOGB0 (-INT_MAX)
55#define FP_ILOGBNAN INT_MAX
56
57#define MATH_ERRNO 1
58#define MATH_ERREXCEPT 2
59#define math_errhandling MATH_ERREXCEPT
60
61#define fpclassify(x) __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, x)
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080062
Elliott Hughesb6622802015-08-14 14:04:30 -070063#define isfinite(x) __builtin_isfinite(x)
Elliott Hughes50cda382017-09-14 15:30:08 -070064
Elliott Hughesb6622802015-08-14 14:04:30 -070065#define isinf(x) __builtin_isinf(x)
Elliott Hughes50cda382017-09-14 15:30:08 -070066
Elliott Hughesb6622802015-08-14 14:04:30 -070067#define isnan(x) __builtin_isnan(x)
Elliott Hughes50cda382017-09-14 15:30:08 -070068
Elliott Hughesb6622802015-08-14 14:04:30 -070069#define isnormal(x) __builtin_isnormal(x)
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080070
Elliott Hughes356c50c2024-06-21 15:45:21 +000071#define signbit(x) __builtin_signbit(x)
Elliott Hughes50cda382017-09-14 15:30:08 -070072
73double acos(double __x);
74float acosf(float __x);
Elliott Hughesab2d3e12023-06-07 17:16:34 +000075long double acosl(long double __x);
Elliott Hughes50cda382017-09-14 15:30:08 -070076
77double asin(double __x);
78float asinf(float __x);
Elliott Hughesab2d3e12023-06-07 17:16:34 +000079long double asinl(long double __x);
Elliott Hughes50cda382017-09-14 15:30:08 -070080
81double atan(double __x);
82float atanf(float __x);
Elliott Hughesab2d3e12023-06-07 17:16:34 +000083long double atanl(long double __x);
Elliott Hughes50cda382017-09-14 15:30:08 -070084
85double atan2(double __y, double __x);
86float atan2f(float __y, float __x);
Elliott Hughesab2d3e12023-06-07 17:16:34 +000087long double atan2l(long double __y, long double __x);
Elliott Hughes50cda382017-09-14 15:30:08 -070088
89double cos(double __x);
90float cosf(float __x);
Elliott Hughesab2d3e12023-06-07 17:16:34 +000091long double cosl(long double __x);
Elliott Hughes50cda382017-09-14 15:30:08 -070092
93double sin(double __x);
94float sinf(float __x);
Elliott Hughesab2d3e12023-06-07 17:16:34 +000095long double sinl(long double __x);
Elliott Hughes50cda382017-09-14 15:30:08 -070096
97double tan(double __x);
98float tanf(float __x);
Elliott Hughesab2d3e12023-06-07 17:16:34 +000099long double tanl(long double __x);
Elliott Hughes50cda382017-09-14 15:30:08 -0700100
101double acosh(double __x);
102float acoshf(float __x);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000103long double acoshl(long double __x);
Elliott Hughes50cda382017-09-14 15:30:08 -0700104
105double asinh(double __x);
106float asinhf(float __x);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000107long double asinhl(long double __x);
Elliott Hughes50cda382017-09-14 15:30:08 -0700108
109double atanh(double __x);
110float atanhf(float __x);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000111long double atanhl(long double __x);
Elliott Hughes50cda382017-09-14 15:30:08 -0700112
113double cosh(double __x);
114float coshf(float __x);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000115long double coshl(long double __x);
Elliott Hughes50cda382017-09-14 15:30:08 -0700116
117double sinh(double __x);
118float sinhf(float __x);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000119long double sinhl(long double __x);
Elliott Hughes50cda382017-09-14 15:30:08 -0700120
121double tanh(double __x);
122float tanhf(float __x);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000123long double tanhl(long double __x);
Elliott Hughes50cda382017-09-14 15:30:08 -0700124
125double exp(double __x);
126float expf(float __x);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000127long double expl(long double __x);
Elliott Hughes50cda382017-09-14 15:30:08 -0700128
129double exp2(double __x);
130float exp2f(float __x);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000131long double exp2l(long double __x);
Elliott Hughes50cda382017-09-14 15:30:08 -0700132
133double expm1(double __x);
134float expm1f(float __x);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000135long double expm1l(long double __x);
Elliott Hughes50cda382017-09-14 15:30:08 -0700136
zijunzhao195b90b2023-02-08 02:00:09 +0000137double frexp(double __x, int* _Nonnull __exponent);
138float frexpf(float __x, int* _Nonnull __exponent);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000139long double frexpl(long double __x, int* _Nonnull __exponent);
Elliott Hughes50cda382017-09-14 15:30:08 -0700140
141int ilogb(double __x) __attribute_const__;
142int ilogbf(float __x) __attribute_const__;
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000143int ilogbl(long double __x) __attribute_const__;
Elliott Hughes50cda382017-09-14 15:30:08 -0700144
145double ldexp(double __x, int __exponent);
146float ldexpf(float __x, int __exponent);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000147long double ldexpl(long double __x, int __exponent);
Elliott Hughes50cda382017-09-14 15:30:08 -0700148
149double log(double __x);
150float logf(float __x);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000151long double logl(long double __x);
Elliott Hughes50cda382017-09-14 15:30:08 -0700152
153double log10(double __x);
154float log10f(float __x);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000155long double log10l(long double __x);
Elliott Hughes50cda382017-09-14 15:30:08 -0700156
157double log1p(double __x);
158float log1pf(float __x);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000159long double log1pl(long double __x);
Elliott Hughes50cda382017-09-14 15:30:08 -0700160
Elliott Hughes655e4302023-06-16 12:39:33 -0700161double log2(double __x);
162float log2f(float __x);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000163long double log2l(long double __x);
Elliott Hughes50cda382017-09-14 15:30:08 -0700164
165double logb(double __x);
166float logbf(float __x);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000167long double logbl(long double __x);
Elliott Hughes50cda382017-09-14 15:30:08 -0700168
zijunzhao195b90b2023-02-08 02:00:09 +0000169double modf(double __x, double* _Nonnull __integral_part);
170float modff(float __x, float* _Nonnull __integral_part);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000171long double modfl(long double __x, long double* _Nonnull __integral_part);
Elliott Hughes50cda382017-09-14 15:30:08 -0700172
173double scalbn(double __x, int __exponent);
174float scalbnf(float __x, int __exponent);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000175long double scalbnl(long double __x, int __exponent);
Elliott Hughes50cda382017-09-14 15:30:08 -0700176
Elliott Hughese17ebfd2023-05-26 13:00:51 -0700177double scalbln(double __x, long __exponent);
178float scalblnf(float __x, long __exponent);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000179long double scalblnl(long double __x, long __exponent);
Elliott Hughes50cda382017-09-14 15:30:08 -0700180
181double cbrt(double __x);
182float cbrtf(float __x);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000183long double cbrtl(long double __x);
Elliott Hughes50cda382017-09-14 15:30:08 -0700184
185double fabs(double __x) __attribute_const__;
186float fabsf(float __x) __attribute_const__;
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000187long double fabsl(long double __x) __attribute_const__;
Elliott Hughes50cda382017-09-14 15:30:08 -0700188
189double hypot(double __x, double __y);
190float hypotf(float __x, float __y);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000191long double hypotl(long double __x, long double __y);
Elliott Hughes50cda382017-09-14 15:30:08 -0700192
193double pow(double __x, double __y);
194float powf(float __x, float __y);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000195long double powl(long double __x, long double __y);
Elliott Hughes50cda382017-09-14 15:30:08 -0700196
197double sqrt(double __x);
198float sqrtf(float __x);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000199long double sqrtl(long double __x);
Elliott Hughes50cda382017-09-14 15:30:08 -0700200
201double erf(double __x);
202float erff(float __x);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000203long double erfl(long double __x);
Elliott Hughes50cda382017-09-14 15:30:08 -0700204
205double erfc(double __x);
206float erfcf(float __x);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000207long double erfcl(long double __x);
Elliott Hughes50cda382017-09-14 15:30:08 -0700208
209double lgamma(double __x);
210float lgammaf(float __x);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000211long double lgammal(long double __x);
Elliott Hughes50cda382017-09-14 15:30:08 -0700212
213double tgamma(double __x);
Elliott Hughesf106a392019-10-03 16:09:04 -0700214float tgammaf(float __x);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000215long double tgammal(long double __x);
Elliott Hughes50cda382017-09-14 15:30:08 -0700216
217double ceil(double __x);
218float ceilf(float __x);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000219long double ceill(long double __x);
Elliott Hughes50cda382017-09-14 15:30:08 -0700220
221double floor(double __x);
222float floorf(float __x);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000223long double floorl(long double __x);
Elliott Hughes50cda382017-09-14 15:30:08 -0700224
225double nearbyint(double __x);
226float nearbyintf(float __x);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000227long double nearbyintl(long double __x);
Elliott Hughes50cda382017-09-14 15:30:08 -0700228
229double rint(double __x);
230float rintf(float __x);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000231long double rintl(long double __x);
Elliott Hughes50cda382017-09-14 15:30:08 -0700232
233long lrint(double __x);
234long lrintf(float __x);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000235long lrintl(long double __x);
Elliott Hughes50cda382017-09-14 15:30:08 -0700236
237long long llrint(double __x);
238long long llrintf(float __x);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000239long long llrintl(long double __x);
Elliott Hughes50cda382017-09-14 15:30:08 -0700240
241double round(double __x);
242float roundf(float __x);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000243long double roundl(long double __x);
Elliott Hughes50cda382017-09-14 15:30:08 -0700244
245long lround(double __x);
246long lroundf(float __x);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000247long lroundl(long double __x);
Elliott Hughes50cda382017-09-14 15:30:08 -0700248
249long long llround(double __x);
250long long llroundf(float __x);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000251long long llroundl(long double __x);
Elliott Hughes50cda382017-09-14 15:30:08 -0700252
253double trunc(double __x);
254float truncf(float __x);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000255long double truncl(long double __x);
Elliott Hughes50cda382017-09-14 15:30:08 -0700256
257double fmod(double __x, double __y);
258float fmodf(float __x, float __y);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000259long double fmodl(long double __x, long double __y);
Elliott Hughes50cda382017-09-14 15:30:08 -0700260
261double remainder(double __x, double __y);
262float remainderf(float __x, float __y);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000263long double remainderl(long double __x, long double __y);
Elliott Hughes50cda382017-09-14 15:30:08 -0700264
zijunzhao195b90b2023-02-08 02:00:09 +0000265double remquo(double __x, double __y, int* _Nonnull __quotient_bits);
266float remquof(float __x, float __y, int* _Nonnull __quotient_bits);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000267long double remquol(long double __x, long double __y, int* _Nonnull __quotient_bits);
Elliott Hughes50cda382017-09-14 15:30:08 -0700268
269double copysign(double __value, double __sign) __attribute_const__;
270float copysignf(float __value, float __sign) __attribute_const__;
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000271long double copysignl(long double __value, long double __sign) __attribute_const__;
Elliott Hughes50cda382017-09-14 15:30:08 -0700272
zijunzhao195b90b2023-02-08 02:00:09 +0000273double nan(const char* _Nonnull __kind) __attribute_const__;
274float nanf(const char* _Nonnull __kind) __attribute_const__;
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000275long double nanl(const char* _Nonnull __kind) __attribute_const__;
Elliott Hughes50cda382017-09-14 15:30:08 -0700276
277double nextafter(double __x, double __y);
278float nextafterf(float __x, float __y);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000279long double nextafterl(long double __x, long double __y);
Elliott Hughes50cda382017-09-14 15:30:08 -0700280
Elliott Hughese17ebfd2023-05-26 13:00:51 -0700281double nexttoward(double __x, long double __y);
Elliott Hughes50cda382017-09-14 15:30:08 -0700282float nexttowardf(float __x, long double __y);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000283long double nexttowardl(long double __x, long double __y);
Elliott Hughes50cda382017-09-14 15:30:08 -0700284
285double fdim(double __x, double __y);
286float fdimf(float __x, float __y);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000287long double fdiml(long double __x, long double __y);
Elliott Hughes50cda382017-09-14 15:30:08 -0700288
289double fmax(double __x, double __y) __attribute_const__;
290float fmaxf(float __x, float __y) __attribute_const__;
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000291long double fmaxl(long double __x, long double __y) __attribute_const__;
Elliott Hughes50cda382017-09-14 15:30:08 -0700292
293double fmin(double __x, double __y) __attribute_const__;
294float fminf(float __x, float __y) __attribute_const__;
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000295long double fminl(long double __x, long double __y) __attribute_const__;
Elliott Hughes50cda382017-09-14 15:30:08 -0700296
297double fma(double __x, double __y, double __z);
298float fmaf(float __x, float __y, float __z);
Elliott Hughesab2d3e12023-06-07 17:16:34 +0000299long double fmal(long double __x, long double __y, long double __z);
Elliott Hughes50cda382017-09-14 15:30:08 -0700300
Elliott Hughesb6622802015-08-14 14:04:30 -0700301#define isgreater(x, y) __builtin_isgreater((x), (y))
302#define isgreaterequal(x, y) __builtin_isgreaterequal((x), (y))
303#define isless(x, y) __builtin_isless((x), (y))
304#define islessequal(x, y) __builtin_islessequal((x), (y))
305#define islessgreater(x, y) __builtin_islessgreater((x), (y))
306#define isunordered(x, y) __builtin_isunordered((x), (y))
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800307
Elliott Hughes50cda382017-09-14 15:30:08 -0700308/* POSIX extensions. */
Josh Gao46b44162016-05-27 11:14:16 -0700309
Elliott Hughes50cda382017-09-14 15:30:08 -0700310extern int signgam;
Elliott Hughesb4f2f282014-05-08 21:19:12 -0700311
Elliott Hughes684c31a2017-08-18 15:07:41 -0700312double j0(double __x);
313double j1(double __x);
314double jn(int __n, double __x);
315double y0(double __x);
316double y1(double __x);
317double yn(int __n, double __x);
Elliott Hughesc1929e42016-08-12 16:18:03 -0700318
Elliott Hughes3ba55f82016-06-08 18:11:23 -0700319#define M_E 2.7182818284590452354 /* e */
320#define M_LOG2E 1.4426950408889634074 /* log 2e */
321#define M_LOG10E 0.43429448190325182765 /* log 10e */
322#define M_LN2 0.69314718055994530942 /* log e2 */
323#define M_LN10 2.30258509299404568402 /* log e10 */
324#define M_PI 3.14159265358979323846 /* pi */
325#define M_PI_2 1.57079632679489661923 /* pi/2 */
326#define M_PI_4 0.78539816339744830962 /* pi/4 */
327#define M_1_PI 0.31830988618379067154 /* 1/pi */
328#define M_2_PI 0.63661977236758134308 /* 2/pi */
329#define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */
330#define M_SQRT2 1.41421356237309504880 /* sqrt(2) */
331#define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
Elliott Hughes9c8d7112016-06-13 13:23:42 -0700332
Elliott Hughes3ba55f82016-06-08 18:11:23 -0700333#define MAXFLOAT ((float)3.40282346638528860e+38)
Elliott Hughes9c8d7112016-06-13 13:23:42 -0700334
Elliott Hughes50cda382017-09-14 15:30:08 -0700335/* BSD extensions. */
336
337#if defined(__USE_BSD)
338#define HUGE MAXFLOAT
339#endif
340
341/* Extensions in both BSD and GNU. */
342
Elliott Hughes9c8d7112016-06-13 13:23:42 -0700343#if defined(__USE_BSD) || defined(__USE_GNU)
Elliott Hughes684c31a2017-08-18 15:07:41 -0700344double gamma(double __x);
345double scalb(double __x, double __exponent);
346double drem(double __x, double __y);
347int finite(double __x) __attribute_const__;
Elliott Hughesc51df932024-06-20 20:14:21 +0000348int isinff(float __x) __attribute_const__;
Elliott Hughes684c31a2017-08-18 15:07:41 -0700349int isnanf(float __x) __attribute_const__;
zijunzhao195b90b2023-02-08 02:00:09 +0000350double gamma_r(double __x, int* _Nonnull __sign);
351double lgamma_r(double __x, int* _Nonnull __sign);
Elliott Hughes684c31a2017-08-18 15:07:41 -0700352double significand(double __x);
zijunzhao195b90b2023-02-08 02:00:09 +0000353long double lgammal_r(long double __x, int* _Nonnull __sign) __INTRODUCED_IN(23);
Elliott Hughes655e4302023-06-16 12:39:33 -0700354long double significandl(long double __x);
Elliott Hughes684c31a2017-08-18 15:07:41 -0700355float dremf(float __x, float __y);
356int finitef(float __x) __attribute_const__;
357float gammaf(float __x);
358float j0f(float __x);
359float j1f(float __x);
360float jnf(int __n, float __x);
361float scalbf(float __x, float __exponent);
362float y0f(float __x);
363float y1f(float __x);
364float ynf(int __n, float __x);
zijunzhao195b90b2023-02-08 02:00:09 +0000365float gammaf_r(float __x, int* _Nonnull __sign);
366float lgammaf_r(float __x, int* _Nonnull __sign);
Elliott Hughes684c31a2017-08-18 15:07:41 -0700367float significandf(float __x);
zijunzhao195b90b2023-02-08 02:00:09 +0000368void sincos(double __x, double* _Nonnull __sin, double* _Nonnull __cos);
369void sincosf(float __x, float* _Nonnull __sin, float* _Nonnull __cos);
370void sincosl(long double __x, long double* _Nonnull __sin, long double* _Nonnull __cos);
Elliott Hughes75531852014-09-18 11:23:58 -0700371#endif
372
Elliott Hughes50cda382017-09-14 15:30:08 -0700373/* GNU extensions. */
374
Elliott Hughes5f5cc452014-08-18 16:04:03 -0700375#if defined(__USE_GNU)
Elliott Hughes3ba55f82016-06-08 18:11:23 -0700376#define M_El 2.718281828459045235360287471352662498L /* e */
377#define M_LOG2El 1.442695040888963407359924681001892137L /* log 2e */
378#define M_LOG10El 0.434294481903251827651128918916605082L /* log 10e */
379#define M_LN2l 0.693147180559945309417232121458176568L /* log e2 */
380#define M_LN10l 2.302585092994045684017991454684364208L /* log e10 */
381#define M_PIl 3.141592653589793238462643383279502884L /* pi */
382#define M_PI_2l 1.570796326794896619231321691639751442L /* pi/2 */
383#define M_PI_4l 0.785398163397448309615660845819875721L /* pi/4 */
384#define M_1_PIl 0.318309886183790671537767526745028724L /* 1/pi */
385#define M_2_PIl 0.636619772367581343075535053490057448L /* 2/pi */
386#define M_2_SQRTPIl 1.128379167095512573896158903121545172L /* 2/sqrt(pi) */
387#define M_SQRT2l 1.414213562373095048801688724209698079L /* sqrt(2) */
388#define M_SQRT1_2l 0.707106781186547524400844362104849039L /* 1/sqrt(2) */
Elliott Hughesc51df932024-06-20 20:14:21 +0000389int isinfl(long double __x) __attribute_const__;
390int isnanl(long double __x) __attribute_const__;
Elliott Hughes3ba55f82016-06-08 18:11:23 -0700391#endif
Elliott Hughesb4f2f282014-05-08 21:19:12 -0700392
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800393__END_DECLS