1570af302Sopenharmony_ci#ifndef _MATH_H
2570af302Sopenharmony_ci#define _MATH_H
3570af302Sopenharmony_ci
4570af302Sopenharmony_ci#ifdef __cplusplus
5570af302Sopenharmony_ciextern "C" {
6570af302Sopenharmony_ci#endif
7570af302Sopenharmony_ci
8570af302Sopenharmony_ci#include <features.h>
9570af302Sopenharmony_ci
10570af302Sopenharmony_ci#define __NEED_float_t
11570af302Sopenharmony_ci#define __NEED_double_t
12570af302Sopenharmony_ci#include <bits/alltypes.h>
13570af302Sopenharmony_ci
14570af302Sopenharmony_ci#if 100*__GNUC__+__GNUC_MINOR__ >= 303
15570af302Sopenharmony_ci#define NAN       __builtin_nanf("")
16570af302Sopenharmony_ci#define INFINITY  __builtin_inff()
17570af302Sopenharmony_ci#else
18570af302Sopenharmony_ci#define NAN       (0.0f/0.0f)
19570af302Sopenharmony_ci#define INFINITY  1e5000f
20570af302Sopenharmony_ci#endif
21570af302Sopenharmony_ci
22570af302Sopenharmony_ci#define HUGE_VALF INFINITY
23570af302Sopenharmony_ci#define HUGE_VAL  ((double)INFINITY)
24570af302Sopenharmony_ci#define HUGE_VALL ((long double)INFINITY)
25570af302Sopenharmony_ci
26570af302Sopenharmony_ci#define MATH_ERRNO  1
27570af302Sopenharmony_ci#define MATH_ERREXCEPT 2
28570af302Sopenharmony_ci#define math_errhandling 2
29570af302Sopenharmony_ci
30570af302Sopenharmony_ci#define FP_ILOGBNAN (-1-0x7fffffff)
31570af302Sopenharmony_ci#define FP_ILOGB0 FP_ILOGBNAN
32570af302Sopenharmony_ci
33570af302Sopenharmony_ci#define FP_NAN       0
34570af302Sopenharmony_ci#define FP_INFINITE  1
35570af302Sopenharmony_ci#define FP_ZERO      2
36570af302Sopenharmony_ci#define FP_SUBNORMAL 3
37570af302Sopenharmony_ci#define FP_NORMAL    4
38570af302Sopenharmony_ci
39570af302Sopenharmony_ci#ifdef __FP_FAST_FMA
40570af302Sopenharmony_ci#define FP_FAST_FMA 1
41570af302Sopenharmony_ci#endif
42570af302Sopenharmony_ci
43570af302Sopenharmony_ci#ifdef __FP_FAST_FMAF
44570af302Sopenharmony_ci#define FP_FAST_FMAF 1
45570af302Sopenharmony_ci#endif
46570af302Sopenharmony_ci
47570af302Sopenharmony_ci#ifdef __FP_FAST_FMAL
48570af302Sopenharmony_ci#define FP_FAST_FMAL 1
49570af302Sopenharmony_ci#endif
50570af302Sopenharmony_ci
51570af302Sopenharmony_ciint __fpclassify(double);
52570af302Sopenharmony_ciint __fpclassifyf(float);
53570af302Sopenharmony_ciint __fpclassifyl(long double);
54570af302Sopenharmony_ci
55570af302Sopenharmony_cistatic __inline unsigned __FLOAT_BITS(float __f)
56570af302Sopenharmony_ci{
57570af302Sopenharmony_ci	union {float __f; unsigned __i;} __u;
58570af302Sopenharmony_ci	__u.__f = __f;
59570af302Sopenharmony_ci	return __u.__i;
60570af302Sopenharmony_ci}
61570af302Sopenharmony_cistatic __inline unsigned long long __DOUBLE_BITS(double __f)
62570af302Sopenharmony_ci{
63570af302Sopenharmony_ci	union {double __f; unsigned long long __i;} __u;
64570af302Sopenharmony_ci	__u.__f = __f;
65570af302Sopenharmony_ci	return __u.__i;
66570af302Sopenharmony_ci}
67570af302Sopenharmony_ci
68570af302Sopenharmony_ci#define fpclassify(x) ( \
69570af302Sopenharmony_ci	sizeof(x) == sizeof(float) ? __fpclassifyf(x) : \
70570af302Sopenharmony_ci	sizeof(x) == sizeof(double) ? __fpclassify(x) : \
71570af302Sopenharmony_ci	__fpclassifyl(x) )
72570af302Sopenharmony_ci
73570af302Sopenharmony_ci#define isinf(x) ( \
74570af302Sopenharmony_ci	sizeof(x) == sizeof(float) ? (__FLOAT_BITS(x) & 0x7fffffff) == 0x7f800000 : \
75570af302Sopenharmony_ci	sizeof(x) == sizeof(double) ? (__DOUBLE_BITS(x) & -1ULL>>1) == 0x7ffULL<<52 : \
76570af302Sopenharmony_ci	__fpclassifyl(x) == FP_INFINITE)
77570af302Sopenharmony_ci
78570af302Sopenharmony_ci#define isnan(x) ( \
79570af302Sopenharmony_ci	sizeof(x) == sizeof(float) ? (__FLOAT_BITS(x) & 0x7fffffff) > 0x7f800000 : \
80570af302Sopenharmony_ci	sizeof(x) == sizeof(double) ? (__DOUBLE_BITS(x) & -1ULL>>1) > 0x7ffULL<<52 : \
81570af302Sopenharmony_ci	__fpclassifyl(x) == FP_NAN)
82570af302Sopenharmony_ci
83570af302Sopenharmony_ci#define isnormal(x) ( \
84570af302Sopenharmony_ci	sizeof(x) == sizeof(float) ? ((__FLOAT_BITS(x)+0x00800000) & 0x7fffffff) >= 0x01000000 : \
85570af302Sopenharmony_ci	sizeof(x) == sizeof(double) ? ((__DOUBLE_BITS(x)+(1ULL<<52)) & -1ULL>>1) >= 1ULL<<53 : \
86570af302Sopenharmony_ci	__fpclassifyl(x) == FP_NORMAL)
87570af302Sopenharmony_ci
88570af302Sopenharmony_ci#define isfinite(x) ( \
89570af302Sopenharmony_ci	sizeof(x) == sizeof(float) ? (__FLOAT_BITS(x) & 0x7fffffff) < 0x7f800000 : \
90570af302Sopenharmony_ci	sizeof(x) == sizeof(double) ? (__DOUBLE_BITS(x) & -1ULL>>1) < 0x7ffULL<<52 : \
91570af302Sopenharmony_ci	__fpclassifyl(x) > FP_INFINITE)
92570af302Sopenharmony_ci
93570af302Sopenharmony_ciint __signbit(double);
94570af302Sopenharmony_ciint __signbitf(float);
95570af302Sopenharmony_ciint __signbitl(long double);
96570af302Sopenharmony_ci
97570af302Sopenharmony_ci#define signbit(x) ( \
98570af302Sopenharmony_ci	sizeof(x) == sizeof(float) ? (int)(__FLOAT_BITS(x)>>31) : \
99570af302Sopenharmony_ci	sizeof(x) == sizeof(double) ? (int)(__DOUBLE_BITS(x)>>63) : \
100570af302Sopenharmony_ci	__signbitl(x) )
101570af302Sopenharmony_ci
102570af302Sopenharmony_ci#define isunordered(x,y) (isnan((x)) ? ((void)(y),1) : isnan((y)))
103570af302Sopenharmony_ci
104570af302Sopenharmony_ci#define __ISREL_DEF(rel, op, type) \
105570af302Sopenharmony_cistatic __inline int __is##rel(type __x, type __y) \
106570af302Sopenharmony_ci{ return !isunordered(__x,__y) && __x op __y; }
107570af302Sopenharmony_ci
108570af302Sopenharmony_ci__ISREL_DEF(lessf, <, float_t)
109570af302Sopenharmony_ci__ISREL_DEF(less, <, double_t)
110570af302Sopenharmony_ci__ISREL_DEF(lessl, <, long double)
111570af302Sopenharmony_ci__ISREL_DEF(lessequalf, <=, float_t)
112570af302Sopenharmony_ci__ISREL_DEF(lessequal, <=, double_t)
113570af302Sopenharmony_ci__ISREL_DEF(lessequall, <=, long double)
114570af302Sopenharmony_ci__ISREL_DEF(lessgreaterf, !=, float_t)
115570af302Sopenharmony_ci__ISREL_DEF(lessgreater, !=, double_t)
116570af302Sopenharmony_ci__ISREL_DEF(lessgreaterl, !=, long double)
117570af302Sopenharmony_ci__ISREL_DEF(greaterf, >, float_t)
118570af302Sopenharmony_ci__ISREL_DEF(greater, >, double_t)
119570af302Sopenharmony_ci__ISREL_DEF(greaterl, >, long double)
120570af302Sopenharmony_ci__ISREL_DEF(greaterequalf, >=, float_t)
121570af302Sopenharmony_ci__ISREL_DEF(greaterequal, >=, double_t)
122570af302Sopenharmony_ci__ISREL_DEF(greaterequall, >=, long double)
123570af302Sopenharmony_ci
124570af302Sopenharmony_ci#define __tg_pred_2(x, y, p) ( \
125570af302Sopenharmony_ci	sizeof((x)+(y)) == sizeof(float) ? p##f(x, y) : \
126570af302Sopenharmony_ci	sizeof((x)+(y)) == sizeof(double) ? p(x, y) : \
127570af302Sopenharmony_ci	p##l(x, y) )
128570af302Sopenharmony_ci
129570af302Sopenharmony_ci#define isless(x, y)            __tg_pred_2(x, y, __isless)
130570af302Sopenharmony_ci#define islessequal(x, y)       __tg_pred_2(x, y, __islessequal)
131570af302Sopenharmony_ci#define islessgreater(x, y)     __tg_pred_2(x, y, __islessgreater)
132570af302Sopenharmony_ci#define isgreater(x, y)         __tg_pred_2(x, y, __isgreater)
133570af302Sopenharmony_ci#define isgreaterequal(x, y)    __tg_pred_2(x, y, __isgreaterequal)
134570af302Sopenharmony_ci
135570af302Sopenharmony_cidouble      acos(double);
136570af302Sopenharmony_cifloat       acosf(float);
137570af302Sopenharmony_cilong double acosl(long double);
138570af302Sopenharmony_ci
139570af302Sopenharmony_cidouble      acosh(double);
140570af302Sopenharmony_cifloat       acoshf(float);
141570af302Sopenharmony_cilong double acoshl(long double);
142570af302Sopenharmony_ci
143570af302Sopenharmony_cidouble      asin(double);
144570af302Sopenharmony_cifloat       asinf(float);
145570af302Sopenharmony_cilong double asinl(long double);
146570af302Sopenharmony_ci
147570af302Sopenharmony_cidouble      asinh(double);
148570af302Sopenharmony_cifloat       asinhf(float);
149570af302Sopenharmony_cilong double asinhl(long double);
150570af302Sopenharmony_ci
151570af302Sopenharmony_cidouble      atan(double);
152570af302Sopenharmony_cifloat       atanf(float);
153570af302Sopenharmony_cilong double atanl(long double);
154570af302Sopenharmony_ci
155570af302Sopenharmony_cidouble      atan2(double, double);
156570af302Sopenharmony_cifloat       atan2f(float, float);
157570af302Sopenharmony_cilong double atan2l(long double, long double);
158570af302Sopenharmony_ci
159570af302Sopenharmony_cidouble      atanh(double);
160570af302Sopenharmony_cifloat       atanhf(float);
161570af302Sopenharmony_cilong double atanhl(long double);
162570af302Sopenharmony_ci
163570af302Sopenharmony_cidouble      cbrt(double);
164570af302Sopenharmony_cifloat       cbrtf(float);
165570af302Sopenharmony_cilong double cbrtl(long double);
166570af302Sopenharmony_ci
167570af302Sopenharmony_cidouble      ceil(double);
168570af302Sopenharmony_cifloat       ceilf(float);
169570af302Sopenharmony_cilong double ceill(long double);
170570af302Sopenharmony_ci
171570af302Sopenharmony_cidouble      copysign(double, double);
172570af302Sopenharmony_cifloat       copysignf(float, float);
173570af302Sopenharmony_cilong double copysignl(long double, long double);
174570af302Sopenharmony_ci
175570af302Sopenharmony_cidouble      cos(double);
176570af302Sopenharmony_cifloat       cosf(float);
177570af302Sopenharmony_cilong double cosl(long double);
178570af302Sopenharmony_ci
179570af302Sopenharmony_cidouble      cosh(double);
180570af302Sopenharmony_cifloat       coshf(float);
181570af302Sopenharmony_cilong double coshl(long double);
182570af302Sopenharmony_ci
183570af302Sopenharmony_cidouble      erf(double);
184570af302Sopenharmony_cifloat       erff(float);
185570af302Sopenharmony_cilong double erfl(long double);
186570af302Sopenharmony_ci
187570af302Sopenharmony_cidouble      erfc(double);
188570af302Sopenharmony_cifloat       erfcf(float);
189570af302Sopenharmony_cilong double erfcl(long double);
190570af302Sopenharmony_ci
191570af302Sopenharmony_cidouble      exp(double);
192570af302Sopenharmony_cifloat       expf(float);
193570af302Sopenharmony_cilong double expl(long double);
194570af302Sopenharmony_ci
195570af302Sopenharmony_cidouble      exp2(double);
196570af302Sopenharmony_cifloat       exp2f(float);
197570af302Sopenharmony_cilong double exp2l(long double);
198570af302Sopenharmony_ci
199570af302Sopenharmony_cidouble      expm1(double);
200570af302Sopenharmony_cifloat       expm1f(float);
201570af302Sopenharmony_cilong double expm1l(long double);
202570af302Sopenharmony_ci
203570af302Sopenharmony_cidouble      fabs(double);
204570af302Sopenharmony_cifloat       fabsf(float);
205570af302Sopenharmony_cilong double fabsl(long double);
206570af302Sopenharmony_ci
207570af302Sopenharmony_cidouble      fdim(double, double);
208570af302Sopenharmony_cifloat       fdimf(float, float);
209570af302Sopenharmony_cilong double fdiml(long double, long double);
210570af302Sopenharmony_ci
211570af302Sopenharmony_cidouble      floor(double);
212570af302Sopenharmony_cifloat       floorf(float);
213570af302Sopenharmony_cilong double floorl(long double);
214570af302Sopenharmony_ci
215570af302Sopenharmony_cidouble      fma(double, double, double);
216570af302Sopenharmony_cifloat       fmaf(float, float, float);
217570af302Sopenharmony_cilong double fmal(long double, long double, long double);
218570af302Sopenharmony_ci
219570af302Sopenharmony_cidouble      fmax(double, double);
220570af302Sopenharmony_cifloat       fmaxf(float, float);
221570af302Sopenharmony_cilong double fmaxl(long double, long double);
222570af302Sopenharmony_ci
223570af302Sopenharmony_cidouble      fmin(double, double);
224570af302Sopenharmony_cifloat       fminf(float, float);
225570af302Sopenharmony_cilong double fminl(long double, long double);
226570af302Sopenharmony_ci
227570af302Sopenharmony_cidouble      fmod(double, double);
228570af302Sopenharmony_cifloat       fmodf(float, float);
229570af302Sopenharmony_cilong double fmodl(long double, long double);
230570af302Sopenharmony_ci
231570af302Sopenharmony_cidouble      frexp(double, int *);
232570af302Sopenharmony_cifloat       frexpf(float, int *);
233570af302Sopenharmony_cilong double frexpl(long double, int *);
234570af302Sopenharmony_ci
235570af302Sopenharmony_cidouble      hypot(double, double);
236570af302Sopenharmony_cifloat       hypotf(float, float);
237570af302Sopenharmony_cilong double hypotl(long double, long double);
238570af302Sopenharmony_ci
239570af302Sopenharmony_ciint         ilogb(double);
240570af302Sopenharmony_ciint         ilogbf(float);
241570af302Sopenharmony_ciint         ilogbl(long double);
242570af302Sopenharmony_ci
243570af302Sopenharmony_cidouble      ldexp(double, int);
244570af302Sopenharmony_cifloat       ldexpf(float, int);
245570af302Sopenharmony_cilong double ldexpl(long double, int);
246570af302Sopenharmony_ci
247570af302Sopenharmony_cidouble      lgamma(double);
248570af302Sopenharmony_cifloat       lgammaf(float);
249570af302Sopenharmony_cilong double lgammal(long double);
250570af302Sopenharmony_ci
251570af302Sopenharmony_cilong long   llrint(double);
252570af302Sopenharmony_cilong long   llrintf(float);
253570af302Sopenharmony_cilong long   llrintl(long double);
254570af302Sopenharmony_ci
255570af302Sopenharmony_cilong long   llround(double);
256570af302Sopenharmony_cilong long   llroundf(float);
257570af302Sopenharmony_cilong long   llroundl(long double);
258570af302Sopenharmony_ci
259570af302Sopenharmony_cidouble      log(double);
260570af302Sopenharmony_cifloat       logf(float);
261570af302Sopenharmony_cilong double logl(long double);
262570af302Sopenharmony_ci
263570af302Sopenharmony_cidouble      log10(double);
264570af302Sopenharmony_cifloat       log10f(float);
265570af302Sopenharmony_cilong double log10l(long double);
266570af302Sopenharmony_ci
267570af302Sopenharmony_cidouble      log1p(double);
268570af302Sopenharmony_cifloat       log1pf(float);
269570af302Sopenharmony_cilong double log1pl(long double);
270570af302Sopenharmony_ci
271570af302Sopenharmony_cidouble      log2(double);
272570af302Sopenharmony_cifloat       log2f(float);
273570af302Sopenharmony_cilong double log2l(long double);
274570af302Sopenharmony_ci
275570af302Sopenharmony_cidouble      logb(double);
276570af302Sopenharmony_cifloat       logbf(float);
277570af302Sopenharmony_cilong double logbl(long double);
278570af302Sopenharmony_ci
279570af302Sopenharmony_cilong        lrint(double);
280570af302Sopenharmony_cilong        lrintf(float);
281570af302Sopenharmony_cilong        lrintl(long double);
282570af302Sopenharmony_ci
283570af302Sopenharmony_cilong        lround(double);
284570af302Sopenharmony_cilong        lroundf(float);
285570af302Sopenharmony_cilong        lroundl(long double);
286570af302Sopenharmony_ci
287570af302Sopenharmony_cidouble      modf(double, double *);
288570af302Sopenharmony_cifloat       modff(float, float *);
289570af302Sopenharmony_cilong double modfl(long double, long double *);
290570af302Sopenharmony_ci
291570af302Sopenharmony_cidouble      nan(const char *);
292570af302Sopenharmony_cifloat       nanf(const char *);
293570af302Sopenharmony_cilong double nanl(const char *);
294570af302Sopenharmony_ci
295570af302Sopenharmony_cidouble      nearbyint(double);
296570af302Sopenharmony_cifloat       nearbyintf(float);
297570af302Sopenharmony_cilong double nearbyintl(long double);
298570af302Sopenharmony_ci
299570af302Sopenharmony_cidouble      nextafter(double, double);
300570af302Sopenharmony_cifloat       nextafterf(float, float);
301570af302Sopenharmony_cilong double nextafterl(long double, long double);
302570af302Sopenharmony_ci
303570af302Sopenharmony_cidouble      nexttoward(double, long double);
304570af302Sopenharmony_cifloat       nexttowardf(float, long double);
305570af302Sopenharmony_cilong double nexttowardl(long double, long double);
306570af302Sopenharmony_ci
307570af302Sopenharmony_cidouble      pow(double, double);
308570af302Sopenharmony_cifloat       powf(float, float);
309570af302Sopenharmony_cilong double powl(long double, long double);
310570af302Sopenharmony_ci
311570af302Sopenharmony_cidouble      remainder(double, double);
312570af302Sopenharmony_cifloat       remainderf(float, float);
313570af302Sopenharmony_cilong double remainderl(long double, long double);
314570af302Sopenharmony_ci
315570af302Sopenharmony_cidouble      remquo(double, double, int *);
316570af302Sopenharmony_cifloat       remquof(float, float, int *);
317570af302Sopenharmony_cilong double remquol(long double, long double, int *);
318570af302Sopenharmony_ci
319570af302Sopenharmony_cidouble      rint(double);
320570af302Sopenharmony_cifloat       rintf(float);
321570af302Sopenharmony_cilong double rintl(long double);
322570af302Sopenharmony_ci
323570af302Sopenharmony_cidouble      round(double);
324570af302Sopenharmony_cifloat       roundf(float);
325570af302Sopenharmony_cilong double roundl(long double);
326570af302Sopenharmony_ci
327570af302Sopenharmony_cidouble      scalbln(double, long);
328570af302Sopenharmony_cifloat       scalblnf(float, long);
329570af302Sopenharmony_cilong double scalblnl(long double, long);
330570af302Sopenharmony_ci
331570af302Sopenharmony_cidouble      scalbn(double, int);
332570af302Sopenharmony_cifloat       scalbnf(float, int);
333570af302Sopenharmony_cilong double scalbnl(long double, int);
334570af302Sopenharmony_ci
335570af302Sopenharmony_cidouble      sin(double);
336570af302Sopenharmony_cifloat       sinf(float);
337570af302Sopenharmony_cilong double sinl(long double);
338570af302Sopenharmony_ci
339570af302Sopenharmony_cidouble      sinh(double);
340570af302Sopenharmony_cifloat       sinhf(float);
341570af302Sopenharmony_cilong double sinhl(long double);
342570af302Sopenharmony_ci
343570af302Sopenharmony_cidouble      sqrt(double);
344570af302Sopenharmony_cifloat       sqrtf(float);
345570af302Sopenharmony_cilong double sqrtl(long double);
346570af302Sopenharmony_ci
347570af302Sopenharmony_cidouble      tan(double);
348570af302Sopenharmony_cifloat       tanf(float);
349570af302Sopenharmony_cilong double tanl(long double);
350570af302Sopenharmony_ci
351570af302Sopenharmony_cidouble      tanh(double);
352570af302Sopenharmony_cifloat       tanhf(float);
353570af302Sopenharmony_cilong double tanhl(long double);
354570af302Sopenharmony_ci
355570af302Sopenharmony_cidouble      tgamma(double);
356570af302Sopenharmony_cifloat       tgammaf(float);
357570af302Sopenharmony_cilong double tgammal(long double);
358570af302Sopenharmony_ci
359570af302Sopenharmony_cidouble      trunc(double);
360570af302Sopenharmony_cifloat       truncf(float);
361570af302Sopenharmony_cilong double truncl(long double);
362570af302Sopenharmony_ci
363570af302Sopenharmony_ci
364570af302Sopenharmony_ci#if defined(_XOPEN_SOURCE) || defined(_BSD_SOURCE)
365570af302Sopenharmony_ci#undef  MAXFLOAT
366570af302Sopenharmony_ci#define MAXFLOAT        3.40282346638528859812e+38F
367570af302Sopenharmony_ci#endif
368570af302Sopenharmony_ci
369570af302Sopenharmony_ci#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
370570af302Sopenharmony_ci#define M_E             2.7182818284590452354   /* e */
371570af302Sopenharmony_ci#define M_LOG2E         1.4426950408889634074   /* log_2 e */
372570af302Sopenharmony_ci#define M_LOG10E        0.43429448190325182765  /* log_10 e */
373570af302Sopenharmony_ci#define M_LN2           0.69314718055994530942  /* log_e 2 */
374570af302Sopenharmony_ci#define M_LN10          2.30258509299404568402  /* log_e 10 */
375570af302Sopenharmony_ci#define M_PI            3.14159265358979323846  /* pi */
376570af302Sopenharmony_ci#define M_PI_2          1.57079632679489661923  /* pi/2 */
377570af302Sopenharmony_ci#define M_PI_4          0.78539816339744830962  /* pi/4 */
378570af302Sopenharmony_ci#define M_1_PI          0.31830988618379067154  /* 1/pi */
379570af302Sopenharmony_ci#define M_2_PI          0.63661977236758134308  /* 2/pi */
380570af302Sopenharmony_ci#define M_2_SQRTPI      1.12837916709551257390  /* 2/sqrt(pi) */
381570af302Sopenharmony_ci#define M_SQRT2         1.41421356237309504880  /* sqrt(2) */
382570af302Sopenharmony_ci#define M_SQRT1_2       0.70710678118654752440  /* 1/sqrt(2) */
383570af302Sopenharmony_ci
384570af302Sopenharmony_ciextern int signgam;
385570af302Sopenharmony_ci
386570af302Sopenharmony_cidouble      j0(double);
387570af302Sopenharmony_cidouble      j1(double);
388570af302Sopenharmony_cidouble      jn(int, double);
389570af302Sopenharmony_ci
390570af302Sopenharmony_cidouble      y0(double);
391570af302Sopenharmony_cidouble      y1(double);
392570af302Sopenharmony_cidouble      yn(int, double);
393570af302Sopenharmony_ci#endif
394570af302Sopenharmony_ci
395570af302Sopenharmony_ci#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
396570af302Sopenharmony_ci#define HUGE            3.40282346638528859812e+38F
397570af302Sopenharmony_ci
398570af302Sopenharmony_cidouble      drem(double, double);
399570af302Sopenharmony_cifloat       dremf(float, float);
400570af302Sopenharmony_ci
401570af302Sopenharmony_ciint         finite(double);
402570af302Sopenharmony_ciint         finitef(float);
403570af302Sopenharmony_ci
404570af302Sopenharmony_cidouble      scalb(double, double);
405570af302Sopenharmony_cifloat       scalbf(float, float);
406570af302Sopenharmony_ci
407570af302Sopenharmony_cidouble      significand(double);
408570af302Sopenharmony_cifloat       significandf(float);
409570af302Sopenharmony_ci
410570af302Sopenharmony_cidouble      lgamma_r(double, int*);
411570af302Sopenharmony_cifloat       lgammaf_r(float, int*);
412570af302Sopenharmony_ci
413570af302Sopenharmony_cifloat       j0f(float);
414570af302Sopenharmony_cifloat       j1f(float);
415570af302Sopenharmony_cifloat       jnf(int, float);
416570af302Sopenharmony_ci
417570af302Sopenharmony_cifloat       y0f(float);
418570af302Sopenharmony_cifloat       y1f(float);
419570af302Sopenharmony_cifloat       ynf(int, float);
420570af302Sopenharmony_ci#endif
421570af302Sopenharmony_ci
422570af302Sopenharmony_ci#ifdef _GNU_SOURCE
423570af302Sopenharmony_cilong double lgammal_r(long double, int*);
424570af302Sopenharmony_ci
425570af302Sopenharmony_civoid        sincos(double, double*, double*);
426570af302Sopenharmony_civoid        sincosf(float, float*, float*);
427570af302Sopenharmony_civoid        sincosl(long double, long double*, long double*);
428570af302Sopenharmony_ci
429570af302Sopenharmony_cidouble      exp10(double);
430570af302Sopenharmony_cifloat       exp10f(float);
431570af302Sopenharmony_cilong double exp10l(long double);
432570af302Sopenharmony_ci
433570af302Sopenharmony_cidouble      pow10(double);
434570af302Sopenharmony_cifloat       pow10f(float);
435570af302Sopenharmony_cilong double pow10l(long double);
436570af302Sopenharmony_ci#endif
437570af302Sopenharmony_ci
438570af302Sopenharmony_ci#ifdef __cplusplus
439570af302Sopenharmony_ci}
440570af302Sopenharmony_ci#endif
441570af302Sopenharmony_ci
442570af302Sopenharmony_ci#endif
443