Chameleon

Chameleon Svn Source Tree

Root/branches/rewrite/i386/include/architecture/i386/math.h

Source at commit 1146 created 12 years 11 months ago.
By azimutz, Sync with trunk (r1145). Add nVidia dev id's, 0DF4 for "GeForce GT 450M" (issue 99) and 1251 for "GeForce GTX 560M" (thanks to oSxFr33k for testing).
1/*
2 * Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
11 *
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
18 * under the License.
19 *
20 * @APPLE_LICENSE_HEADER_END@
21 */
22
23/*******************************************************************************
24* *
25* File: math.h *
26* *
27* Contains: typedefs, prototypes, and macros germane to C99 floating point.*
28* *
29*******************************************************************************/
30#ifndef __MATH__
31#define __MATH__
32
33#include "sys/cdefs.h" /* For definition of __DARWIN_UNIX03 et al */
34
35#ifdef __cplusplus
36extern "C" {
37#endif
38
39/******************************************************************************
40* Floating point data types *
41******************************************************************************/
42
43/*Define float_t and double_t per C standard, ISO/IEC 9899:1999 7.12 2,
44taking advantage of GCC's __FLT_EVAL_METHOD__ (which a compiler may
45define anytime and GCC does) that shadows FLT_EVAL_METHOD (which a compiler
46must and may define only in float.h).
47*/
48#if __FLT_EVAL_METHOD__ == 0
49typedef float float_t;
50typedef double double_t;
51#elif __FLT_EVAL_METHOD__ == 1
52typedef double float_t;
53typedef double double_t;
54#elif __FLT_EVAL_METHOD__ == 2 || __FLT_EVAL_METHOD__ == -1
55typedef long double float_t;
56typedef long double double_t;
57#else /* __FLT_EVAL_METHOD__ */
58#error "Unsupported value of __FLT_EVAL_METHOD__."
59#endif /* __FLT_EVAL_METHOD__ */
60
61
62#if defined(__GNUC__)
63#defineHUGE_VAL__builtin_huge_val()
64#defineHUGE_VALF__builtin_huge_valf()
65#defineHUGE_VALL__builtin_huge_vall()
66 #define NAN __builtin_nanf("0x7fc00000") /* Constant expression, can be used as initializer. */
67 #define __MATH_H_ALWAYS_INLINE____attribute__ ((always_inline))
68#else
69 #defineHUGE_VAL1e500
70 #defineHUGE_VALF1e50f
71 #defineHUGE_VALL1e5000L
72 #define NAN__nan( )
73 #define __MATH_H_ALWAYS_INLINE__
74#endif
75
76#define INFINITYHUGE_VALF
77
78
79/******************************************************************************
80* Taxonomy of floating point data types *
81******************************************************************************/
82
83#define FP_NAN 1
84#define FP_INFINITE 2
85#define FP_ZERO 3
86#define FP_NORMAL 4
87#define FP_SUBNORMAL 5
88#define FP_SUPERNORMAL 6 /* meaningful only on PowerPC */
89
90/* fma() *function call* is more costly than equivalent (in-line) multiply and add operations */
91/* For single and double precision, the cost isn't too bad, because we can fall back on higher */
92/* precision hardware, with the necessary range to handle infinite precision products. However, */
93/* expect the long double fma to be at least an order of magnitude slower than a simple multiply */
94/* and an add. */
95#undef FP_FAST_FMA
96#undef FP_FAST_FMAF
97#undef FP_FAST_FMAL
98
99/* The values returned by `ilogb' for 0 and NaN respectively. */
100#define FP_ILOGB0(-2147483647 - 1)
101#define FP_ILOGBNAN(-2147483647 - 1)
102
103/* Bitmasks for the math_errhandling macro. */
104#define MATH_ERRNO1/* errno set by math functions. */
105#define MATH_ERREXCEPT2/* Exceptions raised by math functions. */
106
107#define math_errhandling (__math_errhandling())
108extern unsigned int __math_errhandling ( void );
109
110/********************************************************************************
111* *
112* Inquiry macros *
113* *
114
115* isnormal Non-zero if and only if the argument x is normalized. *
116* isfinite Non-zero if and only if the argument x is finite. *
117* isnan Non-zero if and only if the argument x is a NaN. *
118* signbit Non-zero if and only if the sign of the argument x is *
119* negative. This includes, NaNs, infinities and zeros. *
120* *
121********************************************************************************/
122
123#define fpclassify(x)\
124(sizeof (x) == sizeof(float )?__fpclassifyf((float)(x))\
125:sizeof (x) == sizeof(double)?__fpclassifyd((double)(x))\
126:__fpclassify ((long double)(x)))
127
128extern int __fpclassifyf(float );
129extern int __fpclassifyd(double );
130extern int __fpclassify (long double);
131
132#if defined( __GNUC__ ) && 0 == __FINITE_MATH_ONLY__
133 /* Yes, that's right. You only get the fast iswhatever() macros if you do NOT turn on -ffast-math. */
134 /* These inline functions require the compiler to be compiling to standard in order to work. */
135 /* -ffast-math, among other things, implies that NaNs don't happen. The compiler can in that case */
136 /* optimize x != x to be false always, wheras it would be true for NaNs. That breaks __inline_isnan() */
137 /* below. */
138#define isnormal(x)\
139(sizeof (x) == sizeof(float )?__inline_isnormalf((float)(x))\
140:sizeof (x) == sizeof(double)?__inline_isnormald((double)(x))\
141:__inline_isnormal ((long double)(x)))
142
143#define isfinite(x)\
144(sizeof (x) == sizeof(float )?__inline_isfinitef((float)(x))\
145:sizeof (x) == sizeof(double)?__inline_isfinited((double)(x))\
146:__inline_isfinite ((long double)(x)))
147
148#define isinf(x)\
149(sizeof (x) == sizeof(float )?__inline_isinff((float)(x))\
150:sizeof (x) == sizeof(double)?__inline_isinfd((double)(x))\
151:__inline_isinf ((long double)(x)))
152
153#define isnan(x)\
154(sizeof (x) == sizeof(float )?__inline_isnanf((float)(x))\
155:sizeof (x) == sizeof(double)?__inline_isnand((double)(x))\
156:__inline_isnan ((long double)(x)))
157
158#define signbit(x)\
159(sizeof (x) == sizeof(float )?__inline_signbitf((float)(x))\
160:sizeof (x) == sizeof(double)?__inline_signbitd((double)(x))\
161:__inline_signbit((long double)(x)))
162
163static __inline__ int __inline_isfinitef(float ) __MATH_H_ALWAYS_INLINE__;
164static __inline__ int __inline_isfinited(double ) __MATH_H_ALWAYS_INLINE__;
165static __inline__ int __inline_isfinite(long double) __MATH_H_ALWAYS_INLINE__;
166static __inline__ int __inline_isinff(float ) __MATH_H_ALWAYS_INLINE__;
167static __inline__ int __inline_isinfd(double ) __MATH_H_ALWAYS_INLINE__;
168static __inline__ int __inline_isinf(long double) __MATH_H_ALWAYS_INLINE__;
169static __inline__ int __inline_isnanf(float ) __MATH_H_ALWAYS_INLINE__;
170static __inline__ int __inline_isnand(double ) __MATH_H_ALWAYS_INLINE__;
171static __inline__ int __inline_isnan(long double) __MATH_H_ALWAYS_INLINE__;
172static __inline__ int __inline_isnormalf (float ) __MATH_H_ALWAYS_INLINE__;
173static __inline__ int __inline_isnormald (double ) __MATH_H_ALWAYS_INLINE__;
174static __inline__ int __inline_isnormal (long double) __MATH_H_ALWAYS_INLINE__;
175static __inline__ int __inline_signbitf (float ) __MATH_H_ALWAYS_INLINE__;
176static __inline__ int __inline_signbitd (double ) __MATH_H_ALWAYS_INLINE__;
177static __inline__ int __inline_signbit (long double) __MATH_H_ALWAYS_INLINE__;
178
179static __inline__ int __inline_isinff( float __x ) { return __builtin_fabsf(__x) == __builtin_inff(); }
180static __inline__ int __inline_isinfd( double __x ) { return __builtin_fabs(__x) == __builtin_inf(); }
181static __inline__ int __inline_isinf( long double __x ) { return __builtin_fabsl(__x) == __builtin_infl(); }
182static __inline__ int __inline_isfinitef( float __x ) { return __x == __x && __builtin_fabsf(__x) != __builtin_inff(); }
183static __inline__ int __inline_isfinited( double __x ) { return __x == __x && __builtin_fabs(__x) != __builtin_inf(); }
184static __inline__ int __inline_isfinite( long double __x ) { return __x == __x && __builtin_fabsl(__x) != __builtin_infl(); }
185static __inline__ int __inline_isnanf( float __x ) { return __x != __x; }
186static __inline__ int __inline_isnand( double __x ) { return __x != __x; }
187static __inline__ int __inline_isnan( long double __x ) { return __x != __x; }
188static __inline__ int __inline_signbitf( float __x ) { union{ float __f; unsigned int __u; }__u; __u.__f = __x; return (int)(__u.__u >> 31); }
189static __inline__ int __inline_signbitd( double __x ) { union{ double __f; unsigned int __u[2]; }__u; __u.__f = __x; return (int)(__u.__u[1] >> 31); }
190static __inline__ int __inline_signbit( long double __x ){ union{ long double __ld; struct{ unsigned int __m[2]; short __sexp; }__p; }__u; __u.__ld = __x; return (int) (((unsigned short) __u.__p.__sexp) >> 15); }
191static __inline__ int __inline_isnormalf( float __x ) { float fabsf = __builtin_fabsf(__x); if( __x != __x ) return 0; return fabsf < __builtin_inff() && fabsf >= __FLT_MIN__; }
192static __inline__ int __inline_isnormald( double __x ) { double fabsf = __builtin_fabs(__x); if( __x != __x ) return 0; return fabsf < __builtin_inf() && fabsf >= __DBL_MIN__; }
193static __inline__ int __inline_isnormal( long double __x ) { long double fabsf = __builtin_fabsl(__x); if( __x != __x ) return 0; return fabsf < __builtin_infl() && fabsf >= __LDBL_MIN__; }
194
195#else
196
197#define isnormal(x)\
198(sizeof (x) == sizeof(float )?__isnormalf((float)(x))\
199:sizeof (x) == sizeof(double)?__isnormald((double)(x))\
200:__isnormal ((long double)(x)))
201
202#define isfinite(x)\
203(sizeof (x) == sizeof(float )?__isfinitef((float)(x))\
204:sizeof (x) == sizeof(double)?__isfinited((double)(x))\
205:__isfinite ((long double)(x)))
206
207#define isinf(x)\
208(sizeof (x) == sizeof(float )?__isinff((float)(x))\
209:sizeof (x) == sizeof(double)?__isinfd((double)(x))\
210:__isinf ((long double)(x)))
211
212#define isnan(x)\
213(sizeof (x) == sizeof(float )?__isnanf((float)(x))\
214:sizeof (x) == sizeof(double)?__isnand((double)(x))\
215:__isnan ((long double)(x)))
216
217#define signbit(x)\
218(sizeof (x) == sizeof(float )?__signbitf((float)(x))\
219:sizeof (x) == sizeof(double)?__signbitd((double)(x))\
220:__signbitl((long double)(x)))
221
222
223extern int __isnormalf (float );
224extern int __isnormald (double );
225extern int __isnormal (long double);
226
227extern int __isfinitef (float );
228extern int __isfinited (double );
229extern int __isfinite (long double);
230
231extern int __isinff (float );
232extern int __isinfd (double );
233extern int __isinf (long double);
234
235extern int __isnanf (float );
236extern int __isnand (double );
237extern int __isnan (long double);
238
239extern int __signbitf (float );
240extern int __signbitd (double );
241extern int __signbitl (long double);
242
243#endif
244
245
246
247/********************************************************************************
248* *
249* Math Functions *
250* *
251********************************************************************************/
252
253extern double acos( double );
254extern float acosf( float );
255
256extern double asin( double );
257extern float asinf( float );
258
259extern double atan( double );
260extern float atanf( float );
261
262extern double atan2( double, double );
263extern float atan2f( float, float );
264
265extern double cos( double );
266extern float cosf( float );
267
268extern double sin( double );
269extern float sinf( float );
270
271extern double tan( double );
272extern float tanf( float );
273
274extern double acosh( double );
275extern float acoshf( float );
276
277extern double asinh( double );
278extern float asinhf( float );
279
280extern double atanh( double );
281extern float atanhf( float );
282
283extern double cosh( double );
284extern float coshf( float );
285
286extern double sinh( double );
287extern float sinhf( float );
288
289extern double tanh( double );
290extern float tanhf( float );
291
292extern double exp ( double );
293extern float expf ( float );
294
295extern double exp2 ( double );
296extern float exp2f ( float );
297
298extern double expm1 ( double );
299extern float expm1f ( float );
300
301extern double log ( double );
302extern float logf ( float );
303
304extern double log10 ( double );
305extern float log10f ( float );
306
307extern double log2 ( double );
308extern float log2f ( float );
309
310extern double log1p ( double );
311extern float log1pf ( float );
312
313extern double logb ( double );
314extern float logbf ( float );
315
316extern double modf ( double, double * );
317extern float modff ( float, float * );
318
319extern double ldexp ( double, int );
320extern float ldexpf ( float, int );
321
322extern double frexp ( double, int * );
323extern float frexpf ( float, int * );
324
325extern int ilogb ( double );
326extern int ilogbf ( float );
327
328extern double scalbn ( double, int );
329extern float scalbnf ( float, int );
330
331extern double scalbln ( double, long int );
332extern float scalblnf ( float, long int );
333
334extern double fabs( double );
335extern float fabsf( float );
336
337extern double cbrt( double );
338extern float cbrtf( float );
339
340extern double hypot ( double, double );
341extern float hypotf ( float, float );
342
343extern double pow ( double, double );
344extern float powf ( float, float );
345
346extern double sqrt( double );
347extern float sqrtf( float );
348
349extern double erf( double );
350extern float erff( float );
351
352extern double erfc( double );
353extern float erfcf( float );
354
355/*lgamma and lgammaf are not thread-safe. The thread-safe variants
356 *lgamma_r and lgammaf_r are available on OS X 10.6 and later.
357 *
358 *To use the thread-safe variants, you must define the _REENTRANT symbol.
359 */
360extern double lgamma( double );
361extern float lgammaf( float );
362
363extern double tgamma( double );
364extern float tgammaf( float );
365
366extern double ceil ( double );
367extern float ceilf ( float );
368
369extern double floor ( double );
370extern float floorf ( float );
371
372extern double nearbyint ( double );
373extern float nearbyintf ( float );
374
375extern double rint ( double );
376extern float rintf ( float );
377
378extern long int lrint ( double );
379extern long int lrintf ( float );
380
381extern double round ( double );
382extern float roundf ( float );
383
384extern long int lround ( double );
385extern long int lroundf ( float );
386
387#if ( defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L ) || ! defined( __STRICT_ANSI__ ) || ! defined( __GNUC__ )
388
389 /* long long is not part of C90. Make sure you are passing -std=c99 or -std=gnu99 or better if you need this. */
390 extern long long int llrint ( double );
391 extern long long int llrintf ( float );
392
393 extern long long int llround ( double );
394 extern long long int llroundf ( float );
395
396#endif /* #if ( defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L ) || ! defined( __STRICT_ANSI__ ) || ! defined( __GNUC__ ) */
397
398extern double trunc ( double );
399extern float truncf ( float );
400
401extern double fmod ( double, double );
402extern float fmodf ( float, float );
403
404extern double remainder ( double, double );
405extern float remainderf ( float, float );
406
407extern double remquo ( double, double, int * );
408extern float remquof ( float, float, int * );
409
410extern double copysign ( double, double );
411extern float copysignf ( float, float );
412
413extern double nan( const char * );
414extern float nanf( const char * );
415
416extern double nextafter ( double, double );
417extern float nextafterf ( float, float );
418
419extern double fdim ( double, double );
420extern float fdimf ( float, float );
421
422extern double fmax ( double, double );
423extern float fmaxf ( float, float );
424
425extern double fmin ( double, double );
426extern float fminf ( float, float );
427
428extern double fma ( double, double, double );
429extern float fmaf ( float, float, float );
430
431extern long double acosl(long double);
432extern long double asinl(long double);
433extern long double atanl(long double);
434extern long double atan2l(long double, long double);
435extern long double cosl(long double);
436extern long double sinl(long double);
437extern long double tanl(long double);
438extern long double acoshl(long double);
439extern long double asinhl(long double);
440extern long double atanhl(long double);
441extern long double coshl(long double);
442extern long double sinhl(long double);
443extern long double tanhl(long double);
444extern long double expl(long double);
445extern long double exp2l(long double);
446extern long double expm1l(long double);
447extern long double logl(long double);
448extern long double log10l(long double);
449extern long double log2l(long double);
450extern long double log1pl(long double);
451extern long double logbl(long double);
452extern long double modfl(long double, long double *);
453extern long double ldexpl(long double, int);
454extern long double frexpl(long double, int *);
455extern int ilogbl(long double);
456extern long double scalbnl(long double, int);
457extern long double scalblnl(long double, long int);
458extern long double fabsl(long double);
459extern long double cbrtl(long double);
460extern long double hypotl(long double, long double);
461extern long double powl(long double, long double);
462extern long double sqrtl(long double);
463extern long double erfl(long double);
464extern long double erfcl(long double);
465
466/*lgammal is not thread-safe.
467 *The thread-safe variant lgammal_r is available on OS X 10.6 and later.
468 *
469 *To use the thread-safe variant, you must define the _REENTRANT symbol.
470 */
471extern long double lgammal(long double);
472
473extern long double tgammal(long double);
474extern long double ceill(long double);
475extern long double floorl(long double);
476extern long double nearbyintl(long double);
477extern long double rintl(long double);
478extern long int lrintl(long double);
479extern long double roundl(long double);
480extern long int lroundl(long double);
481
482#if ( defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L ) || ! defined( __STRICT_ANSI__ ) || ! defined( __GNUC__ )
483 /* long long is not part of C90. Make sure you are passing -std=c99 or -std=gnu99 or better if you need this. */
484 extern long long int llrintl(long double);
485 extern long long int llroundl(long double);
486#endif /* #if ( defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L ) || ! defined( __STRICT_ANSI__ ) || ! defined( __GNUC__ ) */
487
488extern long double truncl(long double);
489extern long double fmodl(long double, long double);
490extern long double remainderl(long double, long double);
491extern long double remquol(long double, long double, int *);
492extern long double copysignl(long double, long double);
493extern long double nanl(const char *);
494extern long double nextafterl(long double, long double);
495extern double nexttoward(double, long double);
496extern float nexttowardf(float, long double);
497extern long double nexttowardl(long double, long double);
498extern long double fdiml(long double, long double);
499extern long double fmaxl(long double, long double);
500extern long double fminl(long double, long double);
501extern long double fmal(long double, long double, long double);
502
503#define isgreater(x, y) __builtin_isgreater ((x),(y))
504#define isgreaterequal(x, y) __builtin_isgreaterequal ((x),(y))
505#define isless(x, y) __builtin_isless ((x),(y))
506#define islessequal(x, y) __builtin_islessequal ((x),(y))
507#define islessgreater(x, y) __builtin_islessgreater ((x),(y))
508#define isunordered(x, y) __builtin_isunordered ((x),(y))
509
510extern double __inf( void );
511extern float __inff( void );
512extern long double __infl( void );
513extern float __nan( void ); /* 10.3 (and later) must retain in ABI for backward compatability */
514
515#if !defined(_ANSI_SOURCE)
516extern double j0 ( double );
517
518extern double j1 ( double );
519
520extern double jn ( int, double );
521
522extern double y0 ( double );
523
524extern double y1 ( double );
525
526extern double yn ( int, double );
527
528extern double scalb ( double, double );
529
530
531#define M_E 2.71828182845904523536028747135266250 /* e */
532#define M_LOG2E 1.44269504088896340735992468100189214 /* log 2e */
533#define M_LOG10E 0.434294481903251827651128918916605082 /* log 10e */
534#define M_LN2 0.693147180559945309417232121458176568 /* log e2 */
535#define M_LN10 2.30258509299404568401799145468436421 /* log e10 */
536#define M_PI 3.14159265358979323846264338327950288 /* pi */
537#define M_PI_2 1.57079632679489661923132169163975144 /* pi/2 */
538#define M_PI_4 0.785398163397448309615660845819875721 /* pi/4 */
539#define M_1_PI 0.318309886183790671537767526745028724 /* 1/pi */
540#define M_2_PI 0.636619772367581343075535053490057448 /* 2/pi */
541#define M_2_SQRTPI 1.12837916709551257389615890312154517 /* 2/sqrt(pi) */
542#define M_SQRT2 1.41421356237309504880168872420969808 /* sqrt(2) */
543#define M_SQRT1_2 0.707106781186547524400844362104849039 /* 1/sqrt(2) */
544
545#defineMAXFLOAT((float)3.40282346638528860e+38)
546extern int signgam; /* required for unix 2003 */
547
548
549#endif /* !defined(_ANSI_SOURCE) */
550
551#if !defined(__NOEXTENSIONS__) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
552#define __WANT_EXTENSIONS__
553#endif
554
555#ifdef __WANT_EXTENSIONS__
556
557#define FP_SNANFP_NAN
558#define FP_QNANFP_NAN
559
560extern long int rinttol ( double );/* Legacy API: please use C99 lrint() instead. */
561
562extern long int roundtol ( double );/* Legacy API: please use C99 lround() instead. */
563
564/*
565 * XOPEN/SVID
566 */
567#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
568#if (!defined(_XOPEN_SOURCE) || defined(_DARWIN_C_SOURCE))
569#if !defined(__cplusplus)
570/* used by matherr below */
571struct exception {
572int type;
573char *name;
574double arg1;
575double arg2;
576double retval;
577};
578#endif
579
580#defineHUGEMAXFLOAT
581
582/*
583 * set X_TLOSS = pi*2**52, which is possibly defined in <values.h>
584 * (one may replace the following line by "#include <values.h>")
585 */
586
587#define X_TLOSS1.41484755040568800000e+16
588
589#defineDOMAIN1
590#defineSING2
591#defineOVERFLOW3
592#defineUNDERFLOW4
593#defineTLOSS5
594#definePLOSS6
595
596#endif /* (!_XOPEN_SOURCE || _DARWIN_C_SOURCE) */
597#endif /* !_ANSI_SOURCE && (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
598
599#if !defined( __STRICT_ANSI__) && !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
600extern int finite ( double );/* Legacy API: please use C99 isfinite() instead. */
601
602extern double gamma ( double );/* Legacy API: please use C99 tgamma() instead. */
603
604#if (!defined(_XOPEN_SOURCE) || defined(_DARWIN_C_SOURCE))
605
606#if !defined(__cplusplus)
607extern int matherr ( struct exception * );
608#endif
609
610/*
611 * IEEE Test Vector
612 */
613extern double significand ( double );
614
615/*
616 * BSD math library entry points
617 */
618extern double drem ( double, double );/* Legacy API: please use C99 remainder() instead. */
619
620/*
621 * Reentrant version of lgamma; passes signgam back by reference
622 * as the second argument; user must allocate space for signgam.
623 */
624
625#ifdef _REENTRANT
626#include <AvailabilityMacros.h>
627// Available on OS X 10.6 and later.
628extern float lgammaf_r ( float, int * ) AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER;
629extern double lgamma_r ( double, int * ) AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER;
630extern long double lgammal_r ( long double, int * ) AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER;
631#endif /* _REENTRANT */
632
633#endif /* (!_XOPEN_SOURCE || _DARWIN_C_SOURCE) */
634#endif /* !_ANSI_SOURCE && (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
635
636#endif /* __WANT_EXTENSIONS__ */
637
638#ifdef __cplusplus
639}
640#endif
641
642#endif /* __MATH__ */
643

Archive Download this file

Revision: 1146