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