25 #ifndef _CRT_MANAGED_FP_DEPRECATE
26 #ifdef _CRT_MANAGED_FP_NO_DEPRECATE
27 #define _CRT_MANAGED_FP_DEPRECATE
30 #define _CRT_MANAGED_FP_DEPRECATE _CRT_DEPRECATE_TEXT("Direct floating point control is not supported or reliable from within managed code. ")
32 #define _CRT_MANAGED_FP_DEPRECATE
59 #if defined(_M_FP_FAST)
60 #define FLT_EVAL_METHOD -1
64 #define FLT_EVAL_METHOD 0
66 #define FLT_EVAL_METHOD 2
69 #define FLT_EVAL_METHOD 0
74 #define DBL_EPSILON 2.2204460492503131e-016
75 #define DBL_MANT_DIG 53
76 #define DBL_MAX 1.7976931348623158e+308
77 #define DBL_MAX_10_EXP 308
78 #define DBL_MAX_EXP 1024
79 #define DBL_MIN 2.2250738585072014e-308
80 #define DBL_MIN_10_EXP (-307)
81 #define DBL_MIN_EXP (-1021)
86 #define FLT_EPSILON 1.192092896e-07F
88 #define FLT_MANT_DIG 24
89 #define FLT_MAX 3.402823466e+38F
90 #define FLT_MAX_10_EXP 38
91 #define FLT_MAX_EXP 128
92 #define FLT_MIN 1.175494351e-38F
93 #define FLT_MIN_10_EXP (-37)
94 #define FLT_MIN_EXP (-125)
95 #define FLT_NORMALIZE 0
99 #define LDBL_DIG DBL_DIG
100 #define LDBL_EPSILON DBL_EPSILON
101 #define LDBL_MANT_DIG DBL_MANT_DIG
102 #define LDBL_MAX DBL_MAX
103 #define LDBL_MAX_10_EXP DBL_MAX_10_EXP
104 #define LDBL_MAX_EXP DBL_MAX_EXP
105 #define LDBL_MIN DBL_MIN
106 #define LDBL_MIN_10_EXP DBL_MIN_10_EXP
107 #define LDBL_MIN_EXP DBL_MIN_EXP
108 #define _LDBL_RADIX DBL_RADIX
109 #define _LDBL_ROUNDS DBL_ROUNDS
111 #define DECIMAL_DIG 10
118 #pragma warning(push)
119 #pragma warning(disable: 4141)
127 #if defined (_M_IX86)
131 #define _clear87 _clearfp
132 #define _status87 _statusfp
138 #define _SW_INEXACT 0x00000001
139 #define _SW_UNDERFLOW 0x00000002
140 #define _SW_OVERFLOW 0x00000004
141 #define _SW_ZERODIVIDE 0x00000008
142 #define _SW_INVALID 0x00000010
143 #define _SW_DENORMAL 0x00080000
148 #define _EM_AMBIGUIOUS 0x80000000
149 #define _EM_AMBIGUOUS 0x80000000
154 #define _MCW_EM 0x0008001f
155 #define _EM_INEXACT 0x00000001
156 #define _EM_UNDERFLOW 0x00000002
157 #define _EM_OVERFLOW 0x00000004
158 #define _EM_ZERODIVIDE 0x00000008
159 #define _EM_INVALID 0x00000010
160 #define _EM_DENORMAL 0x00080000
162 #define _MCW_RC 0x00000300
163 #define _RC_NEAR 0x00000000
164 #define _RC_DOWN 0x00000100
165 #define _RC_UP 0x00000200
166 #define _RC_CHOP 0x00000300
171 #define _MCW_PC 0x00030000
172 #define _PC_64 0x00000000
173 #define _PC_53 0x00010000
174 #define _PC_24 0x00020000
176 #define _MCW_IC 0x00040000
177 #define _IC_AFFINE 0x00040000
178 #define _IC_PROJECTIVE 0x00000000
184 #define _MCW_DN 0x03000000
185 #define _DN_SAVE 0x00000000
186 #define _DN_FLUSH 0x01000000
187 #define _DN_FLUSH_OPERANDS_SAVE_RESULTS 0x02000000
188 #define _DN_SAVE_OPERANDS_FLUSH_RESULTS 0x03000000
192 #if defined (_M_IX86)
194 #define _CW_DEFAULT ( _RC_NEAR + _PC_53 + _EM_INVALID + _EM_ZERODIVIDE + _EM_OVERFLOW + _EM_UNDERFLOW + _EM_INEXACT + _EM_DENORMAL)
196 #elif defined (_M_X64) || defined (_M_ARM)
198 #define _CW_DEFAULT ( _RC_NEAR + _EM_INVALID + _EM_ZERODIVIDE + _EM_OVERFLOW + _EM_UNDERFLOW + _EM_INEXACT + _EM_DENORMAL)
203 #if defined (_M_IX86)
211 #define _fpecode (*__fpecode())
215 #define _SW_UNEMULATED 0x0040
216 #define _SW_SQRTNEG 0x0080
217 #define _SW_STACKOVERFLOW 0x0200
218 #define _SW_STACKUNDERFLOW 0x0400
222 #define _FPE_INVALID 0x81
223 #define _FPE_DENORMAL 0x82
224 #define _FPE_ZERODIVIDE 0x83
225 #define _FPE_OVERFLOW 0x84
226 #define _FPE_UNDERFLOW 0x85
227 #define _FPE_INEXACT 0x86
229 #define _FPE_UNEMULATED 0x87
230 #define _FPE_SQRTNEG 0x88
231 #define _FPE_STACKOVERFLOW 0x8a
232 #define _FPE_STACKUNDERFLOW 0x8b
234 #define _FPE_EXPLICITGEN 0x8c
236 #define _FPE_MULTIPLE_TRAPS 0x8d
237 #define _FPE_MULTIPLE_FAULTS 0x8e
254 #define _FPCLASS_SNAN 0x0001
255 #define _FPCLASS_QNAN 0x0002
256 #define _FPCLASS_NINF 0x0004
257 #define _FPCLASS_NN 0x0008
258 #define _FPCLASS_ND 0x0010
259 #define _FPCLASS_NZ 0x0020
260 #define _FPCLASS_PZ 0x0040
261 #define _FPCLASS_PD 0x0080
262 #define _FPCLASS_PN 0x0100
263 #define _FPCLASS_PINF 0x0200
270 #define clear87 _clear87
271 #define status87 _status87
272 #define control87 _control87
276 #define DBL_RADIX _DBL_RADIX
277 #define DBL_ROUNDS _DBL_ROUNDS
279 #define LDBL_RADIX _LDBL_RADIX
280 #define LDBL_ROUNDS _LDBL_ROUNDS
282 #define EM_AMBIGUIOUS _EM_AMBIGUOUS
283 #define EM_AMBIGUOUS _EM_AMBIGUOUS
285 #define MCW_EM _MCW_EM
286 #define EM_INVALID _EM_INVALID
287 #define EM_DENORMAL _EM_DENORMAL
288 #define EM_ZERODIVIDE _EM_ZERODIVIDE
289 #define EM_OVERFLOW _EM_OVERFLOW
290 #define EM_UNDERFLOW _EM_UNDERFLOW
291 #define EM_INEXACT _EM_INEXACT
293 #define MCW_IC _MCW_IC
294 #define IC_AFFINE _IC_AFFINE
295 #define IC_PROJECTIVE _IC_PROJECTIVE
297 #define MCW_RC _MCW_RC
298 #define RC_CHOP _RC_CHOP
300 #define RC_DOWN _RC_DOWN
301 #define RC_NEAR _RC_NEAR
303 #define MCW_PC _MCW_PC
308 #define CW_DEFAULT _CW_DEFAULT
310 #define SW_INVALID _SW_INVALID
311 #define SW_DENORMAL _SW_DENORMAL
312 #define SW_ZERODIVIDE _SW_ZERODIVIDE
313 #define SW_OVERFLOW _SW_OVERFLOW
314 #define SW_UNDERFLOW _SW_UNDERFLOW
315 #define SW_INEXACT _SW_INEXACT
317 #define SW_UNEMULATED _SW_UNEMULATED
318 #define SW_SQRTNEG _SW_SQRTNEG
319 #define SW_STACKOVERFLOW _SW_STACKOVERFLOW
320 #define SW_STACKUNDERFLOW _SW_STACKUNDERFLOW
322 #define FPE_INVALID _FPE_INVALID
323 #define FPE_DENORMAL _FPE_DENORMAL
324 #define FPE_ZERODIVIDE _FPE_ZERODIVIDE
325 #define FPE_OVERFLOW _FPE_OVERFLOW
326 #define FPE_UNDERFLOW _FPE_UNDERFLOW
327 #define FPE_INEXACT _FPE_INEXACT
329 #define FPE_UNEMULATED _FPE_UNEMULATED
330 #define FPE_SQRTNEG _FPE_SQRTNEG
331 #define FPE_STACKOVERFLOW _FPE_STACKOVERFLOW
332 #define FPE_STACKUNDERFLOW _FPE_STACKUNDERFLOW
334 #define FPE_EXPLICITGEN _FPE_EXPLICITGEN
_CRT_MANAGED_FP_DEPRECATE _CRTIMP unsigned int __cdecl _statusfp(void)
#define _Out_opt_
Definition: sal.h:352
#define _CRTIMP
Definition: crtdefs.h:23
_Check_return_ _CRTIMP int __cdecl _isnan(_In_ double _X)
_Check_return_ _CRTIMP int *__cdecl __fpecode(void)
_Check_return_ _CRTIMP int __cdecl _finite(_In_ double _X)
_Check_return_ _CRTIMP double __cdecl _logb(_In_ double _X)
_Check_return_ _CRTIMP double __cdecl _scalb(_In_ double _X, _In_ long _Y)
_CRT_MANAGED_FP_DEPRECATE _CRTIMP void __cdecl _set_controlfp(_In_ unsigned int _NewValue, _In_ unsigned int _Mask)
_CRT_MANAGED_FP_DEPRECATE _CRT_INSECURE_DEPRECATE(_controlfp_s) _CRTIMP unsigned int __cdecl _controlfp(_In_ unsigned int _NewValue
#define _Check_return_
Definition: sal.h:563
_Check_return_ _CRTIMP double __cdecl _chgsign(_In_ double _X)
#define _In_
Definition: sal.h:314
_In_ double _Y
Definition: math.h:999
_CRT_MANAGED_FP_DEPRECATE _CRTIMP errno_t __cdecl _controlfp_s(_Out_opt_ unsigned int *_CurrentState, _In_ unsigned int _NewValue, _In_ unsigned int _Mask)
_Check_return_ _CRTIMP int __cdecl _fpclass(_In_ double _X)
_Check_return_ _CRTIMP double __cdecl _nextafter(_In_ double _X, _In_ double _Y)
_CRT_MANAGED_FP_DEPRECATE _CRTIMP void __cdecl _fpreset(void)
_CRT_MANAGED_FP_DEPRECATE _CRTIMP void __cdecl fpreset(void)
int errno_t
Definition: crtdefs.h:563
#define _CRT_MANAGED_FP_DEPRECATE
Definition: float.h:32
_CRT_MANAGED_FP_DEPRECATE _In_ unsigned int _Mask
Definition: float.h:120
_CRT_MANAGED_FP_DEPRECATE _CRTIMP unsigned int __cdecl _control87(_In_ unsigned int _NewValue, _In_ unsigned int _Mask)
_Check_return_ _CRTIMP double __cdecl _copysign(_In_ double _Number, _In_ double _Sign)
_CRT_MANAGED_FP_DEPRECATE _CRTIMP unsigned int __cdecl _clearfp(void)