source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/xmath.h@ 1194

Last change on this file since 1194 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 3.2 KB
RevLine 
[1166]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 _XMATH
7#define _XMATH
8#include <errno.h>
9#include <math.h>
10#include <stddef.h>
11#include <ymath.h>
12
13_C_STD_BEGIN
14
15#define _DBIAS 0x3fe
16#define _DOFF 4
17#define _FBIAS 0x7e
18#define _FOFF 7
19#define _FRND 1
20
21#define _D0 3
22#define _D1 2
23#define _D2 1
24#define _D3 0
25#define _DLONG 0
26#define _LBIAS 0x3fe
27#define _LOFF 4
28
29#define _DFRAC ((unsigned short)((1 << _DOFF) - 1))
30#define _DMASK ((unsigned short)(0x7fff & ~_DFRAC))
31#define _DMAX ((unsigned short)((1 << (15 - _DOFF)) - 1))
32#define _DSIGN ((unsigned short)0x8000)
33#define DSIGN(x) (((unsigned short *)&(x))[_D0] & _DSIGN)
34#define HUGE_EXP (int)(_DMAX *900L / 1000)
35#define HUGE_RAD 2.73e9
36#define SAFE_EXP ((unsigned short)(_DMAX >> 1))
37
38#define _FFRAC ((unsigned short)((1 << _FOFF) - 1))
39#define _FMASK ((unsigned short)(0x7fff & ~_FFRAC))
40#define _FMAX ((unsigned short)((1 << (15 - _FOFF)) - 1))
41#define _FSIGN ((unsigned short)0x8000)
42#define FSIGN(x) (((unsigned short *)&(x))[_F0] & _FSIGN)
43#define FHUGE_EXP (int)(_FMAX *900L / 1000)
44#define FHUGE_RAD 31.8
45#define FSAFE_EXP ((unsigned short)(_FMAX >> 1))
46
47#define _F0 1
48#define _F1 0
49
50#define _LFRAC ((unsigned short)(-1))
51#define _LMASK ((unsigned short)0x7fff)
52#define _LMAX ((unsigned short)0x7fff)
53#define _LSIGN ((unsigned short)0x8000)
54#define LSIGN(x) (((unsigned short *)&(x))[_L0] & _LSIGN)
55#define LHUGE_EXP (int)(_LMAX *900L / 1000)
56#define LHUGE_RAD 2.73e9
57#define LSAFE_EXP ((unsigned short)(_LMAX >> 1))
58
59#define _L0 3
60#define _L1 2
61#define _L2 1
62#define _L3 0
63#define _L4 xxx
64
65#define FINITE _FINITE
66#define INF _INFCODE
67#define NAN _NANCODE
68
69#define FL_ERR 0
70#define FL_DEC 1
71#define FL_HEX 2
72#define FL_INF 3
73#define FL_NAN 4
74#define FL_NEG 8
75
76_C_LIB_DECL
77
78_CRTIMP int __cdecl _Stopfx(const char **,char **);
79_CRTIMP int __cdecl _Stoflt(const char *,const char *,char **,long[],int);
80_CRTIMP int __cdecl _Stoxflt(const char *,const char *,char **,long[],int);
81_CRTIMP int __cdecl _WStopfx(const wchar_t **,wchar_t **);
82_CRTIMP int __cdecl _WStoflt(const wchar_t *,const wchar_t *,wchar_t **,long[],int);
83_CRTIMP int __cdecl _WStoxflt(const wchar_t *,const wchar_t *,wchar_t **,long[],int);
84_CRTIMP short __cdecl _Dnorm(unsigned short *);
85_CRTIMP short __cdecl _Dscale(double *,long);
86_CRTIMP short __cdecl _Dunscale(short *,double *);
87_CRTIMP double __cdecl _Poly(double,const double *,int);
88
89extern __declspec(dllimport) _Dconst _Eps,_Rteps;
90extern __declspec(dllimport) double _Xbig;
91
92_CRTIMP short __cdecl _FDnorm(unsigned short *);
93_CRTIMP short __cdecl _FDscale(float *,long);
94_CRTIMP short __cdecl _FDunscale(short *,float *);
95
96extern __declspec(dllimport) _Dconst _FEps,_FRteps;
97extern __declspec(dllimport) float _FXbig;
98
99_CRTIMP short __cdecl _LDnorm(unsigned short *);
100_CRTIMP short __cdecl _LDscale(long double *,long);
101_CRTIMP short __cdecl _LDunscale(short *,long double *);
102_CRTIMP long double __cdecl _LPoly(long double,const long double *,int);
103
104extern __declspec(dllimport) _Dconst _LEps,_LRteps;
105extern __declspec(dllimport) long double _LXbig;
106_END_C_LIB_DECL
107_C_STD_END
108#endif
Note: See TracBrowser for help on using the repository browser.