• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  * This file has no copyright assigned and is placed in the Public Domain.
3  * This file is part of the mingw-w64 runtime package.
4  * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5  */
6 #ifndef _MATH_H_
7 #define _MATH_H_
8 
9 #ifdef __GNUC__
10 #pragma GCC system_header
11 #endif /* __GNUC__ */
12 
13 #include <crtdefs.h>
14 
15 struct _exception;
16 
17 #pragma pack(push,_CRT_PACKING)
18 
19 #define	_DOMAIN		1	/* domain error in argument */
20 #define	_SING		2	/* singularity */
21 #define	_OVERFLOW	3	/* range overflow */
22 #define	_UNDERFLOW	4	/* range underflow */
23 #define	_TLOSS		5	/* total loss of precision */
24 #define	_PLOSS		6	/* partial loss of precision */
25 
26 #ifndef __STRICT_ANSI__
27 #ifndef	NO_OLDNAMES
28 
29 #define	DOMAIN		_DOMAIN
30 #define	SING		_SING
31 #define	OVERFLOW	_OVERFLOW
32 #define	UNDERFLOW	_UNDERFLOW
33 #define	TLOSS		_TLOSS
34 #define	PLOSS		_PLOSS
35 
36 #endif
37 #endif
38 
39 #if !defined(__STRICT_ANSI__) || defined(_POSIX_C_SOURCE) || defined(_POSIX_SOURCE) || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) || defined(_USE_MATH_DEFINES)
40 #define M_E		2.7182818284590452354
41 #define M_LOG2E		1.4426950408889634074
42 #define M_LOG10E	0.43429448190325182765
43 #define M_LN2		0.69314718055994530942
44 #define M_LN10		2.30258509299404568402
45 #define M_PI		3.14159265358979323846
46 #define M_PI_2		1.57079632679489661923
47 #define M_PI_4		0.78539816339744830962
48 #define M_1_PI		0.31830988618379067154
49 #define M_2_PI		0.63661977236758134308
50 #define M_2_SQRTPI	1.12837916709551257390
51 #define M_SQRT2		1.41421356237309504880
52 #define M_SQRT1_2	0.70710678118654752440
53 #endif
54 
55 #ifndef __STRICT_ANSI__
56 /* See also float.h  */
57 #ifndef __MINGW_FPCLASS_DEFINED
58 #define __MINGW_FPCLASS_DEFINED 1
59 /* IEEE 754 classication */
60 #define	_FPCLASS_SNAN	0x0001	/* Signaling "Not a Number" */
61 #define	_FPCLASS_QNAN	0x0002	/* Quiet "Not a Number" */
62 #define	_FPCLASS_NINF	0x0004	/* Negative Infinity */
63 #define	_FPCLASS_NN	0x0008	/* Negative Normal */
64 #define	_FPCLASS_ND	0x0010	/* Negative Denormal */
65 #define	_FPCLASS_NZ	0x0020	/* Negative Zero */
66 #define	_FPCLASS_PZ	0x0040	/* Positive Zero */
67 #define	_FPCLASS_PD	0x0080	/* Positive Denormal */
68 #define	_FPCLASS_PN	0x0100	/* Positive Normal */
69 #define	_FPCLASS_PINF	0x0200	/* Positive Infinity */
70 #endif
71 #endif
72 
73 #ifndef RC_INVOKED
74 
75 #ifndef __mingw_types_compatible_p
76 #ifdef __cplusplus
77 extern "C++" {
78 template <typename type1, typename type2> struct __mingw_types_compatible_p {
79   static const bool result = false;
80 };
81 
82 template <typename type1> struct __mingw_types_compatible_p<type1, type1> {
83  static const bool result = true;
84 };
85 
86 template <typename type1> struct __mingw_types_compatible_p<const type1, type1> {
87   static const bool result = true;
88 };
89 
90 template <typename type1> struct __mingw_types_compatible_p<type1, const type1> {
91   static const bool result = true;
92 };
93 }
94 
95 #define __mingw_types_compatible_p(type1, type2) __mingw_types_compatible_p <type1, type2>::result
96 #else
97 #define __mingw_types_compatible_p(type1, type2) __builtin_types_compatible_p (type1, type2)
98 #endif
99 #endif
100 
101 #ifndef __mingw_choose_expr
102 #ifdef __cplusplus
103 #define __mingw_choose_expr(C, E1, E2) ((C) ? E1 : E2)
104 #else
105 #define __mingw_choose_expr __builtin_choose_expr
106 #endif
107 #endif
108 
109 
110 #ifdef __cplusplus
111 extern "C" {
112 #endif
113 
114 #ifndef __MINGW_SOFTMATH
115 #define __MINGW_SOFTMATH
116 
117 /* IEEE float/double type shapes.  */
118 
119   typedef union __mingw_dbl_type_t {
120     double x;
121     unsigned long long val;
122     __C89_NAMELESS struct {
123       unsigned int low, high;
124     } lh;
125   } __mingw_dbl_type_t;
126 
127   typedef union __mingw_flt_type_t {
128     float x;
129     unsigned int val;
130   } __mingw_flt_type_t;
131 
132   typedef union __mingw_ldbl_type_t
133   {
134     long double x;
135     __C89_NAMELESS struct {
136       unsigned int low, high;
137       int sign_exponent : 16;
138       int res1 : 16;
139       int res0 : 32;
140     } lh;
141   } __mingw_ldbl_type_t;
142 
143 #endif
144 
145 #ifndef _HUGE
146   extern double * __MINGW_IMP_SYMBOL(_HUGE);
147 #define _HUGE	(* __MINGW_IMP_SYMBOL(_HUGE))
148 #endif
149 
150 #ifdef __GNUC__
151 #define	HUGE_VAL __builtin_huge_val()
152 #else
153 #define HUGE_VAL _HUGE
154 #endif /* __GNUC__ */
155 
156 #ifndef _EXCEPTION_DEFINED
157 #define _EXCEPTION_DEFINED
158   struct _exception {
159     int type;
160     const char *name;
161     double arg1;
162     double arg2;
163     double retval;
164   };
165 
166   void __mingw_raise_matherr (int typ, const char *name, double a1, double a2,
167 			      double rslt);
168   void __mingw_setusermatherr (int (__cdecl *)(struct _exception *));
169   _CRTIMP void __setusermatherr(int (__cdecl *)(struct _exception *));
170   #define __setusermatherr __mingw_setusermatherr
171 #endif
172 
173   double __cdecl sin(double _X);
174   double __cdecl cos(double _X);
175   double __cdecl tan(double _X);
176   double __cdecl sinh(double _X);
177   double __cdecl cosh(double _X);
178   double __cdecl tanh(double _X);
179   double __cdecl asin(double _X);
180   double __cdecl acos(double _X);
181   double __cdecl atan(double _X);
182   double __cdecl atan2(double _Y,double _X);
183   double __cdecl exp(double _X);
184   double __cdecl log(double _X);
185   double __cdecl log10(double _X);
186   double __cdecl pow(double _X,double _Y);
187   double __cdecl sqrt(double _X);
188   double __cdecl ceil(double _X);
189   double __cdecl floor(double _X);
190 
191 /* 7.12.7.2 The fabs functions: Double in C89 */
192   extern  float __cdecl fabsf (float x);
193   extern long double __cdecl fabsl (long double);
194   extern double __cdecl fabs (double _X);
195 
196 #ifndef __CRT__NO_INLINE
197 #if !defined (__ia64__)
198   __CRT_INLINE float __cdecl fabsf (float x)
199   {
200 #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__)
201     return __builtin_fabsf (x);
202 #else
203     float res = 0.0F;
204     __asm__ __volatile__ ("fabs;" : "=t" (res) : "0" (x));
205     return res;
206 #endif
207   }
208 
209   __CRT_INLINE long double __cdecl fabsl (long double x)
210   {
211 #if defined(__arm__) || defined(__aarch64__)
212     return __builtin_fabsl (x);
213 #else
214     long double res = 0.0l;
215     __asm__ __volatile__ ("fabs;" : "=t" (res) : "0" (x));
216     return res;
217 #endif
218   }
219 
220   __CRT_INLINE double __cdecl fabs (double x)
221   {
222 #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__)
223     return __builtin_fabs (x);
224 #else
225     double res = 0.0;
226     __asm__ __volatile__ ("fabs;" : "=t" (res) : "0" (x));
227     return res;
228 #endif
229   }
230 #endif
231 #endif
232 
233   double __cdecl ldexp(double _X,int _Y);
234   double __cdecl frexp(double _X,int *_Y);
235   double __cdecl modf(double _X,double *_Y);
236   double __cdecl fmod(double _X,double _Y);
237 
238   void __cdecl sincos (double __x, double *p_sin, double *p_cos);
239   void __cdecl sincosl (long double __x, long double *p_sin, long double *p_cos);
240   void __cdecl sincosf (float __x, float *p_sin, float *p_cos);
241 
242 #ifndef _CRT_ABS_DEFINED
243 #define _CRT_ABS_DEFINED
244   int __cdecl abs(int _X);
245   long __cdecl labs(long _X);
246 #endif
247 #ifndef _CRT_ATOF_DEFINED
248 #define _CRT_ATOF_DEFINED
249   double __cdecl atof(const char *_String);
250   double __cdecl _atof_l(const char *_String,_locale_t _Locale);
251 #endif
252 
253 #define EDOM 33
254 #define ERANGE 34
255 
256 #ifndef __STRICT_ANSI__
257 
258 #ifndef _COMPLEX_DEFINED
259 #define _COMPLEX_DEFINED
260   struct _complex {
261     double x;
262     double y;
263   };
264 #endif
265 
266   double __cdecl _cabs(struct _complex _ComplexA); /* Overridden to use our cabs.  */
267   double __cdecl _hypot(double _X,double _Y);
268   _CRTIMP double __cdecl _j0(double _X);
269   _CRTIMP double __cdecl _j1(double _X);
270   _CRTIMP double __cdecl _jn(int _X,double _Y);
271   _CRTIMP double __cdecl _y0(double _X);
272   _CRTIMP double __cdecl _y1(double _X);
273   _CRTIMP double __cdecl _yn(int _X,double _Y);
274 #ifndef _CRT_MATHERR_DEFINED
275 #define _CRT_MATHERR_DEFINED
276   _CRTIMP int __cdecl _matherr (struct _exception *);
277 #endif
278 
279 /* These are also declared in Mingw float.h; needed here as well to work
280    around GCC build issues.  */
281 /* BEGIN FLOAT.H COPY */
282 /*
283  * IEEE recommended functions
284  */
285 #ifndef _SIGN_DEFINED
286 #define _SIGN_DEFINED
287   _CRTIMP double __cdecl _chgsign (double _X);
288   _CRTIMP double __cdecl _copysign (double _Number,double _Sign);
289   _CRTIMP double __cdecl _logb (double);
290   _CRTIMP double __cdecl _nextafter (double, double);
291   _CRTIMP double __cdecl _scalb (double, long);
292   _CRTIMP int __cdecl _finite (double);
293   _CRTIMP int __cdecl _fpclass (double);
294   _CRTIMP int __cdecl _isnan (double);
295 #endif
296 
297 /* END FLOAT.H COPY */
298 
299 #if !defined(NO_OLDNAMES)
300 
301 _CRTIMP double __cdecl j0 (double) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
302 _CRTIMP double __cdecl j1 (double) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
303 _CRTIMP double __cdecl jn (int, double) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
304 _CRTIMP double __cdecl y0 (double) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
305 _CRTIMP double __cdecl y1 (double) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
306 _CRTIMP double __cdecl yn (int, double) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
307 
308 _CRTIMP double __cdecl chgsign (double);
309 /*
310  * scalb() is a GCC built-in.
311  * Exclude this _scalb() stub; the semantics are incompatible
312  * with the built-in implementation.
313  *
314 _CRTIMP double __cdecl scalb (double, long);
315  *
316  */
317   _CRTIMP int __cdecl finite (double);
318   _CRTIMP int __cdecl fpclass (double);
319 
320 #define FP_SNAN    _FPCLASS_SNAN
321 #define FP_QNAN    _FPCLASS_QNAN
322 #define FP_NINF    _FPCLASS_NINF
323 #define FP_PINF    _FPCLASS_PINF
324 #define FP_NDENORM _FPCLASS_ND
325 #define FP_PDENORM _FPCLASS_PD
326 #define FP_NZERO   _FPCLASS_NZ
327 #define FP_PZERO   _FPCLASS_PZ
328 #define FP_NNORM   _FPCLASS_NN
329 #define FP_PNORM   _FPCLASS_PN
330 
331 #endif /* !defined (_NO_OLDNAMES) && !define (NO_OLDNAMES) */
332 
333 #if(defined(_X86_) && !defined(__x86_64))
334   _CRTIMP int __cdecl _set_SSE2_enable(int _Flag);
335 #endif
336 
337 #endif
338 
339 #ifndef __NO_ISOCEXT
340 #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
341 	|| !defined __STRICT_ANSI__ || defined __cplusplus
342 
343 #ifdef __GNUC__
344 #define HUGE_VALF	__builtin_huge_valf()
345 #define HUGE_VALL	__builtin_huge_vall()
346 #define INFINITY	__builtin_inff()
347 #define NAN		__builtin_nanf("")
348 #else
349 extern const float __INFF;
350 #define HUGE_VALF __INFF
351 extern const long double  __INFL;
352 #define HUGE_VALL __INFL
353 #define INFINITY HUGE_VALF
354 extern const double __QNANF;
355 #define NAN __QNANF
356 #endif /* __GNUC__ */
357 
358 /* Use the compiler's builtin define for FLT_EVAL_METHOD to
359    set float_t and double_t.  */
360 #if defined (__x86_64__) || defined(__FLT_EVAL_METHOD__)
361 # if defined (__x86_64__) || ( __FLT_EVAL_METHOD__== 0)
362 typedef float float_t;
363 typedef double double_t;
364 # elif (__FLT_EVAL_METHOD__ == 1)
365 typedef double float_t;
366 typedef double double_t;
367 # else /* (__FLT_EVAL_METHOD__ == 2) default ix87 FPU */
368 typedef long double float_t;
369 typedef long double double_t;
370 #endif
371 #else /* ix87 FPU default */
372 typedef long double float_t;
373 typedef long double double_t;
374 #endif
375 
376 /* 7.12.3.1 */
377 /*
378    Return values for fpclassify.
379    These are based on Intel x87 fpu condition codes
380    in the high byte of status word and differ from
381    the return values for MS IEEE 754 extension _fpclass()
382 */
383 #define FP_NAN		0x0100
384 #define FP_NORMAL	0x0400
385 #define FP_INFINITE	(FP_NAN | FP_NORMAL)
386 #define FP_ZERO		0x4000
387 #define FP_SUBNORMAL	(FP_NORMAL | FP_ZERO)
388 /* 0x0200 is signbit mask */
389 
390 /*
391   We can't inline float or double, because we want to ensure truncation
392   to semantic type before classification.
393   (A normal long double value might become subnormal when
394   converted to double, and zero when converted to float.)
395 */
396 
397   extern int __cdecl __fpclassifyl (long double);
398   extern int __cdecl __fpclassifyf (float);
399   extern int __cdecl __fpclassify (double);
400 
401 #ifndef __CRT__NO_INLINE
402   __CRT_INLINE int __cdecl __fpclassifyl (long double x) {
403 #if defined(__x86_64__) || defined(_AMD64_)
404     __mingw_ldbl_type_t hlp;
405     unsigned int e;
406     hlp.x = x;
407     e = hlp.lh.sign_exponent & 0x7fff;
408     if (!e)
409       {
410         unsigned int h = hlp.lh.high;
411         if (!(hlp.lh.low | h))
412           return FP_ZERO;
413         else if (!(h & 0x80000000))
414           return FP_SUBNORMAL;
415       }
416     else if (e == 0x7fff)
417       return (((hlp.lh.high & 0x7fffffff) | hlp.lh.low) == 0 ?
418               FP_INFINITE : FP_NAN);
419     return FP_NORMAL;
420 #elif defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_)
421     return __fpclassify(x);
422 #elif defined(__i386__) || defined(_X86_)
423     unsigned short sw;
424     __asm__ __volatile__ ("fxam; fstsw %%ax;" : "=a" (sw): "t" (x));
425     return sw & (FP_NAN | FP_NORMAL | FP_ZERO );
426 #endif
427   }
428   __CRT_INLINE int __cdecl __fpclassify (double x) {
429 #if defined(__x86_64__) || defined(_AMD64_) || defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_)
430     __mingw_dbl_type_t hlp;
431     unsigned int l, h;
432 
433     hlp.x = x;
434     h = hlp.lh.high;
435     l = hlp.lh.low | (h & 0xfffff);
436     h &= 0x7ff00000;
437     if ((h | l) == 0)
438       return FP_ZERO;
439     if (!h)
440       return FP_SUBNORMAL;
441     if (h == 0x7ff00000)
442       return (l ? FP_NAN : FP_INFINITE);
443     return FP_NORMAL;
444 #elif defined(__i386__) || defined(_X86_)
445     unsigned short sw;
446     __asm__ __volatile__ ("fxam; fstsw %%ax;" : "=a" (sw): "t" (x));
447     return sw & (FP_NAN | FP_NORMAL | FP_ZERO );
448 #endif
449   }
450   __CRT_INLINE int __cdecl __fpclassifyf (float x) {
451 #if defined(__x86_64__) || defined(_AMD64_) || defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_)
452     __mingw_flt_type_t hlp;
453 
454     hlp.x = x;
455     hlp.val &= 0x7fffffff;
456     if (hlp.val == 0)
457       return FP_ZERO;
458     if (hlp.val < 0x800000)
459       return FP_SUBNORMAL;
460     if (hlp.val >= 0x7f800000)
461       return (hlp.val > 0x7f800000 ? FP_NAN : FP_INFINITE);
462     return FP_NORMAL;
463 #elif defined(__i386__) || defined(_X86_)
464     unsigned short sw;
465     __asm__ __volatile__ ("fxam; fstsw %%ax;" : "=a" (sw): "t" (x));
466     return sw & (FP_NAN | FP_NORMAL | FP_ZERO );
467 #endif
468   }
469 #endif
470 
471 #ifdef __STDC_WANT_DEC_FP__
472 #define __dfp_expansion(__call,__fin,x) \
473 __mingw_choose_expr (                                  \
474       __mingw_types_compatible_p (__typeof__ (x), _Decimal32),    \
475         __call##d32(x),                                         \
476     __mingw_choose_expr (                                     \
477       __mingw_types_compatible_p (__typeof__ (x), _Decimal64),    \
478         __call##d64(x),                                         \
479     __mingw_choose_expr (                                     \
480       __mingw_types_compatible_p (__typeof__ (x), _Decimal128),   \
481         __call##d128(x),                                        \
482 __fin)))
483 #else
484 #define __dfp_expansion(__call,__fin,x) __fin
485 #endif
486 
487 #define fpclassify(x) \
488 __mingw_choose_expr (                                         \
489   __mingw_types_compatible_p (__typeof__ (x), double),            \
490     __fpclassify(x),                                            \
491     __mingw_choose_expr (                                     \
492       __mingw_types_compatible_p (__typeof__ (x), float),         \
493         __fpclassifyf(x),                                       \
494     __mingw_choose_expr (                                     \
495       __mingw_types_compatible_p (__typeof__ (x), long double),   \
496         __fpclassifyl(x),                                       \
497     __dfp_expansion(__fpclassify,(__builtin_trap(),0),x))))
498 
499 
500 /* 7.12.3.2 */
501 #define isfinite(x) ((fpclassify(x) & FP_NAN) == 0)
502 
503 /* 7.12.3.3 */
504 #define isinf(x) (fpclassify(x) == FP_INFINITE)
505 
506 /* 7.12.3.4 */
507 /* We don't need to worry about truncation here:
508    A NaN stays a NaN. */
509 
510   extern int __cdecl __isnan (double);
511   extern int __cdecl __isnanf (float);
512   extern int __cdecl __isnanl (long double);
513 
514 #ifndef __CRT__NO_INLINE
515   __CRT_INLINE int __cdecl __isnan (double _x)
516   {
517 #if defined(__x86_64__) || defined(_AMD64_) || defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_)
518     __mingw_dbl_type_t hlp;
519     int l, h;
520 
521     hlp.x = _x;
522     l = hlp.lh.low;
523     h = hlp.lh.high & 0x7fffffff;
524     h |= (unsigned int) (l | -l) >> 31;
525     h = 0x7ff00000 - h;
526     return (int) ((unsigned int) h) >> 31;
527 #elif defined(__i386__) || defined(_X86_)
528     unsigned short sw;
529     __asm__ __volatile__ ("fxam;"
530       "fstsw %%ax": "=a" (sw) : "t" (_x));
531     return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
532       == FP_NAN;
533 #endif
534   }
535 
536   __CRT_INLINE int __cdecl __isnanf (float _x)
537   {
538 #if defined(__x86_64__) || defined(_AMD64_) || defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_)
539     __mingw_flt_type_t hlp;
540     int i;
541 
542     hlp.x = _x;
543     i = hlp.val & 0x7fffffff;
544     i = 0x7f800000 - i;
545     return (int) (((unsigned int) i) >> 31);
546 #elif defined(__i386__) || defined(_X86_)
547     unsigned short sw;
548     __asm__ __volatile__ ("fxam;"
549       "fstsw %%ax": "=a" (sw) : "t" (_x));
550     return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
551       == FP_NAN;
552 #endif
553   }
554 
555   __CRT_INLINE int __cdecl __isnanl (long double _x)
556   {
557 #if defined(__x86_64__) || defined(_AMD64_)
558     __mingw_ldbl_type_t ld;
559     int xx, signexp;
560 
561     ld.x = _x;
562     signexp = (ld.lh.sign_exponent & 0x7fff) << 1;
563     xx = (int) (ld.lh.low | (ld.lh.high & 0x7fffffffu)); /* explicit */
564     signexp |= (unsigned int) (xx | (-xx)) >> 31;
565     signexp = 0xfffe - signexp;
566     return (int) ((unsigned int) signexp) >> 16;
567 #elif defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_)
568     return __isnan(_x);
569 #elif defined(__i386__) || defined(_X86_)
570     unsigned short sw;
571     __asm__ __volatile__ ("fxam;"
572       "fstsw %%ax": "=a" (sw) : "t" (_x));
573     return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
574       == FP_NAN;
575 #endif
576   }
577 #endif
578 
579 
580 
581 #define isnan(x) \
582 __mingw_choose_expr (                                         \
583   __mingw_types_compatible_p (__typeof__ (x), double),            \
584     __isnan(x),                                                 \
585     __mingw_choose_expr (                                     \
586       __mingw_types_compatible_p (__typeof__ (x), float),         \
587         __isnanf(x),                                            \
588     __mingw_choose_expr (                                     \
589       __mingw_types_compatible_p (__typeof__ (x), long double),   \
590         __isnanl(x),                                            \
591     __dfp_expansion(__isnan,(__builtin_trap(),x),x))))
592 
593 /* 7.12.3.5 */
594 #define isnormal(x) (fpclassify(x) == FP_NORMAL)
595 
596 /* 7.12.3.6 The signbit macro */
597   extern int __cdecl __signbit (double);
598   extern int __cdecl __signbitf (float);
599   extern int __cdecl __signbitl (long double);
600 #ifndef __CRT__NO_INLINE
601   __CRT_INLINE int __cdecl __signbit (double x) {
602 #if defined(__x86_64__) || defined(_AMD64_) || defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_)
603     __mingw_dbl_type_t hlp;
604 
605     hlp.x = x;
606     return ((hlp.lh.high & 0x80000000) != 0);
607 #elif defined(__i386__) || defined(_X86_)
608     unsigned short stw;
609     __asm__ __volatile__ ( "fxam; fstsw %%ax;": "=a" (stw) : "t" (x));
610     return stw & 0x0200;
611 #endif
612   }
613 
614   __CRT_INLINE int __cdecl __signbitf (float x) {
615 #if defined(__x86_64__) || defined(_AMD64_) || defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_)
616     __mingw_flt_type_t hlp;
617     hlp.x = x;
618     return ((hlp.val & 0x80000000) != 0);
619 #elif defined(__i386__) || defined(_X86_)
620     unsigned short stw;
621     __asm__ __volatile__ ("fxam; fstsw %%ax;": "=a" (stw) : "t" (x));
622     return stw & 0x0200;
623 #endif
624   }
625 
626   __CRT_INLINE int __cdecl __signbitl (long double x) {
627 #if defined(__x86_64__) || defined(_AMD64_)
628     __mingw_ldbl_type_t ld;
629     ld.x = x;
630     return ((ld.lh.sign_exponent & 0x8000) != 0);
631 #elif defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_)
632     return __signbit(x);
633 #elif defined(__i386__) || defined(_X86_)
634     unsigned short stw;
635     __asm__ __volatile__ ("fxam; fstsw %%ax;": "=a" (stw) : "t" (x));
636     return stw & 0x0200;
637 #endif
638   }
639 #endif
640 
641 #define signbit(x) \
642 __mingw_choose_expr (                                         \
643   __mingw_types_compatible_p (__typeof__ (x), double),            \
644     __signbit(x),                                               \
645     __mingw_choose_expr (                                     \
646       __mingw_types_compatible_p (__typeof__ (x), float),         \
647         __signbitf(x),                                          \
648     __mingw_choose_expr (                                     \
649       __mingw_types_compatible_p (__typeof__ (x), long double),   \
650         __signbitl(x),                                          \
651      __dfp_expansion(__signbit,(__builtin_trap(),x),x))))
652 
653 /* 7.12.4 Trigonometric functions: Double in C89 */
654   extern float __cdecl sinf(float _X);
655   extern long double __cdecl sinl(long double);
656 
657   extern float __cdecl cosf(float _X);
658   extern long double __cdecl cosl(long double);
659 
660   extern float __cdecl tanf(float _X);
661   extern long double __cdecl tanl(long double);
662   extern float __cdecl asinf(float _X);
663   extern long double __cdecl asinl(long double);
664 
665   extern float __cdecl acosf (float);
666   extern long double __cdecl acosl (long double);
667 
668   extern float __cdecl atanf (float);
669   extern long double __cdecl atanl (long double);
670 
671   extern float __cdecl atan2f (float, float);
672   extern long double __cdecl atan2l (long double, long double);
673 
674 /* 7.12.5 Hyperbolic functions: Double in C89  */
675   extern float __cdecl sinhf(float _X);
676 #ifndef __CRT__NO_INLINE
677   __CRT_INLINE float sinhf(float _X) { return ((float)sinh((double)_X)); }
678 #endif
679   extern long double __cdecl sinhl(long double);
680 
681   extern float __cdecl coshf(float _X);
682 #ifndef __CRT__NO_INLINE
683   __CRT_INLINE float coshf(float _X) { return ((float)cosh((double)_X)); }
684 #endif
685   extern long double __cdecl coshl(long double);
686 
687   extern float __cdecl tanhf(float _X);
688 #ifndef __CRT__NO_INLINE
689   __CRT_INLINE float tanhf(float _X) { return ((float)tanh((double)_X)); }
690 #endif
691   extern long double __cdecl tanhl(long double);
692 
693 /* Inverse hyperbolic trig functions  */
694 /* 7.12.5.1 */
695   extern double __cdecl acosh (double);
696   extern float __cdecl acoshf (float);
697   extern long double __cdecl acoshl (long double);
698 
699 /* 7.12.5.2 */
700   extern double __cdecl asinh (double);
701   extern float __cdecl asinhf (float);
702   extern long double __cdecl asinhl (long double);
703 
704 /* 7.12.5.3 */
705   extern double __cdecl atanh (double);
706   extern float __cdecl atanhf  (float);
707   extern long double __cdecl atanhl (long double);
708 
709 /* Exponentials and logarithms  */
710 /* 7.12.6.1 Double in C89 */
711   extern float __cdecl expf(float _X);
712 #ifndef __CRT__NO_INLINE
713   __CRT_INLINE float expf(float _X) { return ((float)exp((double)_X)); }
714 #endif
715   extern long double __cdecl expl(long double);
716 
717 /* 7.12.6.2 */
718   extern double __cdecl exp2(double);
719   extern float __cdecl exp2f(float);
720   extern long double __cdecl exp2l(long double);
721 
722 /* 7.12.6.3 The expm1 functions */
723 /* TODO: These could be inlined */
724   extern double __cdecl expm1(double);
725   extern float __cdecl expm1f(float);
726   extern long double __cdecl expm1l(long double);
727 
728 /* 7.12.6.4 Double in C89 */
729   extern float frexpf(float _X,int *_Y);
730 #ifndef __CRT__NO_INLINE
731   __CRT_INLINE float frexpf(float _X,int *_Y) { return ((float)frexp((double)_X,_Y)); }
732 #endif
733   extern long double __cdecl frexpl(long double,int *);
734 
735 /* 7.12.6.5 */
736 #define FP_ILOGB0 ((int)0x80000000)
737 #define FP_ILOGBNAN ((int)0x7fffffff)
738   extern int __cdecl ilogb (double);
739   extern int __cdecl ilogbf (float);
740   extern int __cdecl ilogbl (long double);
741 
742 /* 7.12.6.6  Double in C89 */
743   extern float __cdecl ldexpf(float _X,int _Y);
744 #ifndef __CRT__NO_INLINE
745   __CRT_INLINE float __cdecl ldexpf (float x, int expn) { return (float) ldexp ((double)x, expn); }
746 #endif
747   extern long double __cdecl ldexpl (long double, int);
748 
749 /* 7.12.6.7 Double in C89 */
750   extern float __cdecl logf (float);
751   extern long double __cdecl logl(long double);
752 
753 /* 7.12.6.8 Double in C89 */
754   extern float __cdecl log10f (float);
755   extern long double __cdecl log10l(long double);
756 
757 /* 7.12.6.9 */
758   extern double __cdecl log1p(double);
759   extern float __cdecl log1pf(float);
760   extern long double __cdecl log1pl(long double);
761 
762 /* 7.12.6.10 */
763   extern double __cdecl log2 (double);
764   extern float __cdecl log2f (float);
765   extern long double __cdecl log2l (long double);
766 
767 /* 7.12.6.11 */
768   extern double __cdecl logb (double);
769   extern float __cdecl logbf (float);
770   extern long double __cdecl logbl (long double);
771 
772 #ifndef __CRT__NO_INLINE
773 /* When compiling with gcc, always use gcc's builtins.
774  * The asm inlines below are kept here for future reference:
775  * they were written for gcc and do no error handling
776  * (exceptions/errno), therefore only valid if __FAST_MATH__
777  * is defined (-ffast-math) .  */
778 #if 0 /*defined(__GNUC__) && defined(__FAST_MATH__)*/
779   __CRT_INLINE double __cdecl logb (double x)
780   {
781 #if defined(__x86_64__) || defined(_AMD64_) || defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_)
782   __mingw_dbl_type_t hlp;
783   int lx, hx;
784 
785   hlp.x = x;
786   lx = hlp.lh.low;
787   hx = hlp.lh.high & 0x7fffffff; /* high |x| */
788   if ((hx | lx) == 0)
789     return -1.0 / fabs (x);
790   if (hx >= 0x7ff00000)
791     return x * x;
792   if ((hx >>= 20) == 0) {
793     unsigned long long mantissa = hlp.val & 0xfffffffffffffULL;
794     return -1023.0 - (__builtin_clzll(mantissa) - 12);
795   }
796   return (double) (hx - 1023);
797 #elif defined(__i386__) || defined(_X86_)
798     double res = 0.0;
799     __asm__ __volatile__ ("fxtract\n\t"
800       "fstp	%%st" : "=t" (res) : "0" (x));
801     return res;
802 #endif
803   }
804 
805   __CRT_INLINE float __cdecl logbf (float x)
806   {
807 #if defined(__x86_64__) || defined(_AMD64_) || defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_)
808     int v;
809     __mingw_flt_type_t hlp;
810 
811     hlp.x = x;
812     v = hlp.val & 0x7fffffff;                     /* high |x| */
813     if (!v)
814       return (float)-1.0 / fabsf (x);
815     if (v >= 0x7f800000)
816     return x * x;
817     if ((v >>= 23) == 0)
818       return -127.0 - (__builtin_clzl(hlp.val & 0x7fffff) - 9);
819   return (float) (v - 127);
820 #elif defined(__i386__) || defined(_X86_)
821     float res = 0.0F;
822     __asm__ __volatile__ ("fxtract\n\t"
823       "fstp	%%st" : "=t" (res) : "0" (x));
824     return res;
825 #endif
826   }
827 
828   __CRT_INLINE long double __cdecl logbl (long double x)
829   {
830 #if defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_)
831   __mingw_ldbl_type_t hlp;
832   int lx, hx;
833 
834   hlp.x = x;
835   lx = hlp.lh.low;
836   hx = hlp.lh.high & 0x7fffffff; /* high |x| */
837   if ((hx | lx) == 0)
838     return -1.0 / fabs (x);
839   if (hx >= 0x7ff00000)
840     return x * x;
841   if ((hx >>= 20) == 0) {
842     unsigned long long mantissa = hlp.val & 0xfffffffffffffULL;
843     return -1023.0 - (__builtin_clzll(mantissa) - 12);
844   }
845   return (double) (hx - 1023);
846 #elif defined(__x86_64__) || defined(_AMD64_) || defined(__i386__) || defined(_X86_)
847     long double res = 0.0l;
848     __asm__ __volatile__ ("fxtract\n\t"
849       "fstp	%%st" : "=t" (res) : "0" (x));
850     return res;
851 #endif
852   }
853 #endif /* defined(__GNUC__) && defined(__FAST_MATH__) */
854 #endif /* __CRT__NO_INLINE */
855 
856 /* 7.12.6.12  Double in C89 */
857   extern float __cdecl modff (float, float*);
858   extern long double __cdecl modfl (long double, long double*);
859 
860 /* 7.12.6.13 */
861   extern double __cdecl scalbn (double, int);
862   extern float __cdecl scalbnf (float, int);
863   extern long double __cdecl scalbnl (long double, int);
864 
865   extern double __cdecl scalbln (double, long);
866   extern float __cdecl scalblnf (float, long);
867   extern long double __cdecl scalblnl (long double, long);
868 
869 /* 7.12.7.1 */
870 /* Implementations adapted from Cephes versions */
871   extern double __cdecl cbrt (double);
872   extern float __cdecl cbrtf (float);
873   extern long double __cdecl cbrtl (long double);
874 
875 /* 7.12.7.3  */
876   extern double __cdecl hypot (double, double) __MINGW_ATTRIB_DEPRECATED_MSVC2005; /* in libmoldname.a */
877   extern float __cdecl hypotf (float x, float y);
878 #ifndef __CRT__NO_INLINE
879   __CRT_INLINE float __cdecl hypotf (float x, float y) { return (float) hypot ((double)x, (double)y);}
880 #endif
881   extern long double __cdecl hypotl (long double, long double);
882 
883 /* 7.12.7.4 The pow functions. Double in C89 */
884   extern float __cdecl powf(float _X,float _Y);
885 #ifndef __CRT__NO_INLINE
886   __CRT_INLINE float powf(float _X,float _Y) { return ((float)pow((double)_X,(double)_Y)); }
887 #endif
888   extern long double __cdecl powl (long double, long double);
889 
890 /* 7.12.7.5 The sqrt functions. Double in C89. */
891   extern float __cdecl sqrtf (float);
892   extern long double sqrtl(long double);
893 
894 /* 7.12.8.1 The erf functions  */
895   extern double __cdecl erf (double);
896   extern float __cdecl erff (float);
897   extern long double __cdecl erfl (long double);
898 
899 /* 7.12.8.2 The erfc functions  */
900   extern double __cdecl erfc (double);
901   extern float __cdecl erfcf (float);
902   extern long double __cdecl erfcl (long double);
903 
904 /* 7.12.8.3 The lgamma functions */
905   extern double __cdecl lgamma (double);
906   extern float __cdecl lgammaf (float);
907   extern long double __cdecl lgammal (long double);
908 
909   extern int signgam;
910 
911 /* 7.12.8.4 The tgamma functions */
912   extern double __cdecl tgamma (double);
913   extern float __cdecl tgammaf (float);
914   extern long double __cdecl tgammal (long double);
915 
916 /* 7.12.9.1 Double in C89 */
917   extern float __cdecl ceilf (float);
918   extern long double __cdecl ceill (long double);
919 
920 /* 7.12.9.2 Double in C89 */
921   extern float __cdecl floorf (float);
922   extern long double __cdecl floorl (long double);
923 
924 /* 7.12.9.3 */
925   extern double __cdecl nearbyint ( double);
926   extern float __cdecl nearbyintf (float);
927   extern long double __cdecl nearbyintl (long double);
928 
929 /* 7.12.9.4 */
930 /* round, using fpu control word settings */
931 extern double __cdecl rint (double);
932 extern float __cdecl rintf (float);
933 extern long double __cdecl rintl (long double);
934 
935 /* 7.12.9.5 */
936 extern long __cdecl lrint (double);
937 extern long __cdecl lrintf (float);
938 extern long __cdecl lrintl (long double);
939 
940 __MINGW_EXTENSION long long __cdecl llrint (double);
941 __MINGW_EXTENSION long long __cdecl llrintf (float);
942 __MINGW_EXTENSION long long __cdecl llrintl (long double);
943 
944 #ifndef __CRT__NO_INLINE
945 /* When compiling with gcc, always use gcc's builtins.
946  * The asm inlines below are kept here for future reference:
947  * they were written for gcc and do no error handling
948  * (exceptions/errno), therefore only valid if __FAST_MATH__
949  * is defined (-ffast-math) .  */
950 #if 0 /*defined(__GNUC__) && defined(__FAST_MATH__)*/
951   __CRT_INLINE double __cdecl rint (double x)
952   {
953     double retval = 0.0;
954     __asm__ __volatile__ ("frndint;": "=t" (retval) : "0" (x));
955     return retval;
956   }
957 
958   __CRT_INLINE float __cdecl rintf (float x)
959   {
960     float retval = 0.0;
961     __asm__ __volatile__ ("frndint;" : "=t" (retval) : "0" (x) );
962     return retval;
963   }
964 
965   __CRT_INLINE long double __cdecl rintl (long double x)
966   {
967     long double retval = 0.0l;
968     __asm__ __volatile__ ("frndint;" : "=t" (retval) : "0" (x) );
969     return retval;
970   }
971 
972   __CRT_INLINE long __cdecl lrint (double x)
973   {
974     long retval = 0;
975     __asm__ __volatile__							      \
976       ("fistpl %0"  : "=m" (retval) : "t" (x) : "st");				      \
977       return retval;
978   }
979 
980   __CRT_INLINE long __cdecl lrintf (float x)
981   {
982     long retval = 0;
983     __asm__ __volatile__							      \
984       ("fistpl %0"  : "=m" (retval) : "t" (x) : "st");				      \
985       return retval;
986   }
987 
988   __CRT_INLINE long __cdecl lrintl (long double x)
989   {
990     long retval = 0;
991     __asm__ __volatile__							      \
992       ("fistpl %0"  : "=m" (retval) : "t" (x) : "st");				      \
993       return retval;
994   }
995 
996   __MINGW_EXTENSION __CRT_INLINE long long __cdecl llrint (double x)
997   {
998     __MINGW_EXTENSION long long retval = 0ll;
999     __asm__ __volatile__							      \
1000       ("fistpll %0"  : "=m" (retval) : "t" (x) : "st");				      \
1001       return retval;
1002   }
1003 
1004   __MINGW_EXTENSION __CRT_INLINE long long __cdecl llrintf (float x)
1005   {
1006     __MINGW_EXTENSION long long retval = 0ll;
1007     __asm__ __volatile__							      \
1008       ("fistpll %0"  : "=m" (retval) : "t" (x) : "st");				      \
1009       return retval;
1010   }
1011 
1012   __MINGW_EXTENSION __CRT_INLINE long long __cdecl llrintl (long double x)
1013   {
1014     __MINGW_EXTENSION long long retval = 0ll;
1015     __asm__ __volatile__							      \
1016       ("fistpll %0"  : "=m" (retval) : "t" (x) : "st");				      \
1017       return retval;
1018   }
1019 #endif /* defined(__GNUC__) && defined(__FAST_MATH__) */
1020 #endif /* !__CRT__NO_INLINE */
1021 
1022 /* 7.12.9.6 */
1023 /* round away from zero, regardless of fpu control word settings */
1024   extern double __cdecl round (double);
1025   extern float __cdecl roundf (float);
1026   extern long double __cdecl roundl (long double);
1027 
1028 /* 7.12.9.7  */
1029   extern long __cdecl lround (double);
1030   extern long __cdecl lroundf (float);
1031   extern long __cdecl lroundl (long double);
1032   __MINGW_EXTENSION long long __cdecl llround (double);
1033   __MINGW_EXTENSION long long __cdecl llroundf (float);
1034   __MINGW_EXTENSION long long __cdecl llroundl (long double);
1035 
1036 /* 7.12.9.8 */
1037 /* round towards zero, regardless of fpu control word settings */
1038   extern double __cdecl trunc (double);
1039   extern float __cdecl truncf (float);
1040   extern long double __cdecl truncl (long double);
1041 
1042 /* 7.12.10.1 Double in C89 */
1043   extern float __cdecl fmodf (float, float);
1044   extern long double __cdecl fmodl (long double, long double);
1045 
1046 /* 7.12.10.2 */
1047   extern double __cdecl remainder (double, double);
1048   extern float __cdecl remainderf (float, float);
1049   extern long double __cdecl remainderl (long double, long double);
1050 
1051 /* 7.12.10.3 */
1052   extern double __cdecl remquo(double, double, int *);
1053   extern float __cdecl remquof(float, float, int *);
1054   extern long double __cdecl remquol(long double, long double, int *);
1055 
1056 /* 7.12.11.1 */
1057   extern double __cdecl copysign (double, double); /* in libmoldname.a */
1058   extern float __cdecl copysignf (float, float);
1059   extern long double __cdecl copysignl (long double, long double);
1060 
1061 #ifndef __CRT__NO_INLINE
1062 #if !defined (__ia64__)
1063   __CRT_INLINE double __cdecl copysign (double x, double y)
1064   {
1065     __mingw_dbl_type_t hx, hy;
1066     hx.x = x; hy.x = y;
1067     hx.lh.high = (hx.lh.high & 0x7fffffff) | (hy.lh.high & 0x80000000);
1068     return hx.x;
1069   }
1070   __CRT_INLINE float __cdecl copysignf (float x, float y)
1071   {
1072     __mingw_flt_type_t hx, hy;
1073     hx.x = x; hy.x = y;
1074     hx.val = (hx.val & 0x7fffffff) | (hy.val & 0x80000000);
1075     return hx.x;
1076   }
1077 #endif
1078 #endif
1079 
1080 /* 7.12.11.2 Return a NaN */
1081   extern double __cdecl nan(const char *tagp);
1082   extern float __cdecl nanf(const char *tagp);
1083   extern long double __cdecl nanl(const char *tagp);
1084 
1085 #ifndef __STRICT_ANSI__
1086 #define _nan() nan("")
1087 #define _nanf() nanf("")
1088 #define _nanl() nanl("")
1089 #endif
1090 
1091 /* 7.12.11.3 */
1092   extern double __cdecl nextafter (double, double); /* in libmoldname.a */
1093   extern float __cdecl nextafterf (float, float);
1094   extern long double __cdecl nextafterl (long double, long double);
1095 
1096 /* 7.12.11.4 The nexttoward functions */
1097   extern double __cdecl nexttoward (double,  long double);
1098   extern float __cdecl nexttowardf (float,  long double);
1099   extern long double __cdecl nexttowardl (long double, long double);
1100 
1101 /* 7.12.12.1 */
1102 /*  x > y ? (x - y) : 0.0  */
1103   extern double __cdecl fdim (double x, double y);
1104   extern float __cdecl fdimf (float x, float y);
1105   extern long double __cdecl fdiml (long double x, long double y);
1106 
1107 /* fmax and fmin.
1108    NaN arguments are treated as missing data: if one argument is a NaN
1109    and the other numeric, then these functions choose the numeric
1110    value. */
1111 
1112 /* 7.12.12.2 */
1113   extern double __cdecl fmax  (double, double);
1114   extern float __cdecl fmaxf (float, float);
1115   extern long double __cdecl fmaxl (long double, long double);
1116 
1117 /* 7.12.12.3 */
1118   extern double __cdecl fmin (double, double);
1119   extern float __cdecl fminf (float, float);
1120   extern long double __cdecl fminl (long double, long double);
1121 
1122 /* 7.12.13.1 */
1123 /* return x * y + z as a ternary op */
1124   extern double __cdecl fma (double, double, double);
1125   extern float __cdecl fmaf (float, float, float);
1126   extern long double __cdecl fmal (long double, long double, long double);
1127 
1128 /* 7.12.14 */
1129 /*
1130  *  With these functions, comparisons involving quiet NaNs set the FP
1131  *  condition code to "unordered".  The IEEE floating-point spec
1132  *  dictates that the result of floating-point comparisons should be
1133  *  false whenever a NaN is involved, with the exception of the != op,
1134  *  which always returns true: yes, (NaN != NaN) is true).
1135  */
1136 
1137 #ifdef __GNUC__
1138 
1139 #define isgreater(x, y) __builtin_isgreater(x, y)
1140 #define isgreaterequal(x, y) __builtin_isgreaterequal(x, y)
1141 #define isless(x, y) __builtin_isless(x, y)
1142 #define islessequal(x, y) __builtin_islessequal(x, y)
1143 #define islessgreater(x, y) __builtin_islessgreater(x, y)
1144 #define isunordered(x, y) __builtin_isunordered(x, y)
1145 
1146 #else
1147 /*  helper  */
1148 #ifndef __CRT__NO_INLINE
1149   __CRT_INLINE int  __cdecl
1150     __fp_unordered_compare (long double x, long double y){
1151       unsigned short retval;
1152       __asm__ __volatile__ ("fucom %%st(1);"
1153 	"fnstsw;": "=a" (retval) : "t" (x), "u" (y));
1154       return retval;
1155   }
1156 #endif /* __GNUC__ */
1157 
1158 #define isgreater(x, y) ((__fp_unordered_compare(x, y)  & 0x4500) == 0)
1159 #define isless(x, y) ((__fp_unordered_compare (y, x)  & 0x4500) == 0)
1160 #define isgreaterequal(x, y) ((__fp_unordered_compare (x, y)  & FP_INFINITE) == 0)
1161 #define islessequal(x, y) ((__fp_unordered_compare(y, x)  & FP_INFINITE) == 0)
1162 #define islessgreater(x, y) ((__fp_unordered_compare(x, y)  & FP_SUBNORMAL) == 0)
1163 #define isunordered(x, y) ((__fp_unordered_compare(x, y)  & 0x4500) == 0x4500)
1164 
1165 #endif
1166 
1167 #endif /* __STDC_VERSION__ >= 199901L */
1168 #endif /* __NO_ISOCEXT */
1169 
1170 #if defined(_X86_) && !defined(__x86_64)
1171   _CRTIMP float __cdecl _hypotf(float _X,float _Y);
1172 #endif
1173 
1174 #if !defined(__ia64__)
1175    _CRTIMP float __cdecl _copysignf (float _Number,float _Sign);
1176    _CRTIMP float __cdecl _chgsignf (float _X);
1177    _CRTIMP float __cdecl _logbf(float _X);
1178    _CRTIMP float __cdecl _nextafterf(float _X,float _Y);
1179    _CRTIMP int __cdecl _finitef(float _X);
1180    _CRTIMP int __cdecl _isnanf(float _X);
1181    _CRTIMP int __cdecl _fpclassf(float _X);
1182 #endif
1183 
1184 #ifdef _SIGN_DEFINED
1185    extern long double __cdecl _chgsignl (long double);
1186 #define _copysignl copysignl
1187 #endif /* _SIGN_DEFINED */
1188 
1189 #define _hypotl hypotl
1190 
1191 #ifndef	NO_OLDNAMES
1192 #define matherr _matherr
1193 #define HUGE	_HUGE
1194 #endif
1195 
1196 /* Documentation on decimal float math
1197    http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801?ciid=8cf166fedd1aa110VgnVCM100000a360ea10RCRD
1198  */
1199 #ifdef __STDC_WANT_DEC_FP__
1200 
1201 #define DEC_INFINITY __builtin_infd32()
1202 #define DEC_NAN __builtin_nand32("")
1203 
1204   extern int __cdecl __isnand32(_Decimal32 x);
1205   extern int __cdecl __isnand64(_Decimal64 x);
1206   extern int __cdecl __isnand128(_Decimal128 x);
1207   extern int __cdecl __fpclassifyd32 (_Decimal32);
1208   extern int __cdecl __fpclassifyd64 (_Decimal64);
1209   extern int __cdecl __fpclassifyd128 (_Decimal128);
1210   extern int __cdecl __signbitd32 (_Decimal32);
1211   extern int __cdecl __signbitd64 (_Decimal64);
1212   extern int __cdecl __signbitd128 (_Decimal128);
1213 
1214 #ifndef __CRT__NO_INLINE
1215   __CRT_INLINE __cdecl __isnand32(_Decimal32 x){
1216     return __builtin_isnand32(x);
1217   }
1218 
1219   __CRT_INLINE __cdecl __isnand64(_Decimal64 x){
1220     return __builtin_isnand64(x);
1221   }
1222 
1223   __CRT_INLINE __cdecl __isnand128(_Decimal128 x){
1224     return __builtin_isnand128(x);
1225   }
1226 
1227   __CRT_INLINE int __cdecl __signbitd32 (_Decimal32 x){
1228     return __buintin_signbitd32(x);
1229   }
1230 
1231   __CRT_INLINE int __cdecl __signbitd64 (_Decimal64 x){
1232     return __buintin_signbitd64(x);
1233   }
1234 
1235   __CRT_INLINE int __cdecl __signbitd128 (_Decimal128 x){
1236     return __buintin_signbitd128(x);
1237   }
1238 
1239 #endif
1240 
1241 /* Still missing
1242 #define HUGE_VAL_D32
1243 #define HUGE_VAL_D64
1244 #define HUGE_VAL_D128
1245 */
1246 
1247 /*** exponentials ***/
1248 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/expd64.3m.htm */
1249 _Decimal64 __cdecl expd64(_Decimal64 _X);
1250 _Decimal128 __cdecl expd128(_Decimal128 _X);
1251 _Decimal32 __cdecl expd32(_Decimal32 _X);
1252 
1253 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/exp2d64.3m.htm */
1254 _Decimal64 __cdecl exp2d64(_Decimal64 _X);
1255 _Decimal128 __cdecl exp2d128(_Decimal128 _X);
1256 _Decimal32 __cdecl exp2d32(_Decimal32 _X);
1257 
1258 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/exp10d64.3m.htm */
1259 _Decimal64 __cdecl exp10d64(_Decimal64 _X);
1260 _Decimal128 __cdecl exp10d128(_Decimal128 _X);
1261 _Decimal32 __cdecl exp10d32(_Decimal32 _X);
1262 
1263 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/expm1d64.3m.htm */
1264 _Decimal64 __cdecl expm1d64(_Decimal64 _X);
1265 _Decimal128 __cdecl expm1d128(_Decimal128 _X);
1266 _Decimal32 __cdecl expm1d32(_Decimal32 _X);
1267 
1268 /*** logarithms ***/
1269 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/logd64.3m.htm */
1270 _Decimal64 __cdecl logd64(_Decimal64 _X);
1271 _Decimal128 __cdecl logd128(_Decimal128 _X);
1272 _Decimal32 __cdecl logd32(_Decimal32 _X);
1273 
1274 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/log2d64.3m.htm */
1275 _Decimal64 __cdecl log2d64(_Decimal64 _X);
1276 _Decimal128 __cdecl log2d128(_Decimal128 _X);
1277 _Decimal32 __cdecl log2d32(_Decimal32 _X);
1278 
1279 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/log10d64.3m.htm */
1280 _Decimal64 __cdecl log10d64(_Decimal64 _X);
1281 _Decimal128 __cdecl log10d128(_Decimal128 _X);
1282 _Decimal32 __cdecl log10d32(_Decimal32 _X);
1283 
1284 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/log1pd64.3m.htm */
1285 _Decimal64 __cdecl log1pd64(_Decimal64 _X);
1286 _Decimal128 __cdecl log1pd128(_Decimal128 _X);
1287 _Decimal32 __cdecl log1pd32(_Decimal32 _X);
1288 
1289 /*** trigonometrics ***/
1290 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/cosd64.3m.htm */
1291 _Decimal64 __cdecl cosd64(_Decimal64 _X);
1292 _Decimal128 __cdecl cosd128(_Decimal128 _X);
1293 _Decimal32 __cdecl cosd32(_Decimal32 _X);
1294 
1295 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/sind64.3m.htm */
1296 _Decimal64 __cdecl sind64(_Decimal64 _X);
1297 _Decimal128 __cdecl sind128(_Decimal128 _X);
1298 _Decimal32 __cdecl sind32(_Decimal32 _X);
1299 
1300 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/tand64.3m.htm */
1301 _Decimal64 __cdecl tand64(_Decimal64 _X);
1302 _Decimal128 __cdecl tand128(_Decimal128 _X);
1303 _Decimal32 __cdecl tand32(_Decimal32 _X);
1304 
1305 /*** inverse trigonometrics ***/
1306 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/acosd64.3m.htm */
1307 _Decimal64 __cdecl acosd64(_Decimal64 _X);
1308 _Decimal128 __cdecl acosd128(_Decimal128 _X);
1309 _Decimal32 __cdecl acosd32(_Decimal32 _X);
1310 
1311 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/asind64.3m.htm */
1312 _Decimal64 __cdecl asind64(_Decimal64 _X);
1313 _Decimal128 __cdecl asind128(_Decimal128 _X);
1314 _Decimal32 __cdecl asind32(_Decimal32 _X);
1315 
1316 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/atand64.3m.htm */
1317 _Decimal64 __cdecl atand64(_Decimal64 _X);
1318 _Decimal128 __cdecl atand128(_Decimal128 _X);
1319 _Decimal32 __cdecl atand32(_Decimal32 _X);
1320 
1321 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/atan2d64.3m.htm */
1322 _Decimal64 __cdecl atan2d64(_Decimal64 _X, _Decimal64 _Y);
1323 _Decimal128 __cdecl atan2d128(_Decimal128 _X, _Decimal128 _Y);
1324 _Decimal32 __cdecl atan2d32(_Decimal32 _X, _Decimal32 _Y);
1325 
1326 /*** hyperbolics ***/
1327 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/coshd64.3m.htm */
1328 _Decimal64 __cdecl coshd64(_Decimal64 _X);
1329 _Decimal128 __cdecl coshd128(_Decimal128 _X);
1330 _Decimal32 __cdecl coshd32(_Decimal32 _X);
1331 
1332 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/sinhd64.3m.htm */
1333 _Decimal64 __cdecl sinhd64(_Decimal64 _X);
1334 _Decimal128 __cdecl sinhd128(_Decimal128 _X);
1335 _Decimal32 __cdecl sinhd32(_Decimal32 _X);
1336 
1337 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/tanhd64.3m.htm */
1338 _Decimal64 __cdecl tanhd64(_Decimal64 _X);
1339 _Decimal128 __cdecl tanhd128(_Decimal128 _X);
1340 _Decimal32 __cdecl tanhd32(_Decimal32 _X);
1341 
1342 /*** inverse hyperbolics ***/
1343 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/acoshd64.3m.htm */
1344 _Decimal64 __cdecl acoshd64(_Decimal64 _X);
1345 _Decimal128 __cdecl acoshd128(_Decimal128 _X);
1346 _Decimal32 __cdecl acoshd32(_Decimal32 _X);
1347 
1348 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/asinhd64.3m.htm */
1349 _Decimal64 __cdecl asinhd64(_Decimal64 _X);
1350 _Decimal128 __cdecl asinhd128(_Decimal128 _X);
1351 _Decimal32 __cdecl asinhd32(_Decimal32 _X);
1352 
1353 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/atanhd64.3m.htm */
1354 _Decimal64 __cdecl atanhd64(_Decimal64 _X);
1355 _Decimal128 __cdecl atanhd128(_Decimal128 _X);
1356 _Decimal32 __cdecl atanhd32(_Decimal32 _X);
1357 
1358 /*** square & cube roots, hypotenuse ***/
1359 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/sqrtd64.3m.htm */
1360 _Decimal64 __cdecl sqrtd64(_Decimal64 _X);
1361 _Decimal128 __cdecl sqrtd128(_Decimal128 _X);
1362 _Decimal32 __cdecl sqrtd32(_Decimal32 _X);
1363 
1364 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/cbrtd64.3m.htm */
1365 _Decimal64 __cdecl cbrtd64(_Decimal64 _X);
1366 _Decimal128 __cdecl cbrtd128(_Decimal128 _X);
1367 _Decimal32 __cdecl cbrtd32(_Decimal32 _X);
1368 
1369 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/hypotd64.3m.htm */
1370 _Decimal64 __cdecl hypotd64(_Decimal64 _X, _Decimal64 _Y);
1371 _Decimal128 __cdecl hypotd128(_Decimal128 _X, _Decimal128 _Y);
1372 _Decimal32 __cdecl hypotd32(_Decimal32 _X, _Decimal32 _Y);
1373 
1374 /*** floating multiply-add ***/
1375 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/fmad64.3m.htm */
1376 _Decimal64 __cdecl fmad64(_Decimal64 _X, _Decimal64 y, _Decimal64 _Z);
1377 _Decimal128 __cdecl fmad128(_Decimal128 _X, _Decimal128 y, _Decimal128 _Z);
1378 _Decimal32 __cdecl fmad32(_Decimal32 _X, _Decimal32 y, _Decimal32 _Z);
1379 
1380 /*** exponent/significand ***/
1381 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/logbd64.3m.htm */
1382 _Decimal64 __cdecl logbd64(_Decimal64 _X);
1383 _Decimal128 __cdecl logbd128(_Decimal128 _X);
1384 _Decimal32 __cdecl logbd32(_Decimal32 _X);
1385 
1386 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/ilogbd64.3m.htm */
1387 int __cdecl ilogbd64(_Decimal64 _X);
1388 int __cdecl ilogbd128(_Decimal128 _X);
1389 int __cdecl ilogbd32(_Decimal32 _X);
1390 
1391 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/frexpd64.3m.htm */
1392 _Decimal64 __cdecl frexpd64(_Decimal64 _X, int *_Y);
1393 _Decimal128 __cdecl frexpd128(_Decimal128 _X, int *_Y);
1394 _Decimal32 __cdecl frexpd32(_Decimal32 _X, int *_Y);
1395 
1396 /*** quantum ***/
1397 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/quantized64.3m.htm */
1398 _Decimal64 __cdecl quantized64(_Decimal64 _X, _Decimal64 _Y);
1399 _Decimal128 __cdecl quantized128(_Decimal128 _X, _Decimal128 _Y);
1400 _Decimal32 __cdecl quantized32(_Decimal32 _X, _Decimal32 _Y);
1401 
1402 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/samequantumd64.3m.htm */
1403 _Bool __cdecl samequantumd64(_Decimal64 _X, _Decimal64 _Y);
1404 _Bool __cdecl samequantumd128(_Decimal128 _X, _Decimal128 _Y);
1405 _Bool __cdecl samequantumd32(_Decimal32 _X, _Decimal32 _Y);
1406 
1407 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/quantexpd64.3m.htm */
1408 int __cdecl quantexpd64(_Decimal64 _X);
1409 int __cdecl quantexpd128(_Decimal128 _X);
1410 int __cdecl quantexpd32(_Decimal32 _X);
1411 
1412 /*** scaling ***/
1413 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/scalbnd64.3m.htm */
1414 _Decimal64 __cdecl scalbnd64(_Decimal64 _X, int _Y);
1415 _Decimal128 __cdecl scalbnd128(_Decimal128 _X, int _Y);
1416 _Decimal32 __cdecl scalbnd32(_Decimal32 _X, int _Y);
1417 
1418 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/scalblnd64.3m.htm */
1419 _Decimal64 __cdecl scalblnd64(_Decimal64 _X, long int _Y);
1420 _Decimal128 __cdecl scalblnd128(_Decimal128 _X, long int _Y);
1421 _Decimal32 __cdecl scalblnd32(_Decimal32 _X, long int _Y);
1422 
1423 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/ldexpd64.3m.htm */
1424 _Decimal64 __cdecl ldexpd64(_Decimal64 _X, int _Y);
1425 _Decimal128 __cdecl ldexpd128(_Decimal128 _X, int _Y);
1426 _Decimal32 __cdecl ldexpd32(_Decimal32 _X, int _Y);
1427 
1428 /*** rounding to integral floating ***/
1429 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/ceild64.3m.htm */
1430 _Decimal64 __cdecl ceild64(_Decimal64 _X);
1431 _Decimal128 __cdecl ceild128(_Decimal128 _X);
1432 _Decimal32 __cdecl ceild32(_Decimal32 _X);
1433 
1434 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/floord64.3m.htm */
1435 _Decimal64 __cdecl floord64(_Decimal64 _X);
1436 _Decimal128 __cdecl floord128(_Decimal128 _X);
1437 _Decimal32 __cdecl floord32(_Decimal32 _X);
1438 
1439 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/truncd64.3m.htm */
1440 _Decimal64 __cdecl truncd64(_Decimal64 _X);
1441 _Decimal128 __cdecl truncd128(_Decimal128 _X);
1442 _Decimal32 __cdecl truncd32(_Decimal32 _X);
1443 
1444 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/roundd64.3m.htm */
1445 _Decimal64 __cdecl roundd64(_Decimal64 _X);
1446 _Decimal128 __cdecl roundd128(_Decimal128 _X);
1447 _Decimal32 __cdecl roundd32(_Decimal32 _X);
1448 
1449 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/rintd64.3m.htm */
1450 _Decimal64 __cdecl rintd64(_Decimal64 _X);
1451 _Decimal128 __cdecl rintd128(_Decimal128 _X);
1452 _Decimal32 __cdecl rintd32(_Decimal32 _X);
1453 
1454 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/nearbyintd64.3m.htm */
1455 _Decimal64 __cdecl nearbyintd64(_Decimal64 _X);
1456 _Decimal128 __cdecl nearbyintd128(_Decimal128 _X);
1457 _Decimal32 __cdecl nearbyintd32(_Decimal32 _X);
1458 
1459 /*** rounding to integer ***/
1460 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/lroundd64.3m.htm */
1461 long int __cdecl lroundd64(_Decimal64 _X);
1462 long int __cdecl lroundd128(_Decimal128 _X);
1463 long int __cdecl lroundd32(_Decimal32 _X);
1464 
1465 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/llroundd64.3m.htm */
1466 long long int __cdecl llroundd64(_Decimal64 _X);
1467 long long int __cdecl llroundd128(_Decimal128 _X);
1468 long long int __cdecl llroundd32(_Decimal32 _X);
1469 
1470 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/lrintd64.3m.htm */
1471 long int __cdecl lrintd64(_Decimal64 _X);
1472 long int __cdecl lrintd128(_Decimal128 _X);
1473 long int __cdecl lrintd32(_Decimal32 _X);
1474 
1475 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/llrintd64.3m.htm */
1476 long long int __cdecl llrintd64(_Decimal64 _X);
1477 long long int __cdecl llrintd128(_Decimal128 _X);
1478 long long int __cdecl llrintd32(_Decimal32 _X);
1479 
1480 /*** integral and fractional parts ***/
1481 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/modfd64.3m.htm */
1482 _Decimal64 __cdecl modfd64(_Decimal64 _X, _Decimal64 *_Y);
1483 _Decimal128 __cdecl modfd128(_Decimal128 _X, _Decimal128 *_Y);
1484 _Decimal32 __cdecl modfd32(_Decimal32 _X, _Decimal32 *_Y);
1485 
1486 /** remainder/mod ***/
1487 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/remainderd64.3m.htm */
1488 _Decimal64 __cdecl remainderd64(_Decimal64 _X, _Decimal64 _Y);
1489 _Decimal128 __cdecl remainderd128(_Decimal128 _X, _Decimal128 _Y);
1490 _Decimal32 __cdecl remainderd32(_Decimal32 _X, _Decimal32 _Y);
1491 
1492 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/fmodd64.3m.htm */
1493 _Decimal64 __cdecl fmodd64(_Decimal64 _X, _Decimal64 _Y);
1494 _Decimal128 __cdecl fmodd128(_Decimal128 _X, _Decimal128 _Y);
1495 _Decimal32 __cdecl fmodd32(_Decimal32 _X, _Decimal32 _Y);
1496 
1497 /*** error functions ***/
1498 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/erfd64.3m.htm */
1499 _Decimal64 __cdecl erfd64(_Decimal64 _X);
1500 _Decimal128 __cdecl erfd128(_Decimal128 _X);
1501 _Decimal32 __cdecl erfd32(_Decimal32 _X);
1502 _Decimal64 __cdecl erfcd64(_Decimal64 _X);
1503 _Decimal128 __cdecl erfcd128(_Decimal128 _X);
1504 _Decimal32 __cdecl erfcd32(_Decimal32 _X);
1505 
1506 /*** gamma functions ***/
1507 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/lgammad64.3m.htm */
1508 _Decimal64 __cdecl lgammad64(_Decimal64 _X);
1509 _Decimal128 __cdecl lgammad128(_Decimal128 _X);
1510 _Decimal32 __cdecl lgammad32(_Decimal32 _X);
1511 
1512 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/tgammad64.3m.htm */
1513 _Decimal64 __cdecl tgammad64(_Decimal64 _X);
1514 _Decimal128 __cdecl tgammad128(_Decimal128 _X);
1515 _Decimal32 __cdecl tgammad32(_Decimal32 _X);
1516 
1517 /*** next value ***/
1518 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/nextafterd64.3m.htm */
1519 _Decimal64 __cdecl nextafterd64(_Decimal64 _X, _Decimal64 _Y);
1520 _Decimal128 __cdecl nextafterd128(_Decimal128 _X, _Decimal128 _Y);
1521 _Decimal32 __cdecl nextafterd32(_Decimal32 _X, _Decimal32 _Y);
1522 _Decimal64 __cdecl nexttowardd64(_Decimal64 _X, _Decimal128 _Y);
1523 _Decimal128 __cdecl nexttowardd128(_Decimal128 _X, _Decimal128 _Y);
1524 _Decimal32 __cdecl nexttowardd32(_Decimal32 _X, _Decimal128 _Y);
1525 
1526 /*** absolute value, copy sign ***/
1527 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/fabsd64.3m.htm */
1528 _Decimal64 __cdecl fabsd64(_Decimal64 _X);
1529 _Decimal128 __cdecl fabsd128(_Decimal128 _X);
1530 _Decimal32 __cdecl fabsd32(_Decimal32 _X);
1531 
1532 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/copysignd64.3m.htm */
1533 _Decimal64 __cdecl copysignd64(_Decimal64 _X, _Decimal64 _Y);
1534 _Decimal128 __cdecl copysignd128(_Decimal128 _X, _Decimal128 _Y);
1535 _Decimal32 __cdecl copysignd32(_Decimal32 _X, _Decimal32 _Y);
1536 
1537 /*** max, min, positive difference ***/
1538 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/fmaxd64.3m.htm */
1539 _Decimal64 __cdecl fmaxd64(_Decimal64 _X, _Decimal64 y_Y);
1540 _Decimal128 __cdecl fmaxd128(_Decimal128 _X, _Decimal128 _Y);
1541 _Decimal32 __cdecl fmaxd32(_Decimal32 _X, _Decimal32 _Y);
1542 
1543 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/fmind64.3m.htm */
1544 _Decimal64 __cdecl fmind64(_Decimal64 _X, _Decimal64 _Y);
1545 _Decimal128 __cdecl fmind128(_Decimal128 _X, _Decimal128 _Y);
1546 _Decimal32 __cdecl fmind32(_Decimal32 _X, _Decimal32 _Y);
1547 
1548 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/fdimd64.3m.htm */
1549 _Decimal64 __cdecl fdimd64(_Decimal64 _X, _Decimal64 _Y);
1550 _Decimal128 __cdecl fdimd128(_Decimal128 _X, _Decimal128 _Y);
1551 _Decimal32 __cdecl fdimd32(_Decimal32 _X, _Decimal32 _Y);
1552 
1553 /*** not-a-number ***/
1554 /* http://h21007.www2.hp.com/portal/download/files/unprot/fp/manpages/nand64.3m.htm */
1555 _Decimal64 __cdecl nand64(__UNUSED_PARAM(const char *_X));
1556 _Decimal128 __cdecl nand128(__UNUSED_PARAM(const char *_X));
1557 _Decimal32 __cdecl nand32(__UNUSED_PARAM(const char *_X));
1558 
1559 /*** classifiers ***/
1560 int __cdecl isinfd64(_Decimal64 _X);
1561 int __cdecl isinfd128(_Decimal128 _X);
1562 int __cdecl isinfd32(_Decimal32 _X);
1563 int __cdecl isnand64(_Decimal64 _X);
1564 int __cdecl isnand128(_Decimal128 _X);
1565 int __cdecl isnand32(_Decimal32 _X);
1566 
1567 #endif /* __STDC_WANT_DEC_FP__ */
1568 
1569 #ifdef __cplusplus
1570 }
1571 #endif
1572 
1573 #endif	/* Not RC_INVOKED */
1574 
1575 #pragma pack(pop)
1576 
1577 #endif /* End _MATH_H_ */
1578 
1579