VirtualBox

source: vbox/trunk/include/iprt/nocrt/math.h@ 4168

Last change on this file since 4168 was 4168, checked in by vboxsync, 17 years ago

eol-style native

  • Property svn:eol-style set to native
File size: 26.7 KB
Line 
1/** @file
2 * innotek Portable Runtime / No-CRT - math.h.
3 */
4
5/*
6 * Copyright (C) 2006-2007 innotek GmbH
7 *
8 * This file is part of VirtualBox Open Source Edition (OSE), as
9 * available from http://www.virtualbox.org. This file is free software;
10 * you can redistribute it and/or modify it under the terms of the GNU
11 * General Public License as published by the Free Software Foundation,
12 * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
13 * distribution. VirtualBox OSE is distributed in the hope that it will
14 * be useful, but WITHOUT ANY WARRANTY of any kind.
15 * --------------------------------------------------------------------
16 *
17 * This code is based on:
18 *
19 * from: @(#)fdlibm.h 5.1 93/09/24
20 * $FreeBSD: src/lib/msun/src/math.h,v 1.61 2005/04/16 21:12:47 das Exp $
21 * FreeBSD HEAD 2005-06-xx
22 *
23 * ====================================================
24 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
25 *
26 * Developed at SunPro, a Sun Microsystems, Inc. business.
27 * Permission to use, copy, modify, and distribute this
28 * software is freely granted, provided that this notice
29 * is preserved.
30 * ====================================================
31 */
32
33#ifndef ___iprt_nocrt_math_h
34#define ___iprt_nocrt_math_h
35
36#if !defined(__GNUC__) /* && !defined(__YOUR_COMPILER__) */
37# error "IPRT: Adjust this header for your compiler"
38#endif
39
40#include <iprt/types.h>
41/*#include <machine/_limits.h>*/
42
43/* from sys/cdefs.h */
44#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
45#define __GNUC_PREREQ__(ma, mi) \
46 (__GNUC__ > (ma) || __GNUC__ == (ma) && __GNUC_MINOR__ >= (mi))
47#else
48#define __GNUC_PREREQ__(ma, mi) 0
49#endif
50#define __pure2
51
52
53/*
54 * ANSI/POSIX
55 */
56extern const union __infinity_un {
57 unsigned char __uc[8];
58 double __ud;
59} RT_NOCRT(__infinity);
60
61extern const union __nan_un {
62 unsigned char __uc[sizeof(float)];
63 float __uf;
64} RT_NOCRT(__nan);
65
66#if __GNUC_PREREQ__(3, 3) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 800)
67#define __MATH_BUILTIN_CONSTANTS
68#endif
69
70#if __GNUC_PREREQ__(3, 0) && !defined(__INTEL_COMPILER)
71#define __MATH_BUILTIN_RELOPS
72#endif
73
74#ifdef __MATH_BUILTIN_CONSTANTS
75#define HUGE_VAL __builtin_huge_val()
76#else
77#define HUGE_VAL (RT_NOCRT(__infinity).__ud)
78#endif
79
80#if 1/* __ISO_C_VISIBLE >= 1999*/
81#define FP_ILOGB0 (-__INT_MAX)
82#define FP_ILOGBNAN __INT_MAX
83
84#ifdef __MATH_BUILTIN_CONSTANTS
85#define HUGE_VALF __builtin_huge_valf()
86#define HUGE_VALL __builtin_huge_vall()
87#define INFINITY __builtin_inf()
88#define NAN __builtin_nan("")
89#else
90#define HUGE_VALF (float)HUGE_VAL
91#define HUGE_VALL (long double)HUGE_VAL
92#define INFINITY HUGE_VALF
93#define NAN (__nan.__uf)
94#endif /* __MATH_BUILTIN_CONSTANTS */
95
96#define MATH_ERRNO 1
97#define MATH_ERREXCEPT 2
98#define math_errhandling MATH_ERREXCEPT
99
100/* XXX We need a <machine/math.h>. */
101#if defined(__ia64__) || defined(__sparc64__)
102#define FP_FAST_FMA
103#endif
104#ifdef __ia64__
105#define FP_FAST_FMAL
106#endif
107#define FP_FAST_FMAF
108
109/* Symbolic constants to classify floating point numbers. */
110#define FP_INFINITE 0x01
111#define FP_NAN 0x02
112#define FP_NORMAL 0x04
113#define FP_SUBNORMAL 0x08
114#define FP_ZERO 0x10
115#define fpclassify(x) \
116 ((sizeof (x) == sizeof (float)) ? RT_NOCRT(__fpclassifyf)(x) \
117 : (sizeof (x) == sizeof (double)) ? RT_NOCRT(__fpclassifyd)(x) \
118 : RT_NOCRT(__fpclassifyl)(x))
119
120#define isfinite(x) \
121 ((sizeof (x) == sizeof (float)) ? RT_NOCRT(__isfinitef)(x) \
122 : (sizeof (x) == sizeof (double)) ? RT_NOCRT(__isfinite)(x) \
123 : RT_NOCRT(__isfinitel)(x))
124#define isinf(x) \
125 ((sizeof (x) == sizeof (float)) ? RT_NOCRT(__isinff)(x) \
126 : (sizeof (x) == sizeof (double)) ? isinf(x) \
127 : RT_NOCRT(__isinfl)(x))
128#define isnan(x) \
129 ((sizeof (x) == sizeof (float)) ? isnanf(x) \
130 : (sizeof (x) == sizeof (double)) ? isnan(x) \
131 : RT_NOCRT(__isnanl)(x))
132#define isnormal(x) \
133 ((sizeof (x) == sizeof (float)) ? RT_NOCRT(__isnormalf)(x) \
134 : (sizeof (x) == sizeof (double)) ? RT_NOCRT(__isnormal)(x) \
135 : RT_NOCRT(__isnormall)(x))
136
137#ifdef __MATH_BUILTIN_RELOPS
138#define isgreater(x, y) __builtin_isgreater((x), (y))
139#define isgreaterequal(x, y) __builtin_isgreaterequal((x), (y))
140#define isless(x, y) __builtin_isless((x), (y))
141#define islessequal(x, y) __builtin_islessequal((x), (y))
142#define islessgreater(x, y) __builtin_islessgreater((x), (y))
143#define isunordered(x, y) __builtin_isunordered((x), (y))
144#else
145#define isgreater(x, y) (!isunordered((x), (y)) && (x) > (y))
146#define isgreaterequal(x, y) (!isunordered((x), (y)) && (x) >= (y))
147#define isless(x, y) (!isunordered((x), (y)) && (x) < (y))
148#define islessequal(x, y) (!isunordered((x), (y)) && (x) <= (y))
149#define islessgreater(x, y) (!isunordered((x), (y)) && \
150 ((x) > (y) || (y) > (x)))
151#define isunordered(x, y) (isnan(x) || isnan(y))
152#endif /* __MATH_BUILTIN_RELOPS */
153
154#define signbit(x) \
155 ((sizeof (x) == sizeof (float)) ? RT_NOCRT(__signbitf)(x) \
156 : (sizeof (x) == sizeof (double)) ? RT_NOCRT(__signbit)(x) \
157 : RT_NOCRT(__signbitl)(x))
158
159typedef double double_t;
160typedef float float_t;
161#endif /* __ISO_C_VISIBLE >= 1999 */
162
163/*
164 * XOPEN/SVID
165 */
166#if 1/* __BSD_VISIBLE || __XSI_VISIBLE*/
167#define M_E 2.7182818284590452354 /* e */
168#define M_LOG2E 1.4426950408889634074 /* log 2e */
169#define M_LOG10E 0.43429448190325182765 /* log 10e */
170#define M_LN2 0.69314718055994530942 /* log e2 */
171#define M_LN10 2.30258509299404568402 /* log e10 */
172#define M_PI 3.14159265358979323846 /* pi */
173#define M_PI_2 1.57079632679489661923 /* pi/2 */
174#define M_PI_4 0.78539816339744830962 /* pi/4 */
175#define M_1_PI 0.31830988618379067154 /* 1/pi */
176#define M_2_PI 0.63661977236758134308 /* 2/pi */
177#define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */
178#define M_SQRT2 1.41421356237309504880 /* sqrt(2) */
179#define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
180
181#define MAXFLOAT ((float)3.40282346638528860e+38)
182extern int RT_NOCRT(signgam);
183#endif /* __BSD_VISIBLE || __XSI_VISIBLE */
184
185#if 1/* __BSD_VISIBLE*/
186#if 0
187/* Old value from 4.4BSD-Lite math.h; this is probably better. */
188#define HUGE HUGE_VAL
189#else
190#define HUGE MAXFLOAT
191#endif
192#endif /* __BSD_VISIBLE */
193
194/*
195 * Most of these functions depend on the rounding mode and have the side
196 * effect of raising floating-point exceptions, so they are not declared
197 * as __pure2. In C99, FENV_ACCESS affects the purity of these functions.
198 */
199__BEGIN_DECLS
200/*
201 * ANSI/POSIX
202 */
203int RT_NOCRT(__fpclassifyd)(double) __pure2;
204int RT_NOCRT(__fpclassifyf)(float) __pure2;
205int RT_NOCRT(__fpclassifyl)(long double) __pure2;
206int RT_NOCRT(__isfinitef)(float) __pure2;
207int RT_NOCRT(__isfinite)(double) __pure2;
208int RT_NOCRT(__isfinitel)(long double) __pure2;
209int RT_NOCRT(__isinff)(float) __pure2;
210int RT_NOCRT(__isinfl)(long double) __pure2;
211int RT_NOCRT(__isnanl)(long double) __pure2;
212int RT_NOCRT(__isnormalf)(float) __pure2;
213int RT_NOCRT(__isnormal)(double) __pure2;
214int RT_NOCRT(__isnormall)(long double) __pure2;
215int RT_NOCRT(__signbit)(double) __pure2;
216int RT_NOCRT(__signbitf)(float) __pure2;
217int RT_NOCRT(__signbitl)(long double) __pure2;
218
219double RT_NOCRT(acos)(double);
220double RT_NOCRT(asin)(double);
221double RT_NOCRT(atan)(double);
222double RT_NOCRT(atan2)(double, double);
223double RT_NOCRT(cos)(double);
224double RT_NOCRT(sin)(double);
225double RT_NOCRT(tan)(double);
226
227double RT_NOCRT(cosh)(double);
228double RT_NOCRT(sinh)(double);
229double RT_NOCRT(tanh)(double);
230
231double RT_NOCRT(exp)(double);
232double RT_NOCRT(frexp)(double, int *); /* fundamentally !__pure2 */
233double RT_NOCRT(ldexp)(double, int);
234double RT_NOCRT(log)(double);
235double RT_NOCRT(log10)(double);
236double RT_NOCRT(modf)(double, double *); /* fundamentally !__pure2 */
237
238double RT_NOCRT(pow)(double, double);
239double RT_NOCRT(sqrt)(double);
240
241double RT_NOCRT(ceil)(double);
242double RT_NOCRT(fabs)(double) __pure2;
243double RT_NOCRT(floor)(double);
244double RT_NOCRT(fmod)(double, double);
245
246/*
247 * These functions are not in C90.
248 */
249#if 1 /*__BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE*/
250double RT_NOCRT(acosh)(double);
251double RT_NOCRT(asinh)(double);
252double RT_NOCRT(atanh)(double);
253double RT_NOCRT(cbrt)(double);
254double RT_NOCRT(erf)(double);
255double RT_NOCRT(erfc)(double);
256double RT_NOCRT(exp2)(double);
257double RT_NOCRT(expm1)(double);
258double RT_NOCRT(fma)(double, double, double);
259double RT_NOCRT(hypot)(double, double);
260int RT_NOCRT(ilogb)(double) __pure2;
261/*int isinf(double) __pure2;*/
262/*int isnan(double) __pure2;*/
263double RT_NOCRT(lgamma)(double);
264long long RT_NOCRT(llrint)(double);
265long long RT_NOCRT(llround)(double);
266double RT_NOCRT(log1p)(double);
267double RT_NOCRT(logb)(double);
268long RT_NOCRT(lrint)(double);
269long RT_NOCRT(lround)(double);
270double RT_NOCRT(nextafter)(double, double);
271double RT_NOCRT(remainder)(double, double);
272double RT_NOCRT(remquo)(double, double, int *);
273double RT_NOCRT(rint)(double);
274#endif /* __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE */
275
276#if 1/* __BSD_VISIBLE || __XSI_VISIBLE*/
277double RT_NOCRT(j0)(double);
278double RT_NOCRT(j1)(double);
279double RT_NOCRT(jn)(int, double);
280double RT_NOCRT(scalb)(double, double);
281double RT_NOCRT(y0)(double);
282double RT_NOCRT(y1)(double);
283double RT_NOCRT(yn)(int, double);
284
285#if 1/* __XSI_VISIBLE <= 500 || __BSD_VISIBLE*/
286double RT_NOCRT(gamma)(double);
287#endif
288#endif /* __BSD_VISIBLE || __XSI_VISIBLE */
289
290#if 1/* __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999*/
291double RT_NOCRT(copysign)(double, double) __pure2;
292double RT_NOCRT(fdim)(double, double);
293double RT_NOCRT(fmax)(double, double) __pure2;
294double RT_NOCRT(fmin)(double, double) __pure2;
295double RT_NOCRT(nearbyint)(double);
296double RT_NOCRT(round)(double);
297double RT_NOCRT(scalbln)(double, long);
298double RT_NOCRT(scalbn)(double, int);
299double RT_NOCRT(tgamma)(double);
300double RT_NOCRT(trunc)(double);
301#endif
302
303/*
304 * BSD math library entry points
305 */
306#if 1/* __BSD_VISIBLE*/
307double RT_NOCRT(drem)(double, double);
308int RT_NOCRT(finite)(double) __pure2;
309int RT_NOCRT(isnanf)(float) __pure2;
310
311/*
312 * Reentrant version of gamma & lgamma; passes signgam back by reference
313 * as the second argument; user must allocate space for signgam.
314 */
315double RT_NOCRT(gamma_r)(double, int *);
316double RT_NOCRT(lgamma_r)(double, int *);
317
318/*
319 * IEEE Test Vector
320 */
321double RT_NOCRT(significand)(double);
322#endif /* __BSD_VISIBLE */
323
324/* float versions of ANSI/POSIX functions */
325#if 1/* __ISO_C_VISIBLE >= 1999*/
326float RT_NOCRT(acosf)(float);
327float RT_NOCRT(asinf)(float);
328float RT_NOCRT(atanf)(float);
329float RT_NOCRT(atan2f)(float, float);
330float RT_NOCRT(cosf)(float);
331float RT_NOCRT(sinf)(float);
332float RT_NOCRT(tanf)(float);
333
334float RT_NOCRT(coshf)(float);
335float RT_NOCRT(sinhf)(float);
336float RT_NOCRT(tanhf)(float);
337
338float RT_NOCRT(exp2f)(float);
339float RT_NOCRT(expf)(float);
340float RT_NOCRT(expm1f)(float);
341float RT_NOCRT(frexpf)(float, int *); /* fundamentally !__pure2 */
342int RT_NOCRT(ilogbf)(float) __pure2;
343float RT_NOCRT(ldexpf)(float, int);
344float RT_NOCRT(log10f)(float);
345float RT_NOCRT(log1pf)(float);
346float RT_NOCRT(logf)(float);
347float RT_NOCRT(modff)(float, float *); /* fundamentally !__pure2 */
348
349float RT_NOCRT(powf)(float, float);
350float RT_NOCRT(sqrtf)(float);
351
352float RT_NOCRT(ceilf)(float);
353float RT_NOCRT(fabsf)(float) __pure2;
354float RT_NOCRT(floorf)(float);
355float RT_NOCRT(fmodf)(float, float);
356float RT_NOCRT(roundf)(float);
357
358float RT_NOCRT(erff)(float);
359float RT_NOCRT(erfcf)(float);
360float RT_NOCRT(hypotf)(float, float);
361float RT_NOCRT(lgammaf)(float);
362
363float RT_NOCRT(acoshf)(float);
364float RT_NOCRT(asinhf)(float);
365float RT_NOCRT(atanhf)(float);
366float RT_NOCRT(cbrtf)(float);
367float RT_NOCRT(logbf)(float);
368float RT_NOCRT(copysignf)(float, float) __pure2;
369long long RT_NOCRT(llrintf)(float);
370long long RT_NOCRT(llroundf)(float);
371long RT_NOCRT(lrintf)(float);
372long RT_NOCRT(lroundf)(float);
373float RT_NOCRT(nearbyintf)(float);
374float RT_NOCRT(nextafterf)(float, float);
375float RT_NOCRT(remainderf)(float, float);
376float RT_NOCRT(remquof)(float, float, int *);
377float RT_NOCRT(rintf)(float);
378float RT_NOCRT(scalblnf)(float, long);
379float RT_NOCRT(scalbnf)(float, int);
380float RT_NOCRT(truncf)(float);
381
382float RT_NOCRT(fdimf)(float, float);
383float RT_NOCRT(fmaf)(float, float, float);
384float RT_NOCRT(fmaxf)(float, float) __pure2;
385float RT_NOCRT(fminf)(float, float) __pure2;
386#endif
387
388/*
389 * float versions of BSD math library entry points
390 */
391#if 1/* __BSD_VISIBLE*/
392float RT_NOCRT(dremf)(float, float);
393int RT_NOCRT(finitef)(float) __pure2;
394float RT_NOCRT(gammaf)(float);
395float RT_NOCRT(j0f)(float);
396float RT_NOCRT(j1f)(float);
397float RT_NOCRT(jnf)(int, float);
398float RT_NOCRT(scalbf)(float, float);
399float RT_NOCRT(y0f)(float);
400float RT_NOCRT(y1f)(float);
401float RT_NOCRT(ynf)(int, float);
402
403/*
404 * Float versions of reentrant version of gamma & lgamma; passes
405 * signgam back by reference as the second argument; user must
406 * allocate space for signgam.
407 */
408float RT_NOCRT(gammaf_r)(float, int *);
409float RT_NOCRT(lgammaf_r)(float, int *);
410
411/*
412 * float version of IEEE Test Vector
413 */
414float RT_NOCRT(significandf)(float);
415#endif /* __BSD_VISIBLE */
416
417/*
418 * long double versions of ISO/POSIX math functions
419 */
420#if 1/* __ISO_C_VISIBLE >= 1999*/
421#if 1 /* bird: we've got these */
422long double RT_NOCRT(acoshl)(long double);
423long double RT_NOCRT(acosl)(long double);
424long double RT_NOCRT(asinhl)(long double);
425long double RT_NOCRT(asinl)(long double);
426long double RT_NOCRT(atan2l)(long double, long double);
427long double RT_NOCRT(atanhl)(long double);
428long double RT_NOCRT(atanl)(long double);
429long double RT_NOCRT(cbrtl)(long double);
430#endif
431long double RT_NOCRT(ceill)(long double);
432long double RT_NOCRT(copysignl)(long double, long double) __pure2;
433#if 1 /* bird */
434long double RT_NOCRT(coshl)(long double);
435long double RT_NOCRT(cosl)(long double);
436long double RT_NOCRT(erfcl)(long double);
437long double RT_NOCRT(erfl)(long double);
438long double RT_NOCRT(exp2l)(long double);
439long double RT_NOCRT(expl)(long double);
440long double RT_NOCRT(expm1l)(long double);
441#endif
442long double RT_NOCRT(fabsl)(long double) __pure2;
443long double RT_NOCRT(fdiml)(long double, long double);
444long double RT_NOCRT(floorl)(long double);
445long double RT_NOCRT(fmal)(long double, long double, long double);
446long double RT_NOCRT(fmaxl)(long double, long double) __pure2;
447long double RT_NOCRT(fminl)(long double, long double) __pure2;
448#if 1 /* bird */
449long double RT_NOCRT(fmodl)(long double, long double);
450#endif
451long double RT_NOCRT(frexpl)(long double value, int *); /* fundamentally !__pure2 */
452#if 1 /* bird */
453long double RT_NOCRT(hypotl)(long double, long double);
454#endif
455int RT_NOCRT(ilogbl)(long double) __pure2;
456long double RT_NOCRT(ldexpl)(long double, int);
457#if 1 /* bird */
458long double RT_NOCRT(lgammal)(long double);
459long long RT_NOCRT(llrintl)(long double);
460#endif
461long long RT_NOCRT(llroundl)(long double);
462#if 1 /* bird */
463long double RT_NOCRT(log10l)(long double);
464long double RT_NOCRT(log1pl)(long double);
465long double RT_NOCRT(log2l)(long double);
466long double RT_NOCRT(logbl)(long double);
467long double RT_NOCRT(logl)(long double);
468long RT_NOCRT(lrintl)(long double);
469#endif
470long RT_NOCRT(lroundl)(long double);
471#if 1 /* bird */
472long double RT_NOCRT(modfl)(long double, long double *); /* fundamentally !__pure2 */
473long double RT_NOCRT(nanl)(const char *) __pure2;
474long double RT_NOCRT(nearbyintl)(long double);
475#endif
476long double RT_NOCRT(nextafterl)(long double, long double);
477double RT_NOCRT(nexttoward)(double, long double);
478float RT_NOCRT(nexttowardf)(float, long double);
479long double RT_NOCRT(nexttowardl)(long double, long double);
480#if 1 /* bird */
481long double RT_NOCRT(powl)(long double, long double);
482long double RT_NOCRT(remainderl)(long double, long double);
483long double RT_NOCRT(remquol)(long double, long double, int *);
484long double RT_NOCRT(rintl)(long double);
485#endif
486long double RT_NOCRT(roundl)(long double);
487long double RT_NOCRT(scalblnl)(long double, long);
488long double RT_NOCRT(scalbnl)(long double, int);
489#if 1 /* bird: we 've got most of these. */
490long double RT_NOCRT(sinhl)(long double);
491long double RT_NOCRT(sinl)(long double);
492long double RT_NOCRT(sqrtl)(long double);
493long double RT_NOCRT(tanhl)(long double);
494long double RT_NOCRT(tanl)(long double);
495long double RT_NOCRT(tgammal)(long double);
496#endif
497long double RT_NOCRT(truncl)(long double);
498
499/* bird: these were missing, gcc apparently inlines them. */
500double RT_NOCRT(nan)(const char *);
501float RT_NOCRT(nanf)(const char *);
502
503#endif /* __ISO_C_VISIBLE >= 1999 */
504
505#if 1/*def __USE_GNU*/
506/*
507 * In GLIBC there are long variants of the XOPEN/SVID constant
508 * block some pages ago. We need this to get the math tests going.
509 */
510#define M_El 2.7182818284590452353602874713526625L
511#define M_LOG2El 1.4426950408889634073599246810018921L
512#define M_LOG10El 0.4342944819032518276511289189166051L
513#define M_LN2l 0.6931471805599453094172321214581766L
514#define M_LN10l 2.3025850929940456840179914546843642L
515#define M_PIl 3.1415926535897932384626433832795029L
516#define M_PI_2l 1.5707963267948966192313216916397514L
517#define M_PI_4l 0.7853981633974483096156608458198757L
518#define M_1_PIl 0.3183098861837906715377675267450287L
519#define M_2_PIl 0.6366197723675813430755350534900574L
520#define M_2_SQRTPIl 1.1283791670955125738961589031215452L
521#define M_SQRT2l 1.4142135623730950488016887242096981L
522#define M_SQRT1_2l 0.7071067811865475244008443621048490L
523#endif
524
525#if 1/*def __USE_GNU*/
526
527void RT_NOCRT(sincos)(double, double *, double *);
528void RT_NOCRT(sincosf)(float, float *, float *);
529void RT_NOCRT(sincosl)(long double, long double *, long double *);
530float RT_NOCRT(exp10f)(float);
531double RT_NOCRT(exp10)(double);
532long double RT_NOCRT(exp10l)(long double);
533float RT_NOCRT(log2f)(float);
534double RT_NOCRT(log2)(double);
535long double RT_NOCRT(log2l)(long double);
536float RT_NOCRT(tgammaf)(float);
537long double RT_NOCRT(significandl)(long double);
538long double RT_NOCRT(j0l)(long double);
539long double RT_NOCRT(j1l)(long double);
540long double RT_NOCRT(jnl)(int, long double);
541long double RT_NOCRT(scalbl)(long double, long double);
542long double RT_NOCRT(y0l)(long double);
543long double RT_NOCRT(y1l)(long double);
544long double RT_NOCRT(ynl)(int, long double);
545long double RT_NOCRT(lgammal_r)(long double,int *);
546long double RT_NOCRT(gammal)(long double);
547#endif
548__END_DECLS
549
550
551
552#ifndef RT_WITHOUT_NOCRT_WRAPPERS
553/* sed -e "/#/d" -e "/RT_NOCRT/!d" -e "s/^.*RT_NOCRT(\([a-z0-9_]*\)).*$/# define \1 RT_NOCRT(\1)/" */
554# define __infinity RT_NOCRT(__infinity)
555# define __nan RT_NOCRT(__nan)
556# define __fpclassifyf RT_NOCRT(__fpclassifyf)
557# define __fpclassifyd RT_NOCRT(__fpclassifyd)
558# define __fpclassifyl RT_NOCRT(__fpclassifyl)
559# define __isfinitef RT_NOCRT(__isfinitef)
560# define __isfinite RT_NOCRT(__isfinite)
561# define __isfinitel RT_NOCRT(__isfinitel)
562# define __isinff RT_NOCRT(__isinff)
563# define __isinfl RT_NOCRT(__isinfl)
564# define __isnanl RT_NOCRT(__isnanl)
565# define __isnormalf RT_NOCRT(__isnormalf)
566# define __isnormal RT_NOCRT(__isnormal)
567# define __isnormall RT_NOCRT(__isnormall)
568# define __signbitf RT_NOCRT(__signbitf)
569# define __signbit RT_NOCRT(__signbit)
570# define __signbitl RT_NOCRT(__signbitl)
571# define signgam RT_NOCRT(signgam)
572# define __fpclassifyd RT_NOCRT(__fpclassifyd)
573# define __fpclassifyf RT_NOCRT(__fpclassifyf)
574# define __fpclassifyl RT_NOCRT(__fpclassifyl)
575# define __isfinitef RT_NOCRT(__isfinitef)
576# define __isfinite RT_NOCRT(__isfinite)
577# define __isfinitel RT_NOCRT(__isfinitel)
578# define __isinff RT_NOCRT(__isinff)
579# define __isinfl RT_NOCRT(__isinfl)
580# define __isnanl RT_NOCRT(__isnanl)
581# define __isnormalf RT_NOCRT(__isnormalf)
582# define __isnormal RT_NOCRT(__isnormal)
583# define __isnormall RT_NOCRT(__isnormall)
584# define __signbit RT_NOCRT(__signbit)
585# define __signbitf RT_NOCRT(__signbitf)
586# define __signbitl RT_NOCRT(__signbitl)
587# define acos RT_NOCRT(acos)
588# define asin RT_NOCRT(asin)
589# define atan RT_NOCRT(atan)
590# define atan2 RT_NOCRT(atan2)
591# define cos RT_NOCRT(cos)
592# define sin RT_NOCRT(sin)
593# define tan RT_NOCRT(tan)
594# define cosh RT_NOCRT(cosh)
595# define sinh RT_NOCRT(sinh)
596# define tanh RT_NOCRT(tanh)
597# define exp RT_NOCRT(exp)
598# define frexp RT_NOCRT(frexp)
599# define ldexp RT_NOCRT(ldexp)
600# define log RT_NOCRT(log)
601# define log10 RT_NOCRT(log10)
602# define modf RT_NOCRT(modf)
603# define pow RT_NOCRT(pow)
604# define sqrt RT_NOCRT(sqrt)
605# define ceil RT_NOCRT(ceil)
606# define fabs RT_NOCRT(fabs)
607# define floor RT_NOCRT(floor)
608# define fmod RT_NOCRT(fmod)
609# define acosh RT_NOCRT(acosh)
610# define asinh RT_NOCRT(asinh)
611# define atanh RT_NOCRT(atanh)
612# define cbrt RT_NOCRT(cbrt)
613# define erf RT_NOCRT(erf)
614# define erfc RT_NOCRT(erfc)
615# define exp2 RT_NOCRT(exp2)
616# define expm1 RT_NOCRT(expm1)
617# define fma RT_NOCRT(fma)
618# define hypot RT_NOCRT(hypot)
619# define ilogb RT_NOCRT(ilogb)
620# define lgamma RT_NOCRT(lgamma)
621# define llrint RT_NOCRT(llrint)
622# define llround RT_NOCRT(llround)
623# define log1p RT_NOCRT(log1p)
624# define logb RT_NOCRT(logb)
625# define lrint RT_NOCRT(lrint)
626# define lround RT_NOCRT(lround)
627# define nextafter RT_NOCRT(nextafter)
628# define remainder RT_NOCRT(remainder)
629# define remquo RT_NOCRT(remquo)
630# define rint RT_NOCRT(rint)
631# define j0 RT_NOCRT(j0)
632# define j1 RT_NOCRT(j1)
633# define jn RT_NOCRT(jn)
634# define scalb RT_NOCRT(scalb)
635# define y0 RT_NOCRT(y0)
636# define y1 RT_NOCRT(y1)
637# define yn RT_NOCRT(yn)
638# define gamma RT_NOCRT(gamma)
639# define copysign RT_NOCRT(copysign)
640# define fdim RT_NOCRT(fdim)
641# define fmax RT_NOCRT(fmax)
642# define fmin RT_NOCRT(fmin)
643# define nearbyint RT_NOCRT(nearbyint)
644# define round RT_NOCRT(round)
645# define scalbln RT_NOCRT(scalbln)
646# define scalbn RT_NOCRT(scalbn)
647# define tgamma RT_NOCRT(tgamma)
648# define trunc RT_NOCRT(trunc)
649# define drem RT_NOCRT(drem)
650# define finite RT_NOCRT(finite)
651# define isnanf RT_NOCRT(isnanf)
652# define gamma_r RT_NOCRT(gamma_r)
653# define lgamma_r RT_NOCRT(lgamma_r)
654# define significand RT_NOCRT(significand)
655# define acosf RT_NOCRT(acosf)
656# define asinf RT_NOCRT(asinf)
657# define atanf RT_NOCRT(atanf)
658# define atan2f RT_NOCRT(atan2f)
659# define cosf RT_NOCRT(cosf)
660# define sinf RT_NOCRT(sinf)
661# define tanf RT_NOCRT(tanf)
662# define coshf RT_NOCRT(coshf)
663# define sinhf RT_NOCRT(sinhf)
664# define tanhf RT_NOCRT(tanhf)
665# define exp2f RT_NOCRT(exp2f)
666# define expf RT_NOCRT(expf)
667# define expm1f RT_NOCRT(expm1f)
668# define frexpf RT_NOCRT(frexpf)
669# define ilogbf RT_NOCRT(ilogbf)
670# define ldexpf RT_NOCRT(ldexpf)
671# define log10f RT_NOCRT(log10f)
672# define log1pf RT_NOCRT(log1pf)
673# define logf RT_NOCRT(logf)
674# define modff RT_NOCRT(modff)
675# define powf RT_NOCRT(powf)
676# define sqrtf RT_NOCRT(sqrtf)
677# define ceilf RT_NOCRT(ceilf)
678# define fabsf RT_NOCRT(fabsf)
679# define floorf RT_NOCRT(floorf)
680# define fmodf RT_NOCRT(fmodf)
681# define roundf RT_NOCRT(roundf)
682# define erff RT_NOCRT(erff)
683# define erfcf RT_NOCRT(erfcf)
684# define hypotf RT_NOCRT(hypotf)
685# define lgammaf RT_NOCRT(lgammaf)
686# define acoshf RT_NOCRT(acoshf)
687# define asinhf RT_NOCRT(asinhf)
688# define atanhf RT_NOCRT(atanhf)
689# define cbrtf RT_NOCRT(cbrtf)
690# define logbf RT_NOCRT(logbf)
691# define copysignf RT_NOCRT(copysignf)
692# define llrintf RT_NOCRT(llrintf)
693# define llroundf RT_NOCRT(llroundf)
694# define lrintf RT_NOCRT(lrintf)
695# define lroundf RT_NOCRT(lroundf)
696# define nearbyintf RT_NOCRT(nearbyintf)
697# define nextafterf RT_NOCRT(nextafterf)
698# define remainderf RT_NOCRT(remainderf)
699# define remquof RT_NOCRT(remquof)
700# define rintf RT_NOCRT(rintf)
701# define scalblnf RT_NOCRT(scalblnf)
702# define scalbnf RT_NOCRT(scalbnf)
703# define truncf RT_NOCRT(truncf)
704# define fdimf RT_NOCRT(fdimf)
705# define fmaf RT_NOCRT(fmaf)
706# define fmaxf RT_NOCRT(fmaxf)
707# define fminf RT_NOCRT(fminf)
708# define dremf RT_NOCRT(dremf)
709# define finitef RT_NOCRT(finitef)
710# define gammaf RT_NOCRT(gammaf)
711# define j0f RT_NOCRT(j0f)
712# define j1f RT_NOCRT(j1f)
713# define jnf RT_NOCRT(jnf)
714# define scalbf RT_NOCRT(scalbf)
715# define y0f RT_NOCRT(y0f)
716# define y1f RT_NOCRT(y1f)
717# define ynf RT_NOCRT(ynf)
718# define gammaf_r RT_NOCRT(gammaf_r)
719# define lgammaf_r RT_NOCRT(lgammaf_r)
720# define significandf RT_NOCRT(significandf)
721# define acoshl RT_NOCRT(acoshl)
722# define acosl RT_NOCRT(acosl)
723# define asinhl RT_NOCRT(asinhl)
724# define asinl RT_NOCRT(asinl)
725# define atan2l RT_NOCRT(atan2l)
726# define atanhl RT_NOCRT(atanhl)
727# define atanl RT_NOCRT(atanl)
728# define cbrtl RT_NOCRT(cbrtl)
729# define ceill RT_NOCRT(ceill)
730# define copysignl RT_NOCRT(copysignl)
731# define coshl RT_NOCRT(coshl)
732# define cosl RT_NOCRT(cosl)
733# define erfcl RT_NOCRT(erfcl)
734# define erfl RT_NOCRT(erfl)
735# define exp2l RT_NOCRT(exp2l)
736# define expl RT_NOCRT(expl)
737# define expm1l RT_NOCRT(expm1l)
738# define fabsl RT_NOCRT(fabsl)
739# define fdiml RT_NOCRT(fdiml)
740# define floorl RT_NOCRT(floorl)
741# define fmal RT_NOCRT(fmal)
742# define fmaxl RT_NOCRT(fmaxl)
743# define fminl RT_NOCRT(fminl)
744# define fmodl RT_NOCRT(fmodl)
745# define frexpl RT_NOCRT(frexpl)
746# define hypotl RT_NOCRT(hypotl)
747# define ilogbl RT_NOCRT(ilogbl)
748# define ldexpl RT_NOCRT(ldexpl)
749# define lgammal RT_NOCRT(lgammal)
750# define llrintl RT_NOCRT(llrintl)
751# define llroundl RT_NOCRT(llroundl)
752# define log10l RT_NOCRT(log10l)
753# define log1pl RT_NOCRT(log1pl)
754# define log2l RT_NOCRT(log2l)
755# define logbl RT_NOCRT(logbl)
756# define logl RT_NOCRT(logl)
757# define lrintl RT_NOCRT(lrintl)
758# define lroundl RT_NOCRT(lroundl)
759# define modfl RT_NOCRT(modfl)
760# define nanl RT_NOCRT(nanl)
761# define nearbyintl RT_NOCRT(nearbyintl)
762# define nextafterl RT_NOCRT(nextafterl)
763# define nexttoward RT_NOCRT(nexttoward)
764# define nexttowardf RT_NOCRT(nexttowardf)
765# define nexttowardl RT_NOCRT(nexttowardl)
766# define powl RT_NOCRT(powl)
767# define remainderl RT_NOCRT(remainderl)
768# define remquol RT_NOCRT(remquol)
769# define rintl RT_NOCRT(rintl)
770# define roundl RT_NOCRT(roundl)
771# define scalblnl RT_NOCRT(scalblnl)
772# define scalbnl RT_NOCRT(scalbnl)
773# define sinhl RT_NOCRT(sinhl)
774# define sinl RT_NOCRT(sinl)
775# define sqrtl RT_NOCRT(sqrtl)
776# define tanhl RT_NOCRT(tanhl)
777# define tanl RT_NOCRT(tanl)
778# define tgammal RT_NOCRT(tgammal)
779# define truncl RT_NOCRT(truncl)
780# define nan RT_NOCRT(nan)
781# define nanf RT_NOCRT(nanf)
782# define sincos RT_NOCRT(sincos)
783# define sincosf RT_NOCRT(sincosf)
784# define sincosl RT_NOCRT(sincosl)
785# define exp10f RT_NOCRT(exp10f)
786# define exp10 RT_NOCRT(exp10)
787# define exp10l RT_NOCRT(exp10l)
788# define log2f RT_NOCRT(log2f)
789# define log2 RT_NOCRT(log2)
790# define log2l RT_NOCRT(log2l)
791# define tgammaf RT_NOCRT(tgammaf)
792# define significandl RT_NOCRT(significandl)
793# define j0l RT_NOCRT(j0l)
794# define j1l RT_NOCRT(j1l)
795# define jnl RT_NOCRT(jnl)
796# define scalbl RT_NOCRT(scalbl)
797# define y0l RT_NOCRT(y0l)
798# define y1l RT_NOCRT(y1l)
799# define ynl RT_NOCRT(ynl)
800# define lgammal_r RT_NOCRT(lgammal_r)
801# define gammal RT_NOCRT(gammal)
802#endif
803
804/*
805 * Include inlined implementations.
806 */
807#ifdef RT_ARCH_AMD64
808# include <iprt/nocrt/amd64/math.h>
809#elif defined(RT_ARCH_X86)
810# include <iprt/nocrt/x86/math.h>
811#endif
812
813#endif
814
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette