ReactOS 0.4.17-dev-966-gf06eace
math.h File Reference
#include <corecrt.h>
Include dependency graph for math.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _exception
 
struct  _complex
 

Macros

#define _EXCEPTION_DEFINED
 
#define _COMPLEX_DEFINED
 
#define complex   _complex
 
#define _DOMAIN   1
 
#define _SING   2
 
#define _OVERFLOW   3
 
#define _UNDERFLOW   4
 
#define _TLOSS   5
 
#define _PLOSS   6
 
#define EDOM   33
 
#define ERANGE   34
 
#define HUGE_VAL   _HUGE
 
#define _HUGE_ENUF   1e+300
 
#define INFINITY   ((float)(_HUGE_ENUF * _HUGE_ENUF))
 
#define HUGE_VALD   ((double)INFINITY)
 
#define HUGE_VALF   ((float)INFINITY)
 
#define HUGE_VALL   ((long double)INFINITY)
 
#define NAN   (__builtin_nanf(""))
 
#define _DENORM   (-2)
 
#define _FINITE   (-1)
 
#define _INFCODE   1
 
#define _NANCODE   2
 
#define FP_INFINITE   _INFCODE
 
#define FP_NAN   _NANCODE
 
#define FP_NORMAL   _FINITE
 
#define FP_SUBNORMAL   _DENORM
 
#define FP_ZERO   0
 
#define _matherrl   _matherr
 
#define _CRT_ABS_DEFINED
 
#define _CRT_MATHERR_DEFINED
 
#define _CRT_ATOF_DEFINED
 
#define _SIGN_DEFINED
 
#define isfinite(x)   (_finite((double)(x)) != 0)
 
#define signbit(x)   __signbit((double)(x))
 
#define isnan(x)   (_isnan((double)(x)) != 0)
 
#define isinf(x)   (!_finite((double)(x)) && !_isnan((double)(x)))
 
#define DOMAIN   _DOMAIN
 
#define SING   _SING
 
#define OVERFLOW   _OVERFLOW
 
#define UNDERFLOW   _UNDERFLOW
 
#define TLOSS   _TLOSS
 
#define PLOSS   _PLOSS
 
#define matherr   _matherr
 
#define HUGE   _HUGE
 
#define cabs   _cabs
 

Typedefs

typedef float float_t
 
typedef double double_t
 

Functions

_Check_return_ int __cdecl abs (_In_ int x)
 
_Check_return_ long __cdecl labs (_In_ long x)
 
_Check_return_ long long __cdecl llabs (_In_ long long x)
 
_Check_return_ double __cdecl acos (_In_ double x)
 
_Check_return_ double __cdecl asin (_In_ double x)
 
_Check_return_ double __cdecl atan (_In_ double x)
 
_Check_return_ double __cdecl atan2 (_In_ double y, _In_ double x)
 
_Check_return_ double __cdecl cos (_In_ double x)
 
_Check_return_ double __cdecl cosh (_In_ double x)
 
_Check_return_ double __cdecl exp (_In_ double x)
 
_Check_return_ _CRT_JIT_INTRINSIC double __cdecl fabs (_In_ double x)
 
_Check_return_ double __cdecl fmod (_In_ double x, _In_ double y)
 
_Check_return_ double __cdecl log (_In_ double x)
 
_Check_return_ double __cdecl log10 (_In_ double x)
 
_Check_return_ double __cdecl pow (_In_ double x, double y)
 
_Check_return_ double __cdecl sin (_In_ double x)
 
_Check_return_ double __cdecl sinh (_In_ double x)
 
_Check_return_ _CRT_JIT_INTRINSIC double __cdecl sqrt (_In_ double x)
 
_Check_return_ double __cdecl tan (_In_ double x)
 
_Check_return_ double __cdecl tanh (_In_ double x)
 
int __CRTDECL _matherr (_Inout_ struct _exception *exception)
 
_Check_return_ _CRTIMP double __cdecl atof (_In_z_ const char *str)
 
_Check_return_ _CRTIMP double __cdecl _atof_l (_In_z_ const char *str, _In_opt_ _locale_t locale)
 
_Check_return_ _CRTIMP double __cdecl _copysign (_In_ double x, _In_ double sgn)
 
_Check_return_ _CRTIMP double __cdecl _chgsign (_In_ double x)
 
_Check_return_ _CRTIMP double __cdecl _cabs (_In_ struct _complex a)
 
_Check_return_ _CRTIMP double __cdecl _hypot (_In_ double x, _In_ double y)
 
_Check_return_ _CRTIMP double __cdecl _j0 (_In_ double x)
 
_Check_return_ _CRTIMP double __cdecl _j1 (_In_ double x)
 
_Check_return_ _CRTIMP double __cdecl _jn (_In_ int x, _In_ double y)
 
_Check_return_ _CRTIMP double __cdecl _nextafter (_In_ double x, _In_ double y)
 
_Check_return_ _CRTIMP double __cdecl _y0 (_In_ double x)
 
_Check_return_ _CRTIMP double __cdecl _y1 (_In_ double x)
 
_Check_return_ _CRTIMP double __cdecl _yn (_In_ int x, _In_ double y)
 
_Check_return_ _CRTIMP double __cdecl ceil (_In_ double x)
 
_Check_return_ _CRTIMP double __cdecl floor (_In_ double x)
 
_Check_return_ _CRTIMP double __cdecl frexp (_In_ double x, _Out_ int *y)
 
_Check_return_ _CRTIMP double __cdecl ldexp (_In_ double x, _In_ int y)
 
_Check_return_ _CRTIMP double __cdecl modf (_In_ double x, _Out_ double *y)
 
_Check_return_ __CRT_INLINE float __CRTDECL ldexpf (_In_ float x, _In_ int y)
 
_Check_return_ __CRT_INLINE long double __CRTDECL tanl (_In_ long double x)
 
_Check_return_ __CRT_INLINE float __CRTDECL fabsf (_In_ float x)
 
_Check_return_ float __cdecl _chgsignf (_In_ float x)
 
_Check_return_ float __cdecl _copysignf (_In_ float x, _In_ float y)
 
_Check_return_ float __cdecl _hypotf (_In_ float x, _In_ float y)
 
_Check_return_ float __cdecl acosf (_In_ float x)
 
_Check_return_ float __cdecl asinf (_In_ float x)
 
_Check_return_ float __cdecl atanf (_In_ float x)
 
_Check_return_ float __cdecl atan2f (_In_ float x, _In_ float y)
 
_Check_return_ float __cdecl ceilf (_In_ float x)
 
_Check_return_ float __cdecl cosf (_In_ float x)
 
_Check_return_ float __cdecl coshf (_In_ float x)
 
_Check_return_ float __cdecl expf (_In_ float x)
 
_Check_return_ float __cdecl floorf (_In_ float x)
 
_Check_return_ float __cdecl fmodf (_In_ float x, _In_ float y)
 
_Check_return_ float __cdecl logf (_In_ float x)
 
_Check_return_ float __cdecl log10f (_In_ float x)
 
_Check_return_ float __cdecl modff (_In_ float x, _Out_ float *y)
 
_Check_return_ float __cdecl powf (_In_ float b, _In_ float e)
 
_Check_return_ float __cdecl sinf (_In_ float x)
 
_Check_return_ float __cdecl sinhf (_In_ float x)
 
_Check_return_ float __cdecl sqrtf (_In_ float x)
 
_Check_return_ float __cdecl tanf (_In_ float x)
 
_Check_return_ float __cdecl tanhf (_In_ float x)
 
_Check_return_ __CRT_INLINE double hypot (_In_ double x, _In_ double y)
 
_Check_return_ __CRT_INLINE float hypotf (_In_ float x, _In_ float y)
 
_Check_return_ __CRT_INLINE float frexpf (_In_ float x, _Out_ int *y)
 
_Check_return_ __CRT_INLINE long double acosl (_In_ long double x)
 
_Check_return_ __CRT_INLINE long double asinl (_In_ long double x)
 
_Check_return_ __CRT_INLINE long double atanl (_In_ long double x)
 
_Check_return_ __CRT_INLINE long double atan2l (_In_ long double y, _In_ long double x)
 
_Check_return_ __CRT_INLINE long double ceill (_In_ long double x)
 
_Check_return_ __CRT_INLINE long double cosl (_In_ long double x)
 
_Check_return_ __CRT_INLINE long double coshl (_In_ long double x)
 
_Check_return_ __CRT_INLINE long double expl (_In_ long double x)
 
_Check_return_ __CRT_INLINE long double fabsl (_In_ long double x)
 
_Check_return_ __CRT_INLINE long double floorl (_In_ long double x)
 
_Check_return_ __CRT_INLINE long double fmodl (_In_ long double x, _In_ long double y)
 
_Check_return_ __CRT_INLINE long double frexpl (_In_ long double x, _Out_ int *y)
 
_Check_return_ __CRT_INLINE long double hypotl (_In_ long double x, _In_ long double y)
 
_Check_return_ __CRT_INLINE long double logl (_In_ long double x)
 
_Check_return_ __CRT_INLINE long double log10l (_In_ long double x)
 
_Check_return_ __CRT_INLINE long double powl (_In_ long double x, _In_ long double y)
 
_Check_return_ __CRT_INLINE long double sinl (_In_ long double x)
 
_Check_return_ __CRT_INLINE long double sinhl (_In_ long double x)
 
_Check_return_ __CRT_INLINE long double sqrtl (_In_ long double x)
 
_Check_return_ __CRT_INLINE long double tanhl (_In_ long double x)
 
_Check_return_ __CRT_INLINE long double _chgsignl (_In_ long double number)
 
_Check_return_ __CRT_INLINE long double _copysignl (_In_ long double number, _In_ long double sign)
 
_Check_return_ __CRT_INLINE long double _hypotl (_In_ long double x, _In_ long double y)
 
_Check_return_ __CRT_INLINE long double ldexpl (_In_ long double x, _In_ int y)
 
_Check_return_ __CRT_INLINE long double modfl (_In_ long double x, _Out_ long double *y)
 
_Check_return_ __CRT_INLINE double round (_In_ double x)
 
_Check_return_ __CRT_INLINE float roundf (_In_ float x)
 
_Check_return_ __CRT_INLINE long double roundl (_In_ long double x)
 
_Check_return_ __CRT_INLINE long lround (_In_ double x)
 
_Check_return_ __CRT_INLINE long lroundf (_In_ float x)
 
_Check_return_ __CRT_INLINE long lroundl (_In_ long double x)
 
_Check_return_ __CRT_INLINE long long llround (_In_ double x)
 
_Check_return_ __CRT_INLINE long long llroundf (_In_ float x)
 
_Check_return_ __CRT_INLINE long long llroundl (_In_ long double x)
 
_Check_return_ __CRT_INLINE double rint (_In_ double x)
 
_Check_return_ __CRT_INLINE float rintf (_In_ float x)
 
_Check_return_ __CRT_INLINE long double rintl (_In_ long double x)
 
_Check_return_ __CRT_INLINE long lrint (_In_ double x)
 
_Check_return_ __CRT_INLINE long lrintf (_In_ float x)
 
_Check_return_ __CRT_INLINE long lrintl (_In_ long double x)
 
_Check_return_ __CRT_INLINE long long llrint (_In_ double x)
 
_Check_return_ __CRT_INLINE long long llrintf (_In_ float x)
 
_Check_return_ __CRT_INLINE long long llrintl (_In_ long double x)
 
_Check_return_ __CRT_INLINE double log2 (_In_ double x)
 
_Check_return_ __CRT_INLINE float log2f (_In_ float x)
 
_Check_return_ __CRT_INLINE float copysignf (_In_ float x, _In_ float y)
 
_Check_return_ _CRTIMP int __cdecl _finite (_In_ double x)
 
_Check_return_ __CRT_INLINE int __cdecl __signbit (_In_ double x)
 
_Check_return_ _CRTIMP int __cdecl _isnan (_In_ double x)
 
_Check_return_ __CRT_INLINE double exp2 (_In_ double x)
 
_Check_return_ __CRT_INLINE float exp2f (_In_ float x)
 
_Check_return_ __CRT_INLINE double fmax (_In_ double x, _In_ double y)
 
_Check_return_ __CRT_INLINE double fmin (_In_ double x, _In_ double y)
 
_Check_return_ __CRT_INLINE float fmaxf (_In_ float x, _In_ float y)
 
_Check_return_ __CRT_INLINE float fminf (_In_ float x, _In_ float y)
 
 _CRT_NONSTDC_DEPRECATE (_j0) _CRTIMP double __cdecl j0(_In_ double x)
 
 _CRT_NONSTDC_DEPRECATE (_j1) _CRTIMP double __cdecl j1(_In_ double x)
 
 _CRT_NONSTDC_DEPRECATE (_jn) _CRTIMP double __cdecl jn(_In_ int x
 
 _CRT_NONSTDC_DEPRECATE (_y0) _CRTIMP double __cdecl y0(_In_ double x)
 
 _CRT_NONSTDC_DEPRECATE (_y1) _CRTIMP double __cdecl y1(_In_ double x)
 
 _CRT_NONSTDC_DEPRECATE (_yn) _CRTIMP double __cdecl yn(_In_ int x
 

Variables

_CRTIMP double const _HUGE
 
_In_ double y
 

Macro Definition Documentation

◆ _COMPLEX_DEFINED

#define _COMPLEX_DEFINED

Definition at line 30 of file math.h.

◆ _CRT_ABS_DEFINED

#define _CRT_ABS_DEFINED

Definition at line 92 of file math.h.

◆ _CRT_ATOF_DEFINED

#define _CRT_ATOF_DEFINED

Definition at line 131 of file math.h.

◆ _CRT_MATHERR_DEFINED

#define _CRT_MATHERR_DEFINED

Definition at line 126 of file math.h.

◆ _DENORM

#define _DENORM   (-2)

Definition at line 76 of file math.h.

◆ _DOMAIN

#define _DOMAIN   1

Definition at line 39 of file math.h.

◆ _EXCEPTION_DEFINED

#define _EXCEPTION_DEFINED

Definition at line 19 of file math.h.

◆ _FINITE

#define _FINITE   (-1)

Definition at line 77 of file math.h.

◆ _HUGE_ENUF

#define _HUGE_ENUF   1e+300

Definition at line 54 of file math.h.

◆ _INFCODE

#define _INFCODE   1

Definition at line 78 of file math.h.

◆ _matherrl

#define _matherrl   _matherr

Definition at line 88 of file math.h.

◆ _NANCODE

#define _NANCODE   2

Definition at line 79 of file math.h.

◆ _OVERFLOW

#define _OVERFLOW   3

Definition at line 41 of file math.h.

◆ _PLOSS

#define _PLOSS   6

Definition at line 44 of file math.h.

◆ _SIGN_DEFINED

#define _SIGN_DEFINED

Definition at line 137 of file math.h.

◆ _SING

#define _SING   2

Definition at line 40 of file math.h.

◆ _TLOSS

#define _TLOSS   5

Definition at line 43 of file math.h.

◆ _UNDERFLOW

#define _UNDERFLOW   4

Definition at line 42 of file math.h.

◆ cabs

#define cabs   _cabs

Definition at line 376 of file math.h.

◆ complex

Definition at line 35 of file math.h.

◆ DOMAIN

#define DOMAIN   _DOMAIN

Definition at line 366 of file math.h.

◆ EDOM

#define EDOM   33

Definition at line 46 of file math.h.

◆ ERANGE

#define ERANGE   34

Definition at line 47 of file math.h.

◆ FP_INFINITE

#define FP_INFINITE   _INFCODE

Definition at line 81 of file math.h.

◆ FP_NAN

#define FP_NAN   _NANCODE

Definition at line 82 of file math.h.

◆ FP_NORMAL

#define FP_NORMAL   _FINITE

Definition at line 83 of file math.h.

◆ FP_SUBNORMAL

#define FP_SUBNORMAL   _DENORM

Definition at line 84 of file math.h.

◆ FP_ZERO

#define FP_ZERO   0

Definition at line 85 of file math.h.

◆ HUGE

#define HUGE   _HUGE

Definition at line 374 of file math.h.

◆ HUGE_VAL

#define HUGE_VAL   _HUGE

Definition at line 51 of file math.h.

◆ HUGE_VALD

#define HUGE_VALD   ((double)INFINITY)

Definition at line 57 of file math.h.

◆ HUGE_VALF

#define HUGE_VALF   ((float)INFINITY)

Definition at line 58 of file math.h.

◆ HUGE_VALL

#define HUGE_VALL   ((long double)INFINITY)

Definition at line 59 of file math.h.

◆ INFINITY

#define INFINITY   ((float)(_HUGE_ENUF * _HUGE_ENUF))

Definition at line 56 of file math.h.

◆ isfinite

#define isfinite (   x)    (_finite((double)(x)) != 0)

Definition at line 324 of file math.h.

◆ isinf

#define isinf (   x)    (!_finite((double)(x)) && !_isnan((double)(x)))

Definition at line 341 of file math.h.

◆ isnan

#define isnan (   x)    (_isnan((double)(x)) != 0)

Definition at line 336 of file math.h.

◆ matherr

#define matherr   _matherr

Definition at line 372 of file math.h.

◆ NAN

#define NAN   (__builtin_nanf(""))

Definition at line 65 of file math.h.

◆ OVERFLOW

#define OVERFLOW   _OVERFLOW

Definition at line 368 of file math.h.

◆ PLOSS

#define PLOSS   _PLOSS

Definition at line 371 of file math.h.

◆ signbit

#define signbit (   x)    __signbit((double)(x))

Definition at line 330 of file math.h.

◆ SING

#define SING   _SING

Definition at line 367 of file math.h.

◆ TLOSS

#define TLOSS   _TLOSS

Definition at line 370 of file math.h.

◆ UNDERFLOW

#define UNDERFLOW   _UNDERFLOW

Definition at line 369 of file math.h.

Typedef Documentation

◆ double_t

typedef double double_t

Definition at line 16 of file math.h.

◆ float_t

typedef float float_t

This file has no copyright assigned and is placed in the Public Domain.

Definition at line 15 of file math.h.

Function Documentation

◆ __signbit()

_Check_return_ __CRT_INLINE int __cdecl __signbit ( _In_ double  x)

Definition at line 329 of file math.h.

329{ return _copysign(1.0, x) < 0.0; }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
_Check_return_ _CRTIMP double __cdecl _copysign(_In_ double x, _In_ double sgn)

◆ _atof_l()

◆ _cabs()

◆ _chgsign()

◆ _chgsignf()

_Check_return_ __CRT_INLINE float _chgsignf ( _In_ float  x)

Definition at line 230 of file math.h.

230{ return (float)_chgsign((double)x); }
_Check_return_ _CRTIMP double __cdecl _chgsign(_In_ double x)

◆ _chgsignl()

_Check_return_ __CRT_INLINE long double _chgsignl ( _In_ long double  number)

Definition at line 279 of file math.h.

279{ return _chgsign((double)number); }
static unsigned int number
Definition: dsound.c:1479

◆ _copysign()

_Check_return_ _CRTIMP double __cdecl _copysign ( _In_ double  x,
_In_ double  sgn 
)

◆ _copysignf()

_Check_return_ __CRT_INLINE float _copysignf ( _In_ float  x,
_In_ float  y 
)

Definition at line 231 of file math.h.

231{ return (float)_copysign((double)x, (double)y); }
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ _copysignl()

_Check_return_ __CRT_INLINE long double _copysignl ( _In_ long double  number,
_In_ long double  sign 
)

Definition at line 280 of file math.h.

280{ return _copysign((double)number, (double)sign); }
#define sign(x)
Definition: mapdesc.cc:613

◆ _CRT_NONSTDC_DEPRECATE() [1/6]

_CRT_NONSTDC_DEPRECATE ( _j0  )

◆ _CRT_NONSTDC_DEPRECATE() [2/6]

_CRT_NONSTDC_DEPRECATE ( _j1  )

◆ _CRT_NONSTDC_DEPRECATE() [3/6]

_CRT_NONSTDC_DEPRECATE ( _jn  )

◆ _CRT_NONSTDC_DEPRECATE() [4/6]

_CRT_NONSTDC_DEPRECATE ( _y0  )

◆ _CRT_NONSTDC_DEPRECATE() [5/6]

_CRT_NONSTDC_DEPRECATE ( _y1  )

◆ _CRT_NONSTDC_DEPRECATE() [6/6]

_CRT_NONSTDC_DEPRECATE ( _yn  )

◆ _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:18625

◆ _hypot()

◆ _hypotf()

_Check_return_ __CRT_INLINE float _hypotf ( _In_ float  x,
_In_ float  y 
)

Definition at line 232 of file math.h.

232{ return (float)_hypot((double)x, (double)y); }
_ACRTIMP double __cdecl _hypot(double, double)
Definition: hypot.c:34

◆ _hypotl()

_Check_return_ __CRT_INLINE long double _hypotl ( _In_ long double  x,
_In_ long double  y 
)

Definition at line 281 of file math.h.

281{ return _hypot((double)x, (double)y); }

◆ _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}

◆ _j0()

◆ _j1()

◆ _jn()

◆ _matherr()

int __CRTDECL _matherr ( _Inout_ struct _exception *  exception)

◆ _nextafter()

◆ _y0()

◆ _y1()

◆ _yn()

◆ abs()

◆ acos()

◆ acosf()

_Check_return_ __CRT_INLINE float acosf ( _In_ float  x)

Definition at line 233 of file math.h.

233{ return (float)acos((double)x); }
_Check_return_ double __cdecl acos(_In_ double x)

◆ acosl()

_Check_return_ __CRT_INLINE long double acosl ( _In_ long double  x)

Definition at line 259 of file math.h.

259{ return (acos((double)x)); }

◆ asin()

◆ asinf()

_Check_return_ __CRT_INLINE float asinf ( _In_ float  x)

Definition at line 234 of file math.h.

234{ return (float)asin((double)x); }
_Check_return_ double __cdecl asin(_In_ double x)

◆ asinl()

_Check_return_ __CRT_INLINE long double asinl ( _In_ long double  x)

Definition at line 260 of file math.h.

260{ return (asin((double)x)); }

◆ atan()

◆ atan2()

◆ atan2f()

_Check_return_ __CRT_INLINE float atan2f ( _In_ float  x,
_In_ float  y 
)

Definition at line 236 of file math.h.

236{ return (float)atan2((double)x,(double)y); }
_ACRTIMP double __cdecl atan2(double, double)
Definition: atan2.c:52

◆ atan2l()

_Check_return_ __CRT_INLINE long double atan2l ( _In_ long double  y,
_In_ long double  x 
)

Definition at line 262 of file math.h.

262{ return (atan2((double)y, (double)x)); }

◆ atanf()

_Check_return_ __CRT_INLINE float atanf ( _In_ float  x)

Definition at line 235 of file math.h.

235{ return (float)atan((double)x); }
_Check_return_ double __cdecl atan(_In_ double x)

◆ atanl()

_Check_return_ __CRT_INLINE long double atanl ( _In_ long double  x)

Definition at line 261 of file math.h.

261{ return (atan((double)x)); }

◆ atof()

◆ ceil()

◆ ceilf()

_Check_return_ __CRT_INLINE float ceilf ( _In_ float  x)

Definition at line 237 of file math.h.

237{ return (float)ceil((double)x); }
_Check_return_ _CRTIMP double __cdecl ceil(_In_ double x)

◆ ceill()

_Check_return_ __CRT_INLINE long double ceill ( _In_ long double  x)

Definition at line 263 of file math.h.

263{ return (ceil((double)x)); }

Referenced by roundl().

◆ copysignf()

_Check_return_ __CRT_INLINE float copysignf ( _In_ float  x,
_In_ float  y 
)

Definition at line 318 of file math.h.

318{ return _copysignf(x, y); }
_Check_return_ float __cdecl _copysignf(_In_ float x, _In_ float y)
Definition: math.h:231

◆ cos()

◆ cosf()

_Check_return_ __CRT_INLINE float cosf ( _In_ float  x)

Definition at line 238 of file math.h.

238{ return (float)cos((double)x); }
_Check_return_ double __cdecl cos(_In_ double x)

◆ cosh()

◆ coshf()

_Check_return_ __CRT_INLINE float coshf ( _In_ float  x)

Definition at line 239 of file math.h.

239{ return (float)cosh((double)x); }
_Check_return_ double __cdecl cosh(_In_ double x)

◆ coshl()

_Check_return_ __CRT_INLINE long double coshl ( _In_ long double  x)

Definition at line 265 of file math.h.

265{ return (cosh((double)x)); }

◆ cosl()

_Check_return_ __CRT_INLINE long double cosl ( _In_ long double  x)

Definition at line 264 of file math.h.

264{ return (cos((double)x)); }

◆ exp()

◆ exp2()

_Check_return_ __CRT_INLINE double exp2 ( _In_ double  x)

Definition at line 346 of file math.h.

346{ return pow(2.0, x); }
_Check_return_ double __cdecl pow(_In_ double x, double y)

◆ exp2f()

_Check_return_ __CRT_INLINE float exp2f ( _In_ float  x)

Definition at line 347 of file math.h.

347{ return (float)pow(2.0, (double)x); }

◆ expf()

_Check_return_ __CRT_INLINE float expf ( _In_ float  x)

Definition at line 240 of file math.h.

240{ return (float)exp((double)x); }

◆ expl()

_Check_return_ __CRT_INLINE long double expl ( _In_ long double  x)

Definition at line 266 of file math.h.

266{ return (exp((double)x)); }

◆ fabs()

Definition at line 17 of file fabs.c.

19{
20 /* Load the value as uint64 */
21 unsigned long long u64 = *(unsigned long long*)&x;
22
23 /* Clear the sign bit */
24 u64 &= ~(1ULL << 63);
25
26 /* Check for NAN */
27 if (u64 > 0x7FF0000000000000ull)
28 {
29#ifdef _M_IX86
30 /* Set error bit */
31 *(unsigned long long*)&x |= 0x0008000000000000ull;
32#endif
33 return x;
34 }
35
36 /* Convert back to double */
37 return *(double*)&u64;
38}
ULONG64 u64
Definition: btrfs.h:15

◆ fabsf()

_Check_return_ __CRT_INLINE float __CRTDECL fabsf ( _In_ float  x)

Definition at line 193 of file math.h.

193{ return ((float)fabs((double)x)); }
_Check_return_ _CRT_JIT_INTRINSIC double __cdecl fabs(_In_ double x)
Definition: fabs.c:17

◆ fabsl()

_Check_return_ __CRT_INLINE long double fabsl ( _In_ long double  x)

Definition at line 267 of file math.h.

267{ return fabs((double)x); }

◆ floor()

◆ floorf()

_Check_return_ __CRT_INLINE float floorf ( _In_ float  x)

Definition at line 241 of file math.h.

241{ return (float)floor((double)x); }
_Check_return_ _CRTIMP double __cdecl floor(_In_ double x)

◆ floorl()

_Check_return_ __CRT_INLINE long double floorl ( _In_ long double  x)

Definition at line 268 of file math.h.

268{ return (floor((double)x)); }

Referenced by roundl().

◆ fmax()

_Check_return_ __CRT_INLINE double fmax ( _In_ double  x,
_In_ double  y 
)

Definition at line 348 of file math.h.

349{
350 if (_isnan(x)) return y;
351 if (_isnan(y)) return x;
352 return (x < y) ? y : x;
353}
_In_ double y
Definition: math.h:380
_Check_return_ _CRTIMP int __cdecl _isnan(_In_ double x)
Definition: _isnan.c:13

◆ fmaxf()

_Check_return_ __CRT_INLINE float fmaxf ( _In_ float  x,
_In_ float  y 
)

Definition at line 360 of file math.h.

360{ return (float)fmax((double)x, (double)y); }
_Check_return_ __CRT_INLINE double fmax(_In_ double x, _In_ double y)
Definition: math.h:348

◆ fmin()

_Check_return_ __CRT_INLINE double fmin ( _In_ double  x,
_In_ double  y 
)

Definition at line 354 of file math.h.

355{
356 if (_isnan(x)) return y;
357 if (_isnan(y)) return x;
358 return (x < y) ? x : y;
359}

◆ fminf()

_Check_return_ __CRT_INLINE float fminf ( _In_ float  x,
_In_ float  y 
)

Definition at line 361 of file math.h.

361{ return (float)fmin((double)x, (double)y); }
_Check_return_ __CRT_INLINE double fmin(_In_ double x, _In_ double y)
Definition: math.h:354

◆ fmod()

◆ fmodf()

_Check_return_ __CRT_INLINE float fmodf ( _In_ float  x,
_In_ float  y 
)

Definition at line 242 of file math.h.

242{ return (float)fmod((double)x,(double)y); }
_Check_return_ double __cdecl fmod(_In_ double x, _In_ double y)

◆ fmodl()

_Check_return_ __CRT_INLINE long double fmodl ( _In_ long double  x,
_In_ long double  y 
)

Definition at line 269 of file math.h.

269{ return (fmod((double)x, (double)y)); }

◆ frexp()

◆ frexpf()

_Check_return_ __CRT_INLINE float frexpf ( _In_ float  x,
_Out_ int *  y 
)

Definition at line 256 of file math.h.

256{ return ((float)frexp((double)x,y)); }
_ACRTIMP double __cdecl frexp(double, int *)
Definition: frexp.c:14

◆ frexpl()

_Check_return_ __CRT_INLINE long double frexpl ( _In_ long double  x,
_Out_ int *  y 
)

Definition at line 270 of file math.h.

270{ return (frexp((double)x, y)); }

◆ hypot()

_Check_return_ __CRT_INLINE double hypot ( _In_ double  x,
_In_ double  y 
)

Definition at line 254 of file math.h.

254{ return _hypot(x, y); }

◆ hypotf()

_Check_return_ __CRT_INLINE float hypotf ( _In_ float  x,
_In_ float  y 
)

Definition at line 255 of file math.h.

255{ return _hypotf(x, y); }
_ACRTIMP float __cdecl _hypotf(float, float)
Definition: hypotf.c:45

◆ hypotl()

_Check_return_ __CRT_INLINE long double hypotl ( _In_ long double  x,
_In_ long double  y 
)

Definition at line 271 of file math.h.

271{ return _hypot((double)x, (double)y); }

◆ labs()

◆ ldexp()

◆ ldexpf()

_Check_return_ __CRT_INLINE float __CRTDECL ldexpf ( _In_ float  x,
_In_ int  y 
)

Definition at line 182 of file math.h.

182{ return (float)ldexp(x, y); }
_ACRTIMP double __cdecl ldexp(double, int)
Definition: math.c:1204

◆ ldexpl()

_Check_return_ __CRT_INLINE long double ldexpl ( _In_ long double  x,
_In_ int  y 
)

Definition at line 282 of file math.h.

282{ return ldexp((double)x, y); }

◆ llabs()

Definition at line 1435 of file stdlib.h.

1435{ return (_j >= 0 ? _j : -_j); }

◆ llrint()

_Check_return_ __CRT_INLINE long long llrint ( _In_ double  x)

Definition at line 309 of file math.h.

309{ return (long long)((x < 0) ? (x - 0.5f) : (x + 0.5)); }

◆ llrintf()

_Check_return_ __CRT_INLINE long long llrintf ( _In_ float  x)

Definition at line 310 of file math.h.

310{ return (long long)((x < 0) ? (x - 0.5f) : (x + 0.5)); }

◆ llrintl()

_Check_return_ __CRT_INLINE long long llrintl ( _In_ long double  x)

Definition at line 311 of file math.h.

311{ return (long long)((x < 0) ? (x - 0.5f) : (x + 0.5)); }

◆ llround()

_Check_return_ __CRT_INLINE long long llround ( _In_ double  x)

Definition at line 300 of file math.h.

300{ return (long long)((x < 0) ? (x - 0.5f) : (x + 0.5)); }

◆ llroundf()

_Check_return_ __CRT_INLINE long long llroundf ( _In_ float  x)

Definition at line 301 of file math.h.

301{ return (long long)((x < 0) ? (x - 0.5f) : (x + 0.5)); }

◆ llroundl()

_Check_return_ __CRT_INLINE long long llroundl ( _In_ long double  x)

Definition at line 302 of file math.h.

302{ return (long long)((x < 0) ? (x - 0.5f) : (x + 0.5)); }

◆ log()

◆ log10()

◆ log10f()

_Check_return_ __CRT_INLINE float log10f ( _In_ float  x)

Definition at line 244 of file math.h.

244{ return (float)log10((double)x); }
_Check_return_ double __cdecl log10(_In_ double x)

◆ log10l()

_Check_return_ __CRT_INLINE long double log10l ( _In_ long double  x)

Definition at line 273 of file math.h.

273{ return (log10((double)x)); }

◆ log2()

_Check_return_ __CRT_INLINE double log2 ( _In_ double  x)

Definition at line 316 of file math.h.

316{ return log(x) / log(2); }
#define log(outFile, fmt,...)
Definition: util.h:15

◆ log2f()

_Check_return_ __CRT_INLINE float log2f ( _In_ float  x)

Definition at line 317 of file math.h.

317{ return (float)(log((double)x) / log(2)); }

◆ logf()

_Check_return_ __CRT_INLINE float logf ( _In_ float  x)

Definition at line 243 of file math.h.

243{ return (float)log((double)x); }

◆ logl()

_Check_return_ __CRT_INLINE long double logl ( _In_ long double  x)

Definition at line 272 of file math.h.

272{ return (log((double)x)); }

◆ lrint()

_Check_return_ __CRT_INLINE long lrint ( _In_ double  x)

Definition at line 306 of file math.h.

306{ return (long)((x < 0) ? (x - 0.5f) : (x + 0.5)); }

◆ lrintf()

_Check_return_ __CRT_INLINE long lrintf ( _In_ float  x)

Definition at line 307 of file math.h.

307{ return (long)((x < 0) ? (x - 0.5f) : (x + 0.5)); }

◆ lrintl()

_Check_return_ __CRT_INLINE long lrintl ( _In_ long double  x)

Definition at line 308 of file math.h.

308{ return (long)((x < 0) ? (x - 0.5f) : (x + 0.5)); }

◆ lround()

_Check_return_ __CRT_INLINE long lround ( _In_ double  x)

Definition at line 297 of file math.h.

297{ return (long)((x < 0) ? (x - 0.5f) : (x + 0.5)); }

◆ lroundf()

_Check_return_ __CRT_INLINE long lroundf ( _In_ float  x)

Definition at line 298 of file math.h.

298{ return (long)((x < 0) ? (x - 0.5f) : (x + 0.5)); }

◆ lroundl()

_Check_return_ __CRT_INLINE long lroundl ( _In_ long double  x)

Definition at line 299 of file math.h.

299{ return (long)((x < 0) ? (x - 0.5f) : (x + 0.5)); }

◆ modf()

◆ modff()

_Check_return_ __CRT_INLINE float modff ( _In_ float  x,
_Out_ float *  y 
)

Definition at line 245 of file math.h.

245{ double _Di,_Df = modf((double)x,&_Di); *y = (float)_Di; return (float)_Df; }
static float(__cdecl *square_half_float)(float x
_Check_return_ _CRTIMP double __cdecl modf(_In_ double x, _Out_ double *y)

◆ modfl()

_Check_return_ __CRT_INLINE long double modfl ( _In_ long double  x,
_Out_ long double *  y 
)

Definition at line 283 of file math.h.

283{ return (long double)modf((double)x, (double *)y); }

◆ pow()

◆ powf()

_Check_return_ __CRT_INLINE float powf ( _In_ float  b,
_In_ float  e 
)

Definition at line 246 of file math.h.

246{ return (float)pow((double)x,(double)y); }

◆ powl()

_Check_return_ __CRT_INLINE long double powl ( _In_ long double  x,
_In_ long double  y 
)

Definition at line 274 of file math.h.

274{ return (pow((double)x, (double)y)); }

◆ rint()

_Check_return_ __CRT_INLINE double rint ( _In_ double  x)

Definition at line 303 of file math.h.

303{ return round(x); }
#define round(x)
Definition: opentype.c:51

◆ rintf()

_Check_return_ __CRT_INLINE float rintf ( _In_ float  x)

Definition at line 304 of file math.h.

304{ return roundf(x); }
_Check_return_ __CRT_INLINE float roundf(_In_ float x)
Definition: math.h:295

◆ rintl()

_Check_return_ __CRT_INLINE long double rintl ( _In_ long double  x)

Definition at line 305 of file math.h.

305{ return roundl(x); }
_Check_return_ __CRT_INLINE long double roundl(_In_ long double x)
Definition: math.h:296

◆ round()

_Check_return_ __CRT_INLINE double round ( _In_ double  x)

Definition at line 294 of file math.h.

294{ return (x < 0) ? ceil(x - 0.5f) : floor(x + 0.5); }

◆ roundf()

_Check_return_ __CRT_INLINE float roundf ( _In_ float  x)

Definition at line 295 of file math.h.

295{ return (x < 0) ? ceilf(x - 0.5f) : floorf(x + 0.5); }
#define ceilf(x)
Definition: mymath.h:62
#define floorf(x)
Definition: mymath.h:65

◆ roundl()

_Check_return_ __CRT_INLINE long double roundl ( _In_ long double  x)

Definition at line 296 of file math.h.

296{ return (x < 0) ? ceill(x - 0.5f) : floorl(x + 0.5); }
_Check_return_ __CRT_INLINE long double ceill(_In_ long double x)
Definition: math.h:263
_Check_return_ __CRT_INLINE long double floorl(_In_ long double x)
Definition: math.h:268

Referenced by rintl().

◆ sin()

◆ sinf()

_Check_return_ __CRT_INLINE float sinf ( _In_ float  x)

Definition at line 247 of file math.h.

247{ return (float)sin((double)x); }
_Check_return_ double __cdecl sin(_In_ double x)

◆ sinh()

◆ sinhf()

_Check_return_ __CRT_INLINE float sinhf ( _In_ float  x)

Definition at line 248 of file math.h.

248{ return (float)sinh((double)x); }
_Check_return_ double __cdecl sinh(_In_ double x)

◆ sinhl()

_Check_return_ __CRT_INLINE long double sinhl ( _In_ long double  x)

Definition at line 276 of file math.h.

276{ return (sinh((double)x)); }

◆ sinl()

_Check_return_ __CRT_INLINE long double sinl ( _In_ long double  x)

Definition at line 275 of file math.h.

275{ return (sin((double)x)); }

◆ sqrt()

◆ sqrtf()

_Check_return_ __CRT_INLINE float sqrtf ( _In_ float  x)

Definition at line 249 of file math.h.

249{ return (float)sqrt((double)x); }
_Check_return_ _CRT_JIT_INTRINSIC double __cdecl sqrt(_In_ double x)

◆ sqrtl()

_Check_return_ __CRT_INLINE long double sqrtl ( _In_ long double  x)

Definition at line 277 of file math.h.

277{ return (sqrt((double)x)); }

◆ tan()

◆ tanf()

_Check_return_ __CRT_INLINE float tanf ( _In_ float  x)

Definition at line 250 of file math.h.

250{ return (float)tan((double)x); }
_Check_return_ double __cdecl tan(_In_ double x)

◆ tanh()

◆ tanhf()

_Check_return_ __CRT_INLINE float tanhf ( _In_ float  x)

Definition at line 251 of file math.h.

251{ return (float)tanh((double)x); }
_Check_return_ double __cdecl tanh(_In_ double x)

◆ tanhl()

_Check_return_ __CRT_INLINE long double tanhl ( _In_ long double  x)

Definition at line 278 of file math.h.

278{return (tanh((double)x)); }

◆ tanl()

_Check_return_ __CRT_INLINE long double __CRTDECL tanl ( _In_ long double  x)

Definition at line 183 of file math.h.

183{ return (tan((double)x)); }

Variable Documentation

◆ _HUGE

_CRTIMP double const _HUGE
extern

Definition at line 6 of file huge_val.c.

◆ y

Definition at line 380 of file math.h.

Referenced by fmax(), and fmin().