VirtualBox

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

Last change on this file since 95975 was 95975, checked in by vboxsync, 2 years ago

include/iprt/nocrt: Prototyped a whole bunch of things to make mesa (almost) compile. bugref:10261

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