ReactOS 0.4.15-dev-8413-gc1c91f2
xmath.h
Go to the documentation of this file.
1
6#ifndef _XMATH
7#define _XMATH
8#include <errno.h>
9#include <math.h>
10#include <stddef.h>
11#include <ymath.h>
12
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
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
90extern _CRTIMP 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
97extern _CRTIMP 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
105extern _CRTIMP long double _LXbig;
108#endif
#define __cdecl
Definition: accygwin.h:79
#define _CRTIMP
Definition: crtdefs.h:72
Definition: ymath.h:25
_CRTIMP double __cdecl _Poly(double, const double *, int)
_CRTIMP short __cdecl _FDscale(float *, long)
_C_LIB_DECL _CRTIMP int __cdecl _Stopfx(const char **, char **)
_CRTIMP short __cdecl _FDnorm(unsigned short *)
_CRTIMP _Dconst _FRteps
Definition: xmath.h:96
_CRTIMP _Dconst _Rteps
Definition: xmath.h:89
_CRTIMP int __cdecl _WStoflt(const wchar_t *, const wchar_t *, wchar_t **, long[], int)
_CRTIMP short __cdecl _LDunscale(short *, long double *)
_CRTIMP short __cdecl _Dunscale(short *, double *)
_CRTIMP short __cdecl _Dscale(double *, long)
_CRTIMP long double __cdecl _LPoly(long double, const long double *, int)
_CRTIMP float _FXbig
_CRTIMP short __cdecl _FDunscale(short *, float *)
_CRTIMP _Dconst _Eps
_CRTIMP _Dconst _LEps
_CRTIMP short __cdecl _Dnorm(unsigned short *)
_CRTIMP int __cdecl _Stoxflt(const char *, const char *, char **, long[], int)
_CRTIMP short __cdecl _LDscale(long double *, long)
_CRTIMP _Dconst _FEps
_CRTIMP _Dconst _LRteps
Definition: xmath.h:104
_CRTIMP short __cdecl _LDnorm(unsigned short *)
_CRTIMP double _Xbig
_CRTIMP long double _LXbig
_CRTIMP int __cdecl _WStopfx(const wchar_t **, wchar_t **)
_CRTIMP int __cdecl _Stoflt(const char *, const char *, char **, long[], int)
_CRTIMP int __cdecl _WStoxflt(const wchar_t *, const wchar_t *, wchar_t **, long[], int)
#define _C_LIB_DECL
Definition: yvals.h:159
#define _C_STD_BEGIN
Definition: yvals.h:155
#define _END_C_LIB_DECL
Definition: yvals.h:160
#define _C_STD_END
Definition: yvals.h:156