ReactOS 0.4.16-dev-1690-gc192175
float.h File Reference
#include <corecrt.h>
Include dependency graph for float.h:

Go to the source code of this file.

Macros

#define _MCW_EM   0x0008001F /* Error masks */
 
#define _MCW_IC   0x00040000 /* Infinity */
 
#define _MCW_RC   0x00000300 /* Rounding */
 
#define _MCW_PC   0x00030000 /* Precision */
 
#define _MCW_DN   0x03000000 /* Denormal */
 
#define _EM_INVALID   0x00000010
 
#define _EM_DENORMAL   0x00080000
 
#define _EM_ZERODIVIDE   0x00000008
 
#define _EM_OVERFLOW   0x00000004
 
#define _EM_UNDERFLOW   0x00000002
 
#define _EM_INEXACT   0x00000001
 
#define _IC_AFFINE   0x00040000
 
#define _IC_PROJECTIVE   0x00000000
 
#define _RC_CHOP   0x00000300
 
#define _RC_UP   0x00000200
 
#define _RC_DOWN   0x00000100
 
#define _RC_NEAR   0x00000000
 
#define _PC_24   0x00020000
 
#define _PC_53   0x00010000
 
#define _PC_64   0x00000000
 
#define _DN_SAVE   0x00000000
 
#define _DN_FLUSH   0x01000000
 
#define _DN_FLUSH_OPERANDS_SAVE_RESULTS   0x02000000
 
#define _DN_SAVE_OPERANDS_FLUSH_RESULTS   0x03000000
 
#define __MINGW_FPCLASS_DEFINED   1
 
#define _FPCLASS_SNAN   0x0001 /* Signaling "Not a Number" */
 
#define _FPCLASS_QNAN   0x0002 /* Quiet "Not a Number" */
 
#define _FPCLASS_NINF   0x0004 /* Negative Infinity */
 
#define _FPCLASS_NN   0x0008 /* Negative Normal */
 
#define _FPCLASS_ND   0x0010 /* Negative Denormal */
 
#define _FPCLASS_NZ   0x0020 /* Negative Zero */
 
#define _FPCLASS_PZ   0x0040 /* Positive Zero */
 
#define _FPCLASS_PD   0x0080 /* Positive Denormal */
 
#define _FPCLASS_PN   0x0100 /* Positive Normal */
 
#define _FPCLASS_PINF   0x0200 /* Positive Infinity */
 
#define _SW_INEXACT   0x00000001 /* inexact (precision) */
 
#define _SW_UNDERFLOW   0x00000002 /* underflow */
 
#define _SW_OVERFLOW   0x00000004 /* overflow */
 
#define _SW_ZERODIVIDE   0x00000008 /* zero divide */
 
#define _SW_INVALID   0x00000010 /* invalid */
 
#define _SW_DENORMAL   0x00080000 /* denormal status bit */
 
#define _SW_UNEMULATED   0x0040 /* unemulated instruction */
 
#define _SW_SQRTNEG   0x0080 /* square root of a neg number */
 
#define _SW_STACKOVERFLOW   0x0200 /* FP stack overflow */
 
#define _SW_STACKUNDERFLOW   0x0400 /* FP stack underflow */
 
#define _FPE_INVALID   0x81
 
#define _FPE_DENORMAL   0x82
 
#define _FPE_ZERODIVIDE   0x83
 
#define _FPE_OVERFLOW   0x84
 
#define _FPE_UNDERFLOW   0x85
 
#define _FPE_INEXACT   0x86
 
#define _FPE_UNEMULATED   0x87
 
#define _FPE_SQRTNEG   0x88
 
#define _FPE_STACKOVERFLOW   0x8a
 
#define _FPE_STACKUNDERFLOW   0x8b
 
#define _FPE_EXPLICITGEN   0x8c /* raise( SIGFPE ); */
 
#define _clear87   _clearfp
 
#define _status87   _statusfp
 
#define _fpecode   (*(__fpecode()))
 

Functions

__MINGW_NOTHROW _CRTIMP unsigned int __cdecl _controlfp (_In_ unsigned int unNew, _In_ unsigned int unMask)
 
__MINGW_NOTHROW _CRTIMP unsigned int __cdecl _control87 (_In_ unsigned int unNew, _In_ unsigned int unMask)
 
__MINGW_NOTHROW _CRTIMP unsigned int __cdecl _clearfp (void)
 
__MINGW_NOTHROW _CRTIMP unsigned int __cdecl _statusfp (void)
 
__MINGW_NOTHROW void __cdecl _fpreset (void)
 
__MINGW_NOTHROW void __cdecl fpreset (void)
 
__MINGW_NOTHROW _CRTIMP int *__cdecl __fpecode (void)
 
_Check_return_ __MINGW_NOTHROW _CRTIMP double __cdecl _chgsign (_In_ double)
 
_Check_return_ __MINGW_NOTHROW _CRTIMP double __cdecl _copysign (_In_ double, _In_ double)
 
_Check_return_ __MINGW_NOTHROW _CRTIMP double __cdecl _logb (_In_ double)
 
_Check_return_ __MINGW_NOTHROW _CRTIMP double __cdecl _nextafter (_In_ double, _In_ double)
 
_Check_return_ __MINGW_NOTHROW _CRTIMP double __cdecl _scalb (_In_ double, _In_ long)
 
_Check_return_ __MINGW_NOTHROW _CRTIMP int __cdecl _finite (_In_ double)
 
_Check_return_ __MINGW_NOTHROW _CRTIMP int __cdecl _fpclass (_In_ double)
 
_Check_return_ __MINGW_NOTHROW _CRTIMP int __cdecl _isnan (_In_ double)
 

Macro Definition Documentation

◆ __MINGW_FPCLASS_DEFINED

#define __MINGW_FPCLASS_DEFINED   1

Definition at line 71 of file float.h.

◆ _clear87

#define _clear87   _clearfp

Definition at line 139 of file float.h.

◆ _DN_FLUSH

#define _DN_FLUSH   0x01000000

Definition at line 63 of file float.h.

◆ _DN_FLUSH_OPERANDS_SAVE_RESULTS

#define _DN_FLUSH_OPERANDS_SAVE_RESULTS   0x02000000

Definition at line 64 of file float.h.

◆ _DN_SAVE

#define _DN_SAVE   0x00000000

Definition at line 62 of file float.h.

◆ _DN_SAVE_OPERANDS_FLUSH_RESULTS

#define _DN_SAVE_OPERANDS_FLUSH_RESULTS   0x03000000

Definition at line 65 of file float.h.

◆ _EM_DENORMAL

#define _EM_DENORMAL   0x00080000

Definition at line 48 of file float.h.

◆ _EM_INEXACT

#define _EM_INEXACT   0x00000001

Definition at line 52 of file float.h.

◆ _EM_INVALID

#define _EM_INVALID   0x00000010

Definition at line 47 of file float.h.

◆ _EM_OVERFLOW

#define _EM_OVERFLOW   0x00000004

Definition at line 50 of file float.h.

◆ _EM_UNDERFLOW

#define _EM_UNDERFLOW   0x00000002

Definition at line 51 of file float.h.

◆ _EM_ZERODIVIDE

#define _EM_ZERODIVIDE   0x00000008

Definition at line 49 of file float.h.

◆ _FPCLASS_ND

#define _FPCLASS_ND   0x0010 /* Negative Denormal */

Definition at line 76 of file float.h.

◆ _FPCLASS_NINF

#define _FPCLASS_NINF   0x0004 /* Negative Infinity */

Definition at line 74 of file float.h.

◆ _FPCLASS_NN

#define _FPCLASS_NN   0x0008 /* Negative Normal */

Definition at line 75 of file float.h.

◆ _FPCLASS_NZ

#define _FPCLASS_NZ   0x0020 /* Negative Zero */

Definition at line 77 of file float.h.

◆ _FPCLASS_PD

#define _FPCLASS_PD   0x0080 /* Positive Denormal */

Definition at line 79 of file float.h.

◆ _FPCLASS_PINF

#define _FPCLASS_PINF   0x0200 /* Positive Infinity */

Definition at line 81 of file float.h.

◆ _FPCLASS_PN

#define _FPCLASS_PN   0x0100 /* Positive Normal */

Definition at line 80 of file float.h.

◆ _FPCLASS_PZ

#define _FPCLASS_PZ   0x0040 /* Positive Zero */

Definition at line 78 of file float.h.

◆ _FPCLASS_QNAN

#define _FPCLASS_QNAN   0x0002 /* Quiet "Not a Number" */

Definition at line 73 of file float.h.

◆ _FPCLASS_SNAN

#define _FPCLASS_SNAN   0x0001 /* Signaling "Not a Number" */

Definition at line 72 of file float.h.

◆ _FPE_DENORMAL

#define _FPE_DENORMAL   0x82

Definition at line 100 of file float.h.

◆ _FPE_EXPLICITGEN

#define _FPE_EXPLICITGEN   0x8c /* raise( SIGFPE ); */

Definition at line 109 of file float.h.

◆ _FPE_INEXACT

#define _FPE_INEXACT   0x86

Definition at line 104 of file float.h.

◆ _FPE_INVALID

#define _FPE_INVALID   0x81

Definition at line 99 of file float.h.

◆ _FPE_OVERFLOW

#define _FPE_OVERFLOW   0x84

Definition at line 102 of file float.h.

◆ _FPE_SQRTNEG

#define _FPE_SQRTNEG   0x88

Definition at line 106 of file float.h.

◆ _FPE_STACKOVERFLOW

#define _FPE_STACKOVERFLOW   0x8a

Definition at line 107 of file float.h.

◆ _FPE_STACKUNDERFLOW

#define _FPE_STACKUNDERFLOW   0x8b

Definition at line 108 of file float.h.

◆ _FPE_UNDERFLOW

#define _FPE_UNDERFLOW   0x85

Definition at line 103 of file float.h.

◆ _FPE_UNEMULATED

#define _FPE_UNEMULATED   0x87

Definition at line 105 of file float.h.

◆ _FPE_ZERODIVIDE

#define _FPE_ZERODIVIDE   0x83

Definition at line 101 of file float.h.

◆ _fpecode

#define _fpecode   (*(__fpecode()))

Definition at line 157 of file float.h.

◆ _IC_AFFINE

#define _IC_AFFINE   0x00040000

Definition at line 53 of file float.h.

◆ _IC_PROJECTIVE

#define _IC_PROJECTIVE   0x00000000

Definition at line 54 of file float.h.

◆ _MCW_DN

#define _MCW_DN   0x03000000 /* Denormal */

Definition at line 44 of file float.h.

◆ _MCW_EM

#define _MCW_EM   0x0008001F /* Error masks */

Definition at line 40 of file float.h.

◆ _MCW_IC

#define _MCW_IC   0x00040000 /* Infinity */

Definition at line 41 of file float.h.

◆ _MCW_PC

#define _MCW_PC   0x00030000 /* Precision */

Definition at line 43 of file float.h.

◆ _MCW_RC

#define _MCW_RC   0x00000300 /* Rounding */

Definition at line 42 of file float.h.

◆ _PC_24

#define _PC_24   0x00020000

Definition at line 59 of file float.h.

◆ _PC_53

#define _PC_53   0x00010000

Definition at line 60 of file float.h.

◆ _PC_64

#define _PC_64   0x00000000

Definition at line 61 of file float.h.

◆ _RC_CHOP

#define _RC_CHOP   0x00000300

Definition at line 55 of file float.h.

◆ _RC_DOWN

#define _RC_DOWN   0x00000100

Definition at line 57 of file float.h.

◆ _RC_NEAR

#define _RC_NEAR   0x00000000

Definition at line 58 of file float.h.

◆ _RC_UP

#define _RC_UP   0x00000200

Definition at line 56 of file float.h.

◆ _status87

#define _status87   _statusfp

Definition at line 140 of file float.h.

◆ _SW_DENORMAL

#define _SW_DENORMAL   0x00080000 /* denormal status bit */

Definition at line 90 of file float.h.

◆ _SW_INEXACT

#define _SW_INEXACT   0x00000001 /* inexact (precision) */

Definition at line 85 of file float.h.

◆ _SW_INVALID

#define _SW_INVALID   0x00000010 /* invalid */

Definition at line 89 of file float.h.

◆ _SW_OVERFLOW

#define _SW_OVERFLOW   0x00000004 /* overflow */

Definition at line 87 of file float.h.

◆ _SW_SQRTNEG

#define _SW_SQRTNEG   0x0080 /* square root of a neg number */

Definition at line 94 of file float.h.

◆ _SW_STACKOVERFLOW

#define _SW_STACKOVERFLOW   0x0200 /* FP stack overflow */

Definition at line 95 of file float.h.

◆ _SW_STACKUNDERFLOW

#define _SW_STACKUNDERFLOW   0x0400 /* FP stack underflow */

Definition at line 96 of file float.h.

◆ _SW_UNDERFLOW

#define _SW_UNDERFLOW   0x00000002 /* underflow */

Definition at line 86 of file float.h.

◆ _SW_UNEMULATED

#define _SW_UNEMULATED   0x0040 /* unemulated instruction */

Definition at line 93 of file float.h.

◆ _SW_ZERODIVIDE

#define _SW_ZERODIVIDE   0x00000008 /* zero divide */

Definition at line 88 of file float.h.

Function Documentation

◆ __fpecode()

Definition at line 16 of file fpecode.c.

17{
18 return &msvcrt_get_thread_data()->fpecode;
19}
thread_data_t * msvcrt_get_thread_data(void)
Definition: tls.c:31

◆ _chgsign()

◆ _clearfp()

Definition at line 11 of file _clearfp.c.

12{
13 unsigned int retval;
14
15 /* Get current status value */
16 retval = _statusfp();
17
18 /* Clear the exception mask */
20
21 /* Return the previous state */
22 return retval;
23}
__MINGW_NOTHROW _CRTIMP unsigned int __cdecl _statusfp(void)
Definition: _statusfp.c:11
int retval
Definition: wcstombs.cpp:91
void _mm_setcsr(unsigned int a)
Definition: xmmintrin.h:542
#define _MM_EXCEPT_MASK
Definition: xmmintrin.h:93
unsigned int _mm_getcsr(void)
Definition: xmmintrin.h:535

Referenced by main(), Test_exceptions(), and test_fenv().

◆ _control87()

__MINGW_NOTHROW _CRTIMP unsigned int __cdecl _control87 ( _In_ unsigned int  unNew,
_In_ unsigned int  unMask 
)

◆ _controlfp()

◆ _copysign()

◆ _finite()

Definition at line 14 of file _finite.c.

15{
16 union { double f; uint64_t ui64; } u = { _X };
17 uint64_t exp = u.ui64 & 0x7FF0000000000000;
18 return (exp != 0x7FF0000000000000);
19}
#define _X(x)
Definition: CPath.cpp:42
UINT64 uint64_t
Definition: types.h:77
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
Definition: glfuncs.h:240
#define f
Definition: ke_i.h:83
DWORD exp
Definition: msg.c:16058

Referenced by _j0(), _j1(), _y0(), _y1(), _yn(), cvt(), format_float(), rpn_exp(), rpn_exp10(), rpn_exp2(), rpn_exp3(), rpn_fact(), rpn_pow_f(), rpn_sqr_f(), run_operator(), Test__finite(), and test_finite().

◆ _fpclass()

◆ _fpreset()

__MINGW_NOTHROW void __cdecl _fpreset ( void  )

Definition at line 10 of file _fpreset.c.

11{
12 /* Mask everything */
14}
#define _MM_MASK_MASK
Definition: xmmintrin.h:101

Referenced by START_TEST(), Test_controlfp(), and Test_exceptions().

◆ _isnan()

Definition at line 13 of file _isnan.c.

14{
15 union { double f; uint64_t ui64; } u = { _X };
16 return (u.ui64 & ~0x8000000000000000ull) > 0x7FF0000000000000ull;
17}

Referenced by cvt(), format_float(), ldexp(), nexttowardf(), rpn_acos(), rpn_acosh(), rpn_asin(), rpn_asinh(), rpn_atan(), rpn_atanh(), rpn_cosh(), rpn_pow_f(), rpn_sinh(), rpn_sqr_f(), rpn_tanh(), Test__isnan(), test_isnan(), TRIO_ARGS1(), ulp_error_dbl(), and ulp_error_flt().

◆ _logb()

◆ _nextafter()

◆ _scalb()

◆ _statusfp()

Definition at line 11 of file _statusfp.c.

12{
13 unsigned int mxcsr, status = 0;
14
15 /* Get MXCSR */
16 mxcsr = _mm_getcsr();
17
18 /* Convert to abstract status flags */
19 if (mxcsr & _MM_EXCEPT_INVALID)
21 if (mxcsr & _MM_EXCEPT_DENORM)
23 if (mxcsr & _MM_EXCEPT_DIV_ZERO)
25 if (mxcsr & _MM_EXCEPT_OVERFLOW)
27 if (mxcsr & _MM_EXCEPT_UNDERFLOW)
29 if (mxcsr & _MM_EXCEPT_INEXACT)
31
32 return status;
33}
#define _SW_INEXACT
Definition: float.h:85
#define _SW_OVERFLOW
Definition: float.h:87
#define _SW_DENORMAL
Definition: float.h:90
#define _SW_ZERODIVIDE
Definition: float.h:88
#define _SW_UNDERFLOW
Definition: float.h:86
#define _SW_INVALID
Definition: float.h:89
Definition: ps.c:97
#define _MM_EXCEPT_DIV_ZERO
Definition: xmmintrin.h:96
#define _MM_EXCEPT_UNDERFLOW
Definition: xmmintrin.h:98
#define _MM_EXCEPT_INEXACT
Definition: xmmintrin.h:99
#define _MM_EXCEPT_OVERFLOW
Definition: xmmintrin.h:97
#define _MM_EXCEPT_INVALID
Definition: xmmintrin.h:94
#define _MM_EXCEPT_DENORM
Definition: xmmintrin.h:95

Referenced by _clearfp(), START_TEST(), and Test_exceptions().

◆ fpreset()