williamr@4
|
1 |
|
williamr@2
|
2 |
/*
|
williamr@2
|
3 |
* ====================================================
|
williamr@2
|
4 |
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
|
williamr@2
|
5 |
*
|
williamr@2
|
6 |
* Developed at SunPro, a Sun Microsystems, Inc. business.
|
williamr@2
|
7 |
* Permission to use, copy, modify, and distribute this
|
williamr@2
|
8 |
* software is freely granted, provided that this notice
|
williamr@2
|
9 |
* is preserved.
|
williamr@2
|
10 |
* ====================================================
|
williamr@4
|
11 |
* Portions Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
|
williamr@2
|
12 |
*/
|
williamr@2
|
13 |
|
williamr@2
|
14 |
/*
|
williamr@2
|
15 |
* from: @(#)fdlibm.h 5.1 93/09/24
|
williamr@2
|
16 |
* $FreeBSD: src/lib/msun/src/math.h,v 1.61 2005/04/16 21:12:47 das Exp $
|
williamr@2
|
17 |
*/
|
williamr@2
|
18 |
|
williamr@2
|
19 |
#ifndef _MATH_H_
|
williamr@2
|
20 |
#define _MATH_H_
|
williamr@2
|
21 |
|
williamr@2
|
22 |
|
williamr@2
|
23 |
#ifdef __SYMBIAN32__
|
williamr@2
|
24 |
#ifdef __VC32__
|
williamr@2
|
25 |
/* warning C4056: overflow in floating-point constant arithmetic
|
williamr@2
|
26 |
* Caused by negative floating point constants, it seems!
|
williamr@2
|
27 |
* For example, static double foo = -1.0;
|
williamr@2
|
28 |
*/
|
williamr@2
|
29 |
#pragma warning( disable: 4056 )
|
williamr@2
|
30 |
#endif
|
williamr@2
|
31 |
#ifdef __ARMCC__
|
williamr@2
|
32 |
/* Warning: #222-D: floating-point operation result is out of range
|
williamr@2
|
33 |
* The compiler detects constant math that overflows, we want overflow though!
|
williamr@2
|
34 |
* Warning: #39-D: division by zero
|
williamr@2
|
35 |
*/
|
williamr@2
|
36 |
#pragma diag_suppress 222
|
williamr@2
|
37 |
#pragma diag_suppress 39
|
williamr@2
|
38 |
#pragma diag_suppress 2874
|
williamr@2
|
39 |
#endif
|
williamr@2
|
40 |
#endif //__SYMBIAN32__
|
williamr@2
|
41 |
|
williamr@2
|
42 |
#ifdef __SYMBIAN32__
|
williamr@2
|
43 |
#include <_ansi.h>
|
williamr@2
|
44 |
#endif //__SYMBIAN32__
|
williamr@2
|
45 |
|
williamr@2
|
46 |
#include <sys/cdefs.h>
|
williamr@2
|
47 |
#include <sys/_types.h>
|
williamr@4
|
48 |
#include <stdapis/machine/_limits.h>
|
williamr@2
|
49 |
|
williamr@2
|
50 |
#ifdef __SYMBIAN32__
|
williamr@2
|
51 |
#include <libm_aliases.h>
|
williamr@2
|
52 |
#endif //__SYMBIAN32__
|
williamr@2
|
53 |
#ifdef __SYMBIAN32__
|
williamr@2
|
54 |
#include "signgam.h"
|
williamr@2
|
55 |
|
williamr@2
|
56 |
// IEC 559 math functionality
|
williamr@2
|
57 |
#define __STDC_IEC_559__ 1
|
williamr@2
|
58 |
#endif //__SYMBIAN32__
|
williamr@2
|
59 |
|
williamr@2
|
60 |
/*
|
williamr@2
|
61 |
* ANSI/POSIX
|
williamr@2
|
62 |
*/
|
williamr@2
|
63 |
#ifndef __SYMBIAN32__
|
williamr@2
|
64 |
extern const union __infinity_un {
|
williamr@2
|
65 |
unsigned char __uc[8];
|
williamr@2
|
66 |
double __ud;
|
williamr@2
|
67 |
} __infinity;
|
williamr@2
|
68 |
|
williamr@2
|
69 |
extern const union __nan_un {
|
williamr@2
|
70 |
unsigned char __uc[sizeof(float)];
|
williamr@2
|
71 |
float __uf;
|
williamr@2
|
72 |
} __nan;
|
williamr@2
|
73 |
#endif //__SYMBIAN32__
|
williamr@2
|
74 |
|
williamr@2
|
75 |
#if __GNUC_PREREQ__(3, 3) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 800)
|
williamr@2
|
76 |
#define __MATH_BUILTIN_CONSTANTS
|
williamr@2
|
77 |
#endif
|
williamr@2
|
78 |
|
williamr@2
|
79 |
#if __GNUC_PREREQ__(3, 0) && !defined(__INTEL_COMPILER)
|
williamr@2
|
80 |
#define __MATH_BUILTIN_RELOPS
|
williamr@2
|
81 |
#endif
|
williamr@2
|
82 |
|
williamr@2
|
83 |
#ifdef __SYMBIAN32__
|
williamr@2
|
84 |
#define HUGE_VAL __infinite(1.0)
|
williamr@2
|
85 |
#else
|
williamr@2
|
86 |
#ifdef __MATH_BUILTIN_CONSTANTS
|
williamr@2
|
87 |
#define HUGE_VAL __builtin_huge_val()
|
williamr@2
|
88 |
#else
|
williamr@2
|
89 |
#define HUGE_VAL (__infinity.__ud)
|
williamr@2
|
90 |
#endif
|
williamr@2
|
91 |
#endif //__SYMBIAN32__
|
williamr@2
|
92 |
|
williamr@2
|
93 |
#if __ISO_C_VISIBLE >= 1999
|
williamr@2
|
94 |
#define FP_ILOGB0 (-__INT_MAX)
|
williamr@2
|
95 |
#define FP_ILOGBNAN __INT_MAX
|
williamr@2
|
96 |
|
williamr@2
|
97 |
#ifdef __MATH_BUILTIN_CONSTANTS
|
williamr@2
|
98 |
#define HUGE_VALF __builtin_huge_valf()
|
williamr@2
|
99 |
#define HUGE_VALL __builtin_huge_vall()
|
williamr@2
|
100 |
#define INFINITY __builtin_inf()
|
williamr@2
|
101 |
#define NAN __builtin_nan("")
|
williamr@2
|
102 |
#else
|
williamr@2
|
103 |
#define HUGE_VALF (float)HUGE_VAL
|
williamr@2
|
104 |
#define HUGE_VALL (long double)HUGE_VAL
|
williamr@2
|
105 |
#define INFINITY HUGE_VALF
|
williamr@2
|
106 |
#ifdef __SYMBIAN32__
|
williamr@2
|
107 |
#define NAN nanvalf()
|
williamr@2
|
108 |
#else
|
williamr@2
|
109 |
#define NAN (__nan.__uf)
|
williamr@2
|
110 |
#endif //__SYMBIAN32__
|
williamr@2
|
111 |
#endif /* __MATH_BUILTIN_CONSTANTS */
|
williamr@2
|
112 |
|
williamr@2
|
113 |
#define MATH_ERRNO 1
|
williamr@2
|
114 |
#define MATH_ERREXCEPT 2
|
williamr@2
|
115 |
#define math_errhandling MATH_ERREXCEPT
|
williamr@2
|
116 |
|
williamr@2
|
117 |
/* XXX We need a <machine/math.h>. */
|
williamr@2
|
118 |
#if defined(__ia64__) || defined(__sparc64__)
|
williamr@2
|
119 |
#define FP_FAST_FMA
|
williamr@2
|
120 |
#endif
|
williamr@2
|
121 |
#ifdef __ia64__
|
williamr@2
|
122 |
#define FP_FAST_FMAL
|
williamr@2
|
123 |
#endif
|
williamr@2
|
124 |
#define FP_FAST_FMAF
|
williamr@2
|
125 |
|
williamr@2
|
126 |
/* Symbolic constants to classify floating point numbers. */
|
williamr@2
|
127 |
#define FP_INFINITE 0x01
|
williamr@2
|
128 |
#define FP_NAN 0x02
|
williamr@2
|
129 |
#define FP_NORMAL 0x04
|
williamr@2
|
130 |
#define FP_SUBNORMAL 0x08
|
williamr@2
|
131 |
#define FP_ZERO 0x10
|
williamr@2
|
132 |
|
williamr@2
|
133 |
#define fpclassify(x) \
|
williamr@2
|
134 |
((sizeof (x) == sizeof (float)) ? __fpclassifyf(x) \
|
williamr@2
|
135 |
: (sizeof (x) == sizeof (double)) ? __fpclassifyd(x) \
|
williamr@2
|
136 |
: __fpclassifyl(x))
|
williamr@2
|
137 |
|
williamr@2
|
138 |
#define isfinite(x) \
|
williamr@2
|
139 |
((sizeof (x) == sizeof (float)) ? __isfinitef(x) \
|
williamr@2
|
140 |
: (sizeof (x) == sizeof (double)) ? __isfinite(x) \
|
williamr@2
|
141 |
: __isfinitel(x))
|
williamr@2
|
142 |
#define isinf(x) \
|
williamr@2
|
143 |
((sizeof (x) == sizeof (float)) ? __isinff(x) \
|
williamr@2
|
144 |
: (sizeof (x) == sizeof (double)) ? __isinf(x) \
|
williamr@2
|
145 |
: __isinfl(x))
|
williamr@2
|
146 |
#define isnan(x) \
|
williamr@2
|
147 |
((sizeof (x) == sizeof (float)) ? __isnanf(x) \
|
williamr@2
|
148 |
: (sizeof (x) == sizeof (double)) ? __isnan(x) \
|
williamr@2
|
149 |
: __isnanl(x))
|
williamr@2
|
150 |
#define isnormal(x) \
|
williamr@2
|
151 |
((sizeof (x) == sizeof (float)) ? __isnormalf(x) \
|
williamr@2
|
152 |
: (sizeof (x) == sizeof (double)) ? __isnormal(x) \
|
williamr@2
|
153 |
: __isnormall(x))
|
williamr@2
|
154 |
|
williamr@2
|
155 |
|
williamr@2
|
156 |
#ifdef __MATH_BUILTIN_RELOPS
|
williamr@2
|
157 |
#define isgreater(x, y) __builtin_isgreater((x), (y))
|
williamr@2
|
158 |
#define isgreaterequal(x, y) __builtin_isgreaterequal((x), (y))
|
williamr@2
|
159 |
#define isless(x, y) __builtin_isless((x), (y))
|
williamr@2
|
160 |
#define islessequal(x, y) __builtin_islessequal((x), (y))
|
williamr@2
|
161 |
#define islessgreater(x, y) __builtin_islessgreater((x), (y))
|
williamr@2
|
162 |
#define isunordered(x, y) __builtin_isunordered((x), (y))
|
williamr@2
|
163 |
#else
|
williamr@2
|
164 |
#define isgreater(x, y) (!isunordered((x), (y)) && (x) > (y))
|
williamr@2
|
165 |
#define isgreaterequal(x, y) (!isunordered((x), (y)) && (x) >= (y))
|
williamr@2
|
166 |
#define isless(x, y) (!isunordered((x), (y)) && (x) < (y))
|
williamr@2
|
167 |
#define islessequal(x, y) (!isunordered((x), (y)) && (x) <= (y))
|
williamr@2
|
168 |
#define islessgreater(x, y) (!isunordered((x), (y)) && \
|
williamr@2
|
169 |
((x) > (y) || (y) > (x)))
|
williamr@2
|
170 |
#define isunordered(x, y) (isnan(x) || isnan(y))
|
williamr@2
|
171 |
#endif /* __MATH_BUILTIN_RELOPS */
|
williamr@2
|
172 |
|
williamr@2
|
173 |
#define signbit(x) \
|
williamr@2
|
174 |
((sizeof (x) == sizeof (float)) ? __signbitf(x) \
|
williamr@2
|
175 |
: (sizeof (x) == sizeof (double)) ? __signbit(x) \
|
williamr@2
|
176 |
: __signbitl(x))
|
williamr@2
|
177 |
|
williamr@2
|
178 |
typedef __double_t double_t;
|
williamr@2
|
179 |
typedef __float_t float_t;
|
williamr@2
|
180 |
#endif /* __ISO_C_VISIBLE >= 1999 */
|
williamr@2
|
181 |
|
williamr@2
|
182 |
/*
|
williamr@2
|
183 |
* XOPEN/SVID
|
williamr@2
|
184 |
*/
|
williamr@2
|
185 |
#if __BSD_VISIBLE || __XSI_VISIBLE
|
williamr@2
|
186 |
#define M_E 2.7182818284590452354 /* e */
|
williamr@2
|
187 |
#define M_LOG2E 1.4426950408889634074 /* log 2e */
|
williamr@2
|
188 |
#define M_LOG10E 0.43429448190325182765 /* log 10e */
|
williamr@2
|
189 |
#define M_LN2 0.69314718055994530942 /* log e2 */
|
williamr@2
|
190 |
#define M_LN10 2.30258509299404568402 /* log e10 */
|
williamr@2
|
191 |
#define M_PI 3.14159265358979323846 /* pi */
|
williamr@2
|
192 |
#define M_PI_2 1.57079632679489661923 /* pi/2 */
|
williamr@2
|
193 |
#define M_PI_4 0.78539816339744830962 /* pi/4 */
|
williamr@2
|
194 |
#define M_1_PI 0.31830988618379067154 /* 1/pi */
|
williamr@2
|
195 |
#define M_2_PI 0.63661977236758134308 /* 2/pi */
|
williamr@2
|
196 |
#define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */
|
williamr@2
|
197 |
#define M_SQRT2 1.41421356237309504880 /* sqrt(2) */
|
williamr@2
|
198 |
#define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
|
williamr@2
|
199 |
|
williamr@2
|
200 |
#define MAXFLOAT ((float)3.40282346638528860e+38)
|
williamr@2
|
201 |
#ifdef __SYMBIAN32__
|
williamr@2
|
202 |
#ifndef __WINSCW__
|
williamr@2
|
203 |
extern int _signgam;
|
williamr@2
|
204 |
#endif //__WINSCW__
|
williamr@2
|
205 |
#else
|
williamr@2
|
206 |
extern int signgam;
|
williamr@2
|
207 |
#endif //__SYMBIAN32__
|
williamr@2
|
208 |
#endif /* __BSD_VISIBLE || __XSI_VISIBLE */
|
williamr@2
|
209 |
|
williamr@2
|
210 |
#if __BSD_VISIBLE
|
williamr@2
|
211 |
#if 0
|
williamr@2
|
212 |
/* Old value from 4.4BSD-Lite math.h; this is probably better. */
|
williamr@2
|
213 |
#define HUGE HUGE_VAL
|
williamr@2
|
214 |
#else
|
williamr@2
|
215 |
#define HUGE MAXFLOAT
|
williamr@2
|
216 |
#endif
|
williamr@2
|
217 |
#endif /* __BSD_VISIBLE */
|
williamr@2
|
218 |
|
williamr@2
|
219 |
/*
|
williamr@2
|
220 |
* Most of these functions depend on the rounding mode and have the side
|
williamr@2
|
221 |
* effect of raising floating-point exceptions, so they are not declared
|
williamr@2
|
222 |
* as __pure2. In C99, FENV_ACCESS affects the purity of these functions.
|
williamr@2
|
223 |
*/
|
williamr@2
|
224 |
__BEGIN_DECLS
|
williamr@2
|
225 |
/*
|
williamr@2
|
226 |
* ANSI/POSIX
|
williamr@2
|
227 |
*/
|
williamr@2
|
228 |
#ifdef __SYMBIAN32__
|
williamr@2
|
229 |
IMPORT_C double __infinite(double x);
|
williamr@2
|
230 |
IMPORT_C float __infinitef(float x);
|
williamr@2
|
231 |
|
williamr@2
|
232 |
IMPORT_C double nanval(void );
|
williamr@2
|
233 |
IMPORT_C float nanvalf(void );
|
williamr@2
|
234 |
#endif //__SYMBIAN32__
|
williamr@2
|
235 |
|
williamr@2
|
236 |
|
williamr@2
|
237 |
IMPORT_C int __fpclassifyd(double) __pure2;
|
williamr@2
|
238 |
IMPORT_C int __fpclassifyf(float) __pure2;
|
williamr@2
|
239 |
IMPORT_C int __fpclassifyl(long double) __pure2;
|
williamr@2
|
240 |
IMPORT_C int __isfinitef(float) __pure2;
|
williamr@2
|
241 |
IMPORT_C int __isfinite(double) __pure2;
|
williamr@2
|
242 |
IMPORT_C int __isfinitel(long double) __pure2;
|
williamr@2
|
243 |
IMPORT_C int __isinf(double) __pure2;
|
williamr@2
|
244 |
IMPORT_C int __isinff(float) __pure2;
|
williamr@2
|
245 |
IMPORT_C int __isinfl(long double) __pure2;
|
williamr@2
|
246 |
#ifdef __SYMBIAN32__
|
williamr@2
|
247 |
IMPORT_C int __isnan(double) __pure2;
|
williamr@2
|
248 |
IMPORT_C int __isnanf(float) __pure2;
|
williamr@2
|
249 |
#endif //__SYMBIAN32__
|
williamr@2
|
250 |
IMPORT_C int __isnanl(long double) __pure2;
|
williamr@2
|
251 |
IMPORT_C int __isnormalf(float) __pure2;
|
williamr@2
|
252 |
IMPORT_C int __isnormal(double) __pure2;
|
williamr@2
|
253 |
IMPORT_C int __isnormall(long double) __pure2;
|
williamr@2
|
254 |
IMPORT_C int __signbit(double) __pure2;
|
williamr@2
|
255 |
IMPORT_C int __signbitf(float) __pure2;
|
williamr@2
|
256 |
IMPORT_C int __signbitl(long double) __pure2;
|
williamr@2
|
257 |
|
williamr@2
|
258 |
IMPORT_C double acos(double);
|
williamr@2
|
259 |
IMPORT_C double asin(double);
|
williamr@2
|
260 |
IMPORT_C double atan(double);
|
williamr@2
|
261 |
IMPORT_C double atan2(double, double);
|
williamr@2
|
262 |
IMPORT_C double cos(double);
|
williamr@2
|
263 |
IMPORT_C double sin(double);
|
williamr@2
|
264 |
IMPORT_C double tan(double);
|
williamr@2
|
265 |
|
williamr@2
|
266 |
IMPORT_C double cosh(double);
|
williamr@2
|
267 |
IMPORT_C double sinh(double);
|
williamr@2
|
268 |
IMPORT_C double tanh(double);
|
williamr@2
|
269 |
|
williamr@2
|
270 |
IMPORT_C double exp(double);
|
williamr@2
|
271 |
IMPORT_C double frexp(double, int *); /* fundamentally !__pure2 */
|
williamr@2
|
272 |
IMPORT_C double ldexp(double, int);
|
williamr@2
|
273 |
IMPORT_C double log(double);
|
williamr@2
|
274 |
IMPORT_C double log10(double);
|
williamr@2
|
275 |
IMPORT_C double modf(double, double *); /* fundamentally !__pure2 */
|
williamr@2
|
276 |
|
williamr@2
|
277 |
IMPORT_C double pow(double, double);
|
williamr@2
|
278 |
IMPORT_C double sqrt(double);
|
williamr@2
|
279 |
|
williamr@2
|
280 |
IMPORT_C double ceil(double);
|
williamr@2
|
281 |
IMPORT_C double fabs(double) __pure2;
|
williamr@2
|
282 |
IMPORT_C double floor(double);
|
williamr@2
|
283 |
IMPORT_C double fmod(double, double);
|
williamr@2
|
284 |
|
williamr@2
|
285 |
/*
|
williamr@2
|
286 |
* These functions are not in C90.
|
williamr@2
|
287 |
*/
|
williamr@2
|
288 |
#if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE
|
williamr@2
|
289 |
IMPORT_C double acosh(double);
|
williamr@2
|
290 |
IMPORT_C double asinh(double);
|
williamr@2
|
291 |
IMPORT_C double atanh(double);
|
williamr@2
|
292 |
IMPORT_C double cbrt(double);
|
williamr@2
|
293 |
IMPORT_C double erf(double);
|
williamr@2
|
294 |
IMPORT_C double erfc(double);
|
williamr@2
|
295 |
IMPORT_C double exp2(double);
|
williamr@2
|
296 |
IMPORT_C double expm1(double);
|
williamr@2
|
297 |
IMPORT_C double fma(double, double, double);
|
williamr@2
|
298 |
IMPORT_C double hypot(double, double);
|
williamr@2
|
299 |
|
williamr@2
|
300 |
|
williamr@2
|
301 |
IMPORT_C int ilogb(double) __pure2;
|
williamr@2
|
302 |
/*
|
williamr@2
|
303 |
int (isinf)(double) __pure2;
|
williamr@2
|
304 |
int (isnan)(double) __pure2;
|
williamr@2
|
305 |
*/
|
williamr@2
|
306 |
IMPORT_C double lgamma(double);
|
williamr@2
|
307 |
IMPORT_C long long llrint(double);
|
williamr@2
|
308 |
IMPORT_C long long llround(double);
|
williamr@2
|
309 |
IMPORT_C double log1p(double);
|
williamr@2
|
310 |
IMPORT_C double logb(double);
|
williamr@2
|
311 |
IMPORT_C long lrint(double);
|
williamr@2
|
312 |
IMPORT_C long lround(double);
|
williamr@2
|
313 |
IMPORT_C double nextafter(double, double);
|
williamr@2
|
314 |
IMPORT_C double remainder(double, double);
|
williamr@2
|
315 |
IMPORT_C double remquo(double, double, int *);
|
williamr@2
|
316 |
IMPORT_C double rint(double);
|
williamr@2
|
317 |
#endif /* __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE */
|
williamr@2
|
318 |
|
williamr@2
|
319 |
#if __BSD_VISIBLE || __XSI_VISIBLE
|
williamr@2
|
320 |
IMPORT_C double j0(double);
|
williamr@2
|
321 |
IMPORT_C double j1(double);
|
williamr@2
|
322 |
IMPORT_C double jn(int, double);
|
williamr@2
|
323 |
IMPORT_C double scalb(double, double);
|
williamr@2
|
324 |
IMPORT_C double y0(double);
|
williamr@2
|
325 |
IMPORT_C double y1(double);
|
williamr@2
|
326 |
IMPORT_C double yn(int, double);
|
williamr@2
|
327 |
|
williamr@2
|
328 |
#if __XSI_VISIBLE <= 500 || __BSD_VISIBLE
|
williamr@2
|
329 |
IMPORT_C double gamma(double);
|
williamr@2
|
330 |
#endif
|
williamr@2
|
331 |
#endif /* __BSD_VISIBLE || __XSI_VISIBLE */
|
williamr@2
|
332 |
|
williamr@2
|
333 |
#if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999
|
williamr@2
|
334 |
IMPORT_C double copysign(double, double) __pure2;
|
williamr@2
|
335 |
IMPORT_C double fdim(double, double);
|
williamr@2
|
336 |
IMPORT_C double fmax(double, double) __pure2;
|
williamr@2
|
337 |
IMPORT_C double fmin(double, double) __pure2;
|
williamr@2
|
338 |
IMPORT_C double nearbyint(double);
|
williamr@2
|
339 |
IMPORT_C double round(double);
|
williamr@2
|
340 |
IMPORT_C double scalbln(double, long);
|
williamr@2
|
341 |
IMPORT_C double scalbn(double, int);
|
williamr@2
|
342 |
IMPORT_C double trunc(double);
|
williamr@2
|
343 |
#endif
|
williamr@2
|
344 |
|
williamr@2
|
345 |
/*
|
williamr@2
|
346 |
* BSD math library entry points
|
williamr@2
|
347 |
*/
|
williamr@2
|
348 |
#if __BSD_VISIBLE
|
williamr@2
|
349 |
IMPORT_C double drem(double, double);
|
williamr@2
|
350 |
IMPORT_C int finite(double) __pure2;
|
williamr@2
|
351 |
IMPORT_C int isnanf(float) __pure2;
|
williamr@2
|
352 |
|
williamr@2
|
353 |
/*
|
williamr@2
|
354 |
* Reentrant version of gamma & lgamma; passes signgam back by reference
|
williamr@2
|
355 |
* as the second argument; user must allocate space for signgam.
|
williamr@2
|
356 |
*/
|
williamr@2
|
357 |
IMPORT_C double lgamma_r(double, int *);
|
williamr@2
|
358 |
|
williamr@2
|
359 |
/*
|
williamr@2
|
360 |
* IEEE Test Vector
|
williamr@2
|
361 |
*/
|
williamr@2
|
362 |
IMPORT_C double significand(double);
|
williamr@2
|
363 |
#endif /* __BSD_VISIBLE */
|
williamr@2
|
364 |
|
williamr@2
|
365 |
/* float versions of ANSI/POSIX functions */
|
williamr@2
|
366 |
#if __ISO_C_VISIBLE >= 1999
|
williamr@2
|
367 |
IMPORT_C float acosf(float);
|
williamr@2
|
368 |
|
williamr@2
|
369 |
IMPORT_C float acosf(float);
|
williamr@2
|
370 |
IMPORT_C float asinf(float);
|
williamr@2
|
371 |
IMPORT_C float atanf(float);
|
williamr@2
|
372 |
IMPORT_C float atan2f(float, float);
|
williamr@2
|
373 |
IMPORT_C float cosf(float);
|
williamr@2
|
374 |
IMPORT_C float sinf(float);
|
williamr@2
|
375 |
IMPORT_C float tanf(float);
|
williamr@2
|
376 |
|
williamr@2
|
377 |
IMPORT_C float coshf(float);
|
williamr@2
|
378 |
IMPORT_C float sinhf(float);
|
williamr@2
|
379 |
IMPORT_C float tanhf(float);
|
williamr@2
|
380 |
IMPORT_C float exp2f(float);
|
williamr@2
|
381 |
IMPORT_C float expf(float);
|
williamr@2
|
382 |
IMPORT_C float expm1f(float);
|
williamr@2
|
383 |
IMPORT_C float frexpf(float, int *); /* fundamentally !__pure2 */
|
williamr@2
|
384 |
IMPORT_C int ilogbf(float) __pure2;
|
williamr@2
|
385 |
#ifndef __SYMBIAN32__
|
williamr@2
|
386 |
float ldexpf(float, int);
|
williamr@2
|
387 |
#endif //__SYMBIAN32__
|
williamr@2
|
388 |
IMPORT_C float log10f(float);
|
williamr@2
|
389 |
IMPORT_C float log1pf(float);
|
williamr@2
|
390 |
IMPORT_C float logf(float);
|
williamr@2
|
391 |
IMPORT_C float modff(float, float *); /* fundamentally !__pure2 */
|
williamr@2
|
392 |
|
williamr@2
|
393 |
IMPORT_C float powf(float, float);
|
williamr@2
|
394 |
IMPORT_C float sqrtf(float);
|
williamr@2
|
395 |
|
williamr@2
|
396 |
IMPORT_C float ceilf(float);
|
williamr@2
|
397 |
IMPORT_C float fabsf(float) __pure2;
|
williamr@2
|
398 |
IMPORT_C float floorf(float);
|
williamr@2
|
399 |
IMPORT_C float fmodf(float, float);
|
williamr@2
|
400 |
IMPORT_C float roundf(float);
|
williamr@2
|
401 |
|
williamr@2
|
402 |
IMPORT_C float erff(float);
|
williamr@2
|
403 |
IMPORT_C float erfcf(float);
|
williamr@2
|
404 |
IMPORT_C float hypotf(float, float);
|
williamr@2
|
405 |
IMPORT_C float lgammaf(float);
|
williamr@2
|
406 |
|
williamr@2
|
407 |
IMPORT_C float acoshf(float);
|
williamr@2
|
408 |
IMPORT_C float asinhf(float);
|
williamr@2
|
409 |
IMPORT_C float atanhf(float);
|
williamr@2
|
410 |
IMPORT_C float cbrtf(float);
|
williamr@2
|
411 |
IMPORT_C float logbf(float);
|
williamr@2
|
412 |
IMPORT_C float copysignf(float, float) __pure2;
|
williamr@2
|
413 |
IMPORT_C long long llrintf(float);
|
williamr@2
|
414 |
IMPORT_C long long llroundf(float);
|
williamr@2
|
415 |
IMPORT_C long lrintf(float);
|
williamr@2
|
416 |
IMPORT_C long lroundf(float);
|
williamr@2
|
417 |
IMPORT_C float nearbyintf(float);
|
williamr@2
|
418 |
IMPORT_C float nextafterf(float, float);
|
williamr@2
|
419 |
IMPORT_C float remainderf(float, float);
|
williamr@2
|
420 |
IMPORT_C float remquof(float, float, int *);
|
williamr@2
|
421 |
IMPORT_C float rintf(float);
|
williamr@2
|
422 |
IMPORT_C float scalblnf(float, long);
|
williamr@2
|
423 |
IMPORT_C float scalbnf(float, int);
|
williamr@2
|
424 |
IMPORT_C float truncf(float);
|
williamr@2
|
425 |
|
williamr@2
|
426 |
IMPORT_C float fdimf(float, float);
|
williamr@2
|
427 |
IMPORT_C float fmaf(float, float, float);
|
williamr@2
|
428 |
IMPORT_C float fmaxf(float, float) __pure2;
|
williamr@2
|
429 |
IMPORT_C float fminf(float, float) __pure2;
|
williamr@2
|
430 |
#endif
|
williamr@2
|
431 |
|
williamr@2
|
432 |
/*
|
williamr@2
|
433 |
* float versions of BSD math library entry points
|
williamr@2
|
434 |
*/
|
williamr@2
|
435 |
#if __BSD_VISIBLE
|
williamr@2
|
436 |
|
williamr@2
|
437 |
#ifdef __SYMBIAN_COMPILE_UNUSED__
|
williamr@2
|
438 |
float dremf(float, float);
|
williamr@2
|
439 |
#endif
|
williamr@2
|
440 |
|
williamr@2
|
441 |
IMPORT_C int finitef(float) __pure2;
|
williamr@2
|
442 |
IMPORT_C float gammaf(float);
|
williamr@2
|
443 |
IMPORT_C float j0f(float);
|
williamr@2
|
444 |
IMPORT_C float j1f(float);
|
williamr@2
|
445 |
IMPORT_C float jnf(int, float);
|
williamr@2
|
446 |
IMPORT_C float scalbf(float, float);
|
williamr@2
|
447 |
IMPORT_C float y0f(float);
|
williamr@2
|
448 |
IMPORT_C float y1f(float);
|
williamr@2
|
449 |
IMPORT_C float ynf(int, float);
|
williamr@2
|
450 |
|
williamr@2
|
451 |
/*
|
williamr@2
|
452 |
* Float versions of reentrant version of gamma & lgamma; passes
|
williamr@2
|
453 |
* signgam back by reference as the second argument; user must
|
williamr@2
|
454 |
* allocate space for signgam.
|
williamr@2
|
455 |
*/
|
williamr@2
|
456 |
IMPORT_C float lgammaf_r(float, int *);
|
williamr@2
|
457 |
|
williamr@2
|
458 |
/*
|
williamr@2
|
459 |
* float version of IEEE Test Vector
|
williamr@2
|
460 |
*/
|
williamr@2
|
461 |
IMPORT_C float significandf(float);
|
williamr@2
|
462 |
#endif /* __BSD_VISIBLE */
|
williamr@2
|
463 |
|
williamr@2
|
464 |
/*
|
williamr@2
|
465 |
* long double versions of ISO/POSIX math functions
|
williamr@2
|
466 |
*/
|
williamr@2
|
467 |
#if __ISO_C_VISIBLE >= 1999
|
williamr@2
|
468 |
#if 0
|
williamr@2
|
469 |
long double acoshl(long double);
|
williamr@2
|
470 |
long double acosl(long double);
|
williamr@2
|
471 |
long double asinhl(long double);
|
williamr@2
|
472 |
long double asinl(long double);
|
williamr@2
|
473 |
long double atan2l(long double, long double);
|
williamr@2
|
474 |
long double atanhl(long double);
|
williamr@2
|
475 |
long double atanl(long double);
|
williamr@2
|
476 |
long double cbrtl(long double);
|
williamr@2
|
477 |
#endif
|
williamr@2
|
478 |
#ifndef __SYMBIAN32__
|
williamr@2
|
479 |
long double ceill(long double);
|
williamr@2
|
480 |
#endif //__SYMBIAN32__
|
williamr@2
|
481 |
IMPORT_C long double copysignl(long double, long double) __pure2;
|
williamr@2
|
482 |
#if 0
|
williamr@2
|
483 |
long double coshl(long double);
|
williamr@2
|
484 |
long double cosl(long double);
|
williamr@2
|
485 |
long double erfcl(long double);
|
williamr@2
|
486 |
long double erfl(long double);
|
williamr@2
|
487 |
long double exp2l(long double);
|
williamr@2
|
488 |
long double expl(long double);
|
williamr@2
|
489 |
long double expm1l(long double);
|
williamr@2
|
490 |
#endif
|
williamr@2
|
491 |
IMPORT_C long double fabsl(long double) __pure2;
|
williamr@2
|
492 |
IMPORT_C long double fdiml(long double, long double);
|
williamr@2
|
493 |
#ifndef __SYMBIAN32__
|
williamr@2
|
494 |
long double floorl(long double);
|
williamr@2
|
495 |
long double fmal(long double, long double, long double);
|
williamr@2
|
496 |
#endif //__SYMBIAN32__
|
williamr@2
|
497 |
IMPORT_C long double fmaxl(long double, long double) __pure2;
|
williamr@2
|
498 |
#ifndef __SYMBIAN32__
|
williamr@2
|
499 |
long double fminl(long double, long double) __pure2;
|
williamr@2
|
500 |
#endif //__SYMBIAN32__
|
williamr@2
|
501 |
#if 0
|
williamr@2
|
502 |
long double fmodl(long double, long double);
|
williamr@2
|
503 |
#endif
|
williamr@2
|
504 |
#ifndef __SYMBIAN32__
|
williamr@2
|
505 |
long double frexpl(long double value, int *); /* fundamentally !__pure2 */
|
williamr@2
|
506 |
#endif //__SYMBIAN32__
|
williamr@2
|
507 |
#if 0
|
williamr@2
|
508 |
long double hypotl(long double, long double);
|
williamr@2
|
509 |
#endif
|
williamr@2
|
510 |
IMPORT_C int ilogbl(long double) __pure2;
|
williamr@2
|
511 |
#ifndef __SYMBIAN32__
|
williamr@2
|
512 |
long double ldexpl(long double, int);
|
williamr@2
|
513 |
#endif //__SYMBIAN32__
|
williamr@2
|
514 |
#if 0
|
williamr@2
|
515 |
long double lgammal(long double);
|
williamr@2
|
516 |
long long llrintl(long double);
|
williamr@2
|
517 |
#endif
|
williamr@2
|
518 |
#ifndef __SYMBIAN32__
|
williamr@2
|
519 |
long long llroundl(long double);
|
williamr@2
|
520 |
#endif //__SYMBIAN32__
|
williamr@2
|
521 |
#if 0
|
williamr@2
|
522 |
long double log10l(long double);
|
williamr@2
|
523 |
long double log1pl(long double);
|
williamr@2
|
524 |
long double log2l(long double);
|
williamr@2
|
525 |
long double logbl(long double);
|
williamr@2
|
526 |
long double logl(long double);
|
williamr@2
|
527 |
long lrintl(long double);
|
williamr@2
|
528 |
#endif
|
williamr@2
|
529 |
#ifndef __SYMBIAN32__
|
williamr@2
|
530 |
long lroundl(long double);
|
williamr@2
|
531 |
#endif //__SYMBIAN32__
|
williamr@2
|
532 |
#if 0
|
williamr@2
|
533 |
long double modfl(long double, long double *); /* fundamentally !__pure2 */
|
williamr@2
|
534 |
long double nanl(const char *) __pure2;
|
williamr@2
|
535 |
long double nearbyintl(long double);
|
williamr@2
|
536 |
#endif
|
williamr@2
|
537 |
#ifndef __SYMBIAN32__
|
williamr@2
|
538 |
long double nextafterl(long double, long double);
|
williamr@2
|
539 |
double nexttoward(double, long double);
|
williamr@2
|
540 |
#endif //__SYMBIAN32__
|
williamr@2
|
541 |
IMPORT_C float nexttowardf(float, long double);
|
williamr@2
|
542 |
#ifndef __SYMBIAN32__
|
williamr@2
|
543 |
long double nexttowardl(long double, long double);
|
williamr@2
|
544 |
#endif //__SYMBIAN32__
|
williamr@2
|
545 |
#if 0
|
williamr@2
|
546 |
long double powl(long double, long double);
|
williamr@2
|
547 |
long double remainderl(long double, long double);
|
williamr@2
|
548 |
long double remquol(long double, long double, int *);
|
williamr@2
|
549 |
long double rintl(long double);
|
williamr@2
|
550 |
#endif
|
williamr@2
|
551 |
#ifndef __SYMBIAN32__
|
williamr@2
|
552 |
long double roundl(long double);
|
williamr@2
|
553 |
#endif //__SYMBIAN32__
|
williamr@2
|
554 |
IMPORT_C long double scalblnl(long double, long);
|
williamr@2
|
555 |
#ifndef __SYMBIAN32__
|
williamr@2
|
556 |
long double scalbnl(long double, int);
|
williamr@2
|
557 |
#endif //__SYMBIAN32__
|
williamr@2
|
558 |
#if 0
|
williamr@2
|
559 |
long double sinhl(long double);
|
williamr@2
|
560 |
long double sinl(long double);
|
williamr@2
|
561 |
long double sqrtl(long double);
|
williamr@2
|
562 |
long double tanhl(long double);
|
williamr@2
|
563 |
long double tanl(long double);
|
williamr@2
|
564 |
#endif
|
williamr@2
|
565 |
IMPORT_C long double truncl(long double);
|
williamr@2
|
566 |
|
williamr@2
|
567 |
#endif /* __ISO_C_VISIBLE >= 1999 */
|
williamr@2
|
568 |
__END_DECLS
|
williamr@2
|
569 |
|
williamr@2
|
570 |
#endif /* !_MATH_H_ */
|