VirtualBox

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

Last change on this file since 95819 was 93115, checked in by vboxsync, 3 years ago

scm --update-copyright-year

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