ReactOS 0.4.16-dev-338-g34e76ad
mingw_math.h File Reference

Go to the source code of this file.

Macros

#define HUGE_VALF   __INFF
 
#define HUGE_VALL   __INFL
 
#define INFINITY   HUGE_VALF
 
#define NAN   __QNAN
 
#define FP_NAN   0x0100
 
#define FP_NORMAL   0x0400
 
#define FP_INFINITE   (FP_NAN | FP_NORMAL)
 
#define FP_ZERO   0x4000
 
#define FP_SUBNORMAL   (FP_NORMAL | FP_ZERO)
 
#define fpclassify(x)
 
#define isfinite(x)   ((fpclassify(x) & FP_NAN) == 0)
 
#define isinf(x)   (fpclassify(x) == FP_INFINITE)
 
#define isnan(x)
 
#define isnormal(x)   (fpclassify(x) == FP_NORMAL)
 
#define signbit(x)
 
#define FP_ILOGB0   ((int)0x80000000)
 
#define FP_ILOGBNAN   ((int)0x80000000)
 
#define _nan()   nan("")
 
#define _nanf()   nanf("")
 
#define _nanl()   nanl("")
 
#define isgreater(x, y)   ((__fp_unordered_compare(x, y) & 0x4500) == 0)
 
#define isless(x, y)   ((__fp_unordered_compare (y, x) & 0x4500) == 0)
 
#define isgreaterequal(x, y)   ((__fp_unordered_compare (x, y) & FP_INFINITE) == 0)
 
#define islessequal(x, y)   ((__fp_unordered_compare(y, x) & FP_INFINITE) == 0)
 
#define islessgreater(x, y)   ((__fp_unordered_compare(x, y) & FP_SUBNORMAL) == 0)
 
#define isunordered(x, y)   ((__fp_unordered_compare(x, y) & 0x4500) == 0x4500)
 

Typedefs

typedef long double float_t
 
typedef long double double_t
 

Functions

int __cdecl __fpclassifyl (long double)
 
int __cdecl __fpclassifyf (float)
 
int __cdecl __fpclassify (double)
 
int __cdecl __isnan (double)
 
int __cdecl __isnanf (float)
 
int __cdecl __isnanl (long double)
 
int __cdecl __signbit (double)
 
int __cdecl __signbitf (float)
 
int __cdecl __signbitl (long double)
 
double __cdecl acosh (double)
 
float __cdecl acoshf (float)
 
long double __cdecl acoshl (long double)
 
double __cdecl asinh (double)
 
float __cdecl asinhf (float)
 
long double __cdecl asinhl (long double)
 
double __cdecl atanh (double)
 
float __cdecl atanhf (float)
 
long double __cdecl atanhl (long double)
 
double __cdecl exp2 (double)
 
float __cdecl exp2f (float)
 
long double __cdecl exp2l (long double)
 
double __cdecl expm1 (double)
 
float __cdecl expm1f (float)
 
long double __cdecl expm1l (long double)
 
int __cdecl ilogb (double)
 
int __cdecl ilogbf (float)
 
int __cdecl ilogbl (long double)
 
double __cdecl log1p (double)
 
float __cdecl log1pf (float)
 
long double __cdecl log1pl (long double)
 
double __cdecl log2 (double)
 
float __cdecl log2f (float)
 
long double __cdecl log2l (long double)
 
double __cdecl logb (double)
 
float __cdecl logbf (float)
 
long double __cdecl logbl (long double)
 
double __cdecl scalbn (double, int)
 
float __cdecl scalbnf (float, int)
 
long double __cdecl scalbnl (long double, int)
 
double __cdecl scalbln (double, long)
 
float __cdecl scalblnf (float, long)
 
long double __cdecl scalblnl (long double, long)
 
double __cdecl cbrt (double)
 
float __cdecl cbrtf (float)
 
long double __cdecl cbrtl (long double)
 
double __cdecl erf (double)
 
float __cdecl erff (float)
 
long double __cdecl erfl (long double)
 
double __cdecl erfc (double)
 
float __cdecl erfcf (float)
 
long double __cdecl erfcl (long double)
 
double __cdecl lgamma (double)
 
float __cdecl lgammaf (float)
 
long double __cdecl lgammal (long double)
 
double __cdecl tgamma (double)
 
float __cdecl tgammaf (float)
 
long double __cdecl tgammal (long double)
 
double __cdecl nearbyint (double)
 
float __cdecl nearbyintf (float)
 
long double __cdecl nearbyintl (long double)
 
double __cdecl rint (double)
 
float __cdecl rintf (float)
 
long double __cdecl rintl (long double)
 
long __cdecl lrint (double)
 
long __cdecl lrintf (float)
 
long __cdecl lrintl (long double)
 
__MINGW_EXTENSION long long __cdecl llrint (double)
 
__MINGW_EXTENSION long long __cdecl llrintf (float)
 
__MINGW_EXTENSION long long __cdecl llrintl (long double)
 
double __cdecl round (double)
 
float __cdecl roundf (float)
 
long double __cdecl roundl (long double)
 
long __cdecl lround (double)
 
long __cdecl lroundf (float)
 
long __cdecl lroundl (long double)
 
__MINGW_EXTENSION long long __cdecl llround (double)
 
__MINGW_EXTENSION long long __cdecl llroundf (float)
 
__MINGW_EXTENSION long long __cdecl llroundl (long double)
 
double __cdecl trunc (double)
 
float __cdecl truncf (float)
 
long double __cdecl truncl (long double)
 
double __cdecl remainder (double, double)
 
float __cdecl remainderf (float, float)
 
long double __cdecl remainderl (long double, long double)
 
double __cdecl remquo (double, double, int *)
 
float __cdecl remquof (float, float, int *)
 
long double __cdecl remquol (long double, long double, int *)
 
double __cdecl copysign (double, double)
 
float __cdecl copysignf (float, float)
 
long double __cdecl copysignl (long double, long double)
 
double __cdecl nan (const char *tagp)
 
float __cdecl nanf (const char *tagp)
 
long double __cdecl nanl (const char *tagp)
 
double __cdecl nextafter (double, double)
 
float __cdecl nextafterf (float, float)
 
long double __cdecl nextafterl (long double, long double)
 
double __cdecl nexttoward (double, long double)
 
float __cdecl nexttowardf (float, long double)
 
long double __cdecl nexttowardl (long double, long double)
 
double __cdecl fdim (double x, double y)
 
float __cdecl fdimf (float x, float y)
 
long double __cdecl fdiml (long double x, long double y)
 
double __cdecl fmax (double, double)
 
float __cdecl fmaxf (float, float)
 
long double __cdecl fmaxl (long double, long double)
 
double __cdecl fmin (double, double)
 
float __cdecl fminf (float, float)
 
long double __cdecl fminl (long double, long double)
 
double __cdecl fma (double, double, double)
 
float __cdecl fmaf (float, float, float)
 
long double __cdecl fmal (long double, long double, long double)
 
__CRT_INLINE int __cdecl __fp_unordered_compare (long double x, long double y)
 

Variables

const float __INFF
 
const long double __INFL
 
const double __QNAN
 

Macro Definition Documentation

◆ _nan

#define _nan ( )    nan("")

Definition at line 465 of file mingw_math.h.

◆ _nanf

#define _nanf ( )    nanf("")

Definition at line 466 of file mingw_math.h.

◆ _nanl

#define _nanl ( )    nanl("")

Definition at line 467 of file mingw_math.h.

◆ FP_ILOGB0

#define FP_ILOGB0   ((int)0x80000000)

Definition at line 209 of file mingw_math.h.

◆ FP_ILOGBNAN

#define FP_ILOGBNAN   ((int)0x80000000)

Definition at line 210 of file mingw_math.h.

◆ FP_INFINITE

#define FP_INFINITE   (FP_NAN | FP_NORMAL)

Definition at line 52 of file mingw_math.h.

◆ FP_NAN

#define FP_NAN   0x0100

Definition at line 50 of file mingw_math.h.

◆ FP_NORMAL

#define FP_NORMAL   0x0400

Definition at line 51 of file mingw_math.h.

◆ FP_SUBNORMAL

#define FP_SUBNORMAL   (FP_NORMAL | FP_ZERO)

Definition at line 54 of file mingw_math.h.

◆ FP_ZERO

#define FP_ZERO   0x4000

Definition at line 53 of file mingw_math.h.

◆ fpclassify

#define fpclassify (   x)
Value:
(sizeof (x) == sizeof (float) ? __fpclassifyf (x) \
: sizeof (x) == sizeof (double) ? __fpclassify (x) \
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
int __cdecl __fpclassify(double)
Definition: mingw_math.h:74
int __cdecl __fpclassifyf(float)
Definition: mingw_math.h:79
int __cdecl __fpclassifyl(long double)
Definition: mingw_math.h:69

Definition at line 86 of file mingw_math.h.

◆ HUGE_VALF

#define HUGE_VALF   __INFF

Definition at line 17 of file mingw_math.h.

◆ HUGE_VALL

#define HUGE_VALL   __INFL

Definition at line 19 of file mingw_math.h.

◆ INFINITY

#define INFINITY   HUGE_VALF

Definition at line 20 of file mingw_math.h.

◆ isfinite

#define isfinite (   x)    ((fpclassify(x) & FP_NAN) == 0)

Definition at line 91 of file mingw_math.h.

◆ isgreater

#define isgreater (   x,
  y 
)    ((__fp_unordered_compare(x, y) & 0x4500) == 0)

Definition at line 537 of file mingw_math.h.

◆ isgreaterequal

#define isgreaterequal (   x,
  y 
)    ((__fp_unordered_compare (x, y) & FP_INFINITE) == 0)

Definition at line 539 of file mingw_math.h.

◆ isinf

#define isinf (   x)    (fpclassify(x) == FP_INFINITE)

Definition at line 94 of file mingw_math.h.

◆ isless

#define isless (   x,
  y 
)    ((__fp_unordered_compare (y, x) & 0x4500) == 0)

Definition at line 538 of file mingw_math.h.

◆ islessequal

#define islessequal (   x,
  y 
)    ((__fp_unordered_compare(y, x) & FP_INFINITE) == 0)

Definition at line 540 of file mingw_math.h.

◆ islessgreater

#define islessgreater (   x,
  y 
)    ((__fp_unordered_compare(x, y) & FP_SUBNORMAL) == 0)

Definition at line 541 of file mingw_math.h.

◆ isnan

#define isnan (   x)
Value:
(sizeof (x) == sizeof (float) ? __isnanf (x) \
: sizeof (x) == sizeof (double) ? __isnan (x) \
: __isnanl (x))
int __cdecl __isnanf(float)
Definition: mingw_math.h:114
int __cdecl __isnan(double)
Definition: mingw_math.h:105
int __cdecl __isnanl(long double)
Definition: mingw_math.h:123

Definition at line 133 of file mingw_math.h.

◆ isnormal

#define isnormal (   x)    (fpclassify(x) == FP_NORMAL)

Definition at line 138 of file mingw_math.h.

◆ isunordered

#define isunordered (   x,
  y 
)    ((__fp_unordered_compare(x, y) & 0x4500) == 0x4500)

Definition at line 542 of file mingw_math.h.

◆ NAN

#define NAN   __QNAN

Definition at line 22 of file mingw_math.h.

◆ signbit

#define signbit (   x)
Value:
(sizeof (x) == sizeof (float) ? __signbitf (x) \
: sizeof (x) == sizeof (double) ? __signbit (x) \
int __cdecl __signbitl(long double)
Definition: mingw_math.h:157
int __cdecl __signbitf(float)
Definition: mingw_math.h:151
int __cdecl __signbit(double)
Definition: mingw_math.h:145

Definition at line 164 of file mingw_math.h.

Typedef Documentation

◆ double_t

typedef long double double_t

Definition at line 40 of file mingw_math.h.

◆ float_t

typedef long double float_t

Definition at line 39 of file mingw_math.h.

Function Documentation

◆ __fp_unordered_compare()

__CRT_INLINE int __cdecl __fp_unordered_compare ( long double  x,
long double  y 
)

Definition at line 529 of file mingw_math.h.

529 {
530 unsigned short retval;
531 __asm__ __volatile__ ("fucom %%st(1);"
532 "fnstsw;": "=a" (retval) : "t" (x), "u" (y));
533 return retval;
534 }
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
__asm__(".p2align 4, 0x90\n" ".seh_proc __seh2_global_filter_func\n" "__seh2_global_filter_func:\n" "\tsub %rbp, %rax\n" "\tpush %rbp\n" "\t.seh_pushreg %rbp\n" "\tsub $32, %rsp\n" "\t.seh_stackalloc 32\n" "\t.seh_endprologue\n" "\tsub %rax, %rdx\n" "\tmov %rdx, %rbp\n" "\tjmp *%r8\n" "__seh2_global_filter_func_exit:\n" "\t.p2align 4\n" "\tadd $32, %rsp\n" "\tpop %rbp\n" "\tret\n" "\t.seh_endproc")

◆ __fpclassify()

__CRT_INLINE int __cdecl __fpclassify ( double  x)

Definition at line 74 of file mingw_math.h.

74 {
75 unsigned short sw;
76 __asm__ __volatile__ ("fxam; fstsw %%ax;" : "=a" (sw): "t" (x));
77 return sw & (FP_NAN | FP_NORMAL | FP_ZERO );
78 }
#define FP_NAN
Definition: mingw_math.h:50
#define FP_ZERO
Definition: mingw_math.h:53
#define FP_NORMAL
Definition: mingw_math.h:51

◆ __fpclassifyf()

__CRT_INLINE int __cdecl __fpclassifyf ( float  x)

Definition at line 79 of file mingw_math.h.

79 {
80 unsigned short sw;
81 __asm__ __volatile__ ("fxam; fstsw %%ax;" : "=a" (sw): "t" (x));
82 return sw & (FP_NAN | FP_NORMAL | FP_ZERO );
83 }

◆ __fpclassifyl()

__CRT_INLINE int __cdecl __fpclassifyl ( long double  x)

Definition at line 69 of file mingw_math.h.

69 {
70 unsigned short sw;
71 __asm__ __volatile__ ("fxam; fstsw %%ax;" : "=a" (sw): "t" (x));
72 return sw & (FP_NAN | FP_NORMAL | FP_ZERO );
73 }

◆ __isnan()

__CRT_INLINE int __cdecl __isnan ( double  _x)

Definition at line 105 of file mingw_math.h.

106 {
107 unsigned short sw;
108 __asm__ __volatile__ ("fxam;"
109 "fstsw %%ax": "=a" (sw) : "t" (_x));
110 return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
111 == FP_NAN;
112 }
#define _x(oid)
#define FP_INFINITE
Definition: mingw_math.h:52
#define FP_SUBNORMAL
Definition: mingw_math.h:54

◆ __isnanf()

__CRT_INLINE int __cdecl __isnanf ( float  _x)

Definition at line 114 of file mingw_math.h.

115 {
116 unsigned short sw;
117 __asm__ __volatile__ ("fxam;"
118 "fstsw %%ax": "=a" (sw) : "t" (_x));
119 return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
120 == FP_NAN;
121 }

◆ __isnanl()

__CRT_INLINE int __cdecl __isnanl ( long double  _x)

Definition at line 123 of file mingw_math.h.

124 {
125 unsigned short sw;
126 __asm__ __volatile__ ("fxam;"
127 "fstsw %%ax": "=a" (sw) : "t" (_x));
128 return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
129 == FP_NAN;
130 }

◆ __signbit()

__CRT_INLINE int __cdecl __signbit ( double  x)

Definition at line 145 of file mingw_math.h.

145 {
146 unsigned short stw;
147 __asm__ __volatile__ ( "fxam; fstsw %%ax;": "=a" (stw) : "t" (x));
148 return stw & 0x0200;
149 }

◆ __signbitf()

__CRT_INLINE int __cdecl __signbitf ( float  x)

Definition at line 151 of file mingw_math.h.

151 {
152 unsigned short stw;
153 __asm__ __volatile__ ("fxam; fstsw %%ax;": "=a" (stw) : "t" (x));
154 return stw & 0x0200;
155 }

◆ __signbitl()

__CRT_INLINE int __cdecl __signbitl ( long double  x)

Definition at line 157 of file mingw_math.h.

157 {
158 unsigned short stw;
159 __asm__ __volatile__ ("fxam; fstsw %%ax;": "=a" (stw) : "t" (x));
160 return stw & 0x0200;
161 }

◆ acosh()

double __cdecl acosh ( double  x)

Definition at line 54 of file fun_ieee.c.

55{
56 // must be x>=1, if not return Nan (Not a Number)
57 if(!(x>=1.0)) return sqrt(-1.0);
58
59 // return only the positive result (as sqrt does).
60 return log(x+sqrt(x*x-1.0));
61}
_STLP_DECLSPEC complex< float > _STLP_CALL sqrt(const complex< float > &)
Definition: complex.cpp:188
#define log(outFile, fmt,...)
Definition: util.h:15

Referenced by rpn_acosh().

◆ acoshf()

float __cdecl acoshf ( float  )

◆ acoshl()

long double __cdecl acoshl ( long double  )

◆ asinh()

double __cdecl asinh ( double  x)

Definition at line 49 of file fun_ieee.c.

50{
51 return log(x+sqrt(x*x+1));
52}

Referenced by rpn_asinh().

◆ asinhf()

float __cdecl asinhf ( float  )

◆ asinhl()

long double __cdecl asinhl ( long double  )

◆ atanh()

double __cdecl atanh ( double  x)

Definition at line 63 of file fun_ieee.c.

64{
65 // must be x>-1, x<1, if not return Nan (Not a Number)
66 if(!(x>-1.0 && x<1.0)) return sqrt(-1.0);
67
68 return log((1.0+x)/(1.0-x))/2.0;
69}

Referenced by rpn_atanh().

◆ atanhf()

float __cdecl atanhf ( float  )

◆ atanhl()

long double __cdecl atanhl ( long double  )

◆ cbrt()

double __cdecl cbrt ( double  )

Referenced by rpn_cbrt().

◆ cbrtf()

float __cdecl cbrtf ( float  )

◆ cbrtl()

long double __cdecl cbrtl ( long double  )

◆ copysign()

double __cdecl copysign ( double  ,
double   
)

◆ copysignf()

float __cdecl copysignf ( float  ,
float   
)

Referenced by float_32_to_16(), and wined3d_ftoa().

◆ copysignl()

long double __cdecl copysignl ( long double  ,
long double   
)

◆ erf()

◆ erfc()

double __cdecl erfc ( double  )

◆ erfcf()

float __cdecl erfcf ( float  )

◆ erfcl()

long double __cdecl erfcl ( long double  )

◆ erff()

float __cdecl erff ( float  )

◆ erfl()

◆ exp2()

◆ exp2f()

float __cdecl exp2f ( float  )

◆ exp2l()

long double __cdecl exp2l ( long double  )

◆ expm1()

double __cdecl expm1 ( double  )

◆ expm1f()

float __cdecl expm1f ( float  )

◆ expm1l()

long double __cdecl expm1l ( long double  )

◆ fdim()

double __cdecl fdim ( double  x,
double  y 
)

◆ fdimf()

float __cdecl fdimf ( float  x,
float  y 
)

◆ fdiml()

long double __cdecl fdiml ( long double  x,
long double  y 
)

◆ fma()

double __cdecl fma ( double  ,
double  ,
double   
)

◆ fmaf()

float __cdecl fmaf ( float  ,
float  ,
float   
)

◆ fmal()

long double __cdecl fmal ( long double  ,
long double  ,
long double   
)

◆ fmax()

double __cdecl fmax ( double  ,
double   
)

◆ fmaxf()

float __cdecl fmaxf ( float  ,
float   
)

◆ fmaxl()

long double __cdecl fmaxl ( long double  ,
long double   
)

◆ fmin()

double __cdecl fmin ( double  ,
double   
)

◆ fminf()

float __cdecl fminf ( float  ,
float   
)

◆ fminl()

long double __cdecl fminl ( long double  ,
long double   
)

◆ ilogb()

int __cdecl ilogb ( double  )

◆ ilogbf()

int __cdecl ilogbf ( float  )

◆ ilogbl()

int __cdecl ilogbl ( long double  )

◆ lgamma()

double __cdecl lgamma ( double  )

◆ lgammaf()

float __cdecl lgammaf ( float  )

◆ lgammal()

long double __cdecl lgammal ( long double  )

◆ llrint()

__MINGW_EXTENSION __CRT_INLINE long long __cdecl llrint ( double  x)

Definition at line 395 of file mingw_math.h.

396 {
397 __MINGW_EXTENSION long long retval = 0ll;
398 __asm__ __volatile__ \
399 ("fistpll %0" : "=m" (retval) : "t" (x) : "st"); \
400 return retval;
401 }
#define __MINGW_EXTENSION
Definition: _mingw.h:166
w ll
Definition: byte_order.h:167

◆ llrintf()

__MINGW_EXTENSION __CRT_INLINE long long __cdecl llrintf ( float  x)

Definition at line 403 of file mingw_math.h.

404 {
405 __MINGW_EXTENSION long long retval = 0ll;
406 __asm__ __volatile__ \
407 ("fistpll %0" : "=m" (retval) : "t" (x) : "st"); \
408 return retval;
409 }

◆ llrintl()

__MINGW_EXTENSION __CRT_INLINE long long __cdecl llrintl ( long double  x)

Definition at line 411 of file mingw_math.h.

412 {
413 __MINGW_EXTENSION long long retval = 0ll;
414 __asm__ __volatile__ \
415 ("fistpll %0" : "=m" (retval) : "t" (x) : "st"); \
416 return retval;
417 }

◆ llround()

◆ llroundf()

◆ llroundl()

◆ log1p()

double __cdecl log1p ( double  )

◆ log1pf()

float __cdecl log1pf ( float  )

◆ log1pl()

long double __cdecl log1pl ( long double  )

◆ log2()

double __cdecl log2 ( double  )

◆ log2f()

float __cdecl log2f ( float  )

◆ log2l()

long double __cdecl log2l ( long double  )

◆ logb()

__CRT_INLINE double __cdecl logb ( double  x)

Definition at line 243 of file mingw_math.h.

244 {
245 double res = 0.0;
246 __asm__ __volatile__ ("fxtract\n\t"
247 "fstp %%st" : "=t" (res) : "0" (x));
248 return res;
249 }
GLuint res
Definition: glext.h:9613

◆ logbf()

__CRT_INLINE float __cdecl logbf ( float  x)

Definition at line 251 of file mingw_math.h.

252 {
253 float res = 0.0F;
254 __asm__ __volatile__ ("fxtract\n\t"
255 "fstp %%st" : "=t" (res) : "0" (x));
256 return res;
257 }

◆ logbl()

__CRT_INLINE long double __cdecl logbl ( long double  x)

Definition at line 259 of file mingw_math.h.

260 {
261 long double res = 0.0l;
262 __asm__ __volatile__ ("fxtract\n\t"
263 "fstp %%st" : "=t" (res) : "0" (x));
264 return res;
265 }

◆ lrint()

__CRT_INLINE long __cdecl lrint ( double  x)

Definition at line 371 of file mingw_math.h.

372 {
373 long retval = 0;
374 __asm__ __volatile__ \
375 ("fistpl %0" : "=m" (retval) : "t" (x) : "st"); \
376 return retval;
377 }

◆ lrintf()

__CRT_INLINE long __cdecl lrintf ( float  x)

Definition at line 379 of file mingw_math.h.

380 {
381 long retval = 0;
382 __asm__ __volatile__ \
383 ("fistpl %0" : "=m" (retval) : "t" (x) : "st"); \
384 return retval;
385 }

◆ lrintl()

__CRT_INLINE long __cdecl lrintl ( long double  x)

Definition at line 387 of file mingw_math.h.

388 {
389 long retval = 0;
390 __asm__ __volatile__ \
391 ("fistpl %0" : "=m" (retval) : "t" (x) : "st"); \
392 return retval;
393 }

◆ lround()

long __cdecl lround ( double  )

◆ lroundf()

long __cdecl lroundf ( float  )

◆ lroundl()

long __cdecl lroundl ( long double  )

◆ nan()

double __cdecl nan ( const char tagp)

◆ nanf()

float __cdecl nanf ( const char tagp)

◆ nanl()

long double __cdecl nanl ( const char tagp)

◆ nearbyint()

double __cdecl nearbyint ( double  )

◆ nearbyintf()

float __cdecl nearbyintf ( float  )

◆ nearbyintl()

long double __cdecl nearbyintl ( long double  )

◆ nextafter()

double __cdecl nextafter ( double  ,
double   
)

◆ nextafterf()

float __cdecl nextafterf ( float  ,
float   
)

◆ nextafterl()

long double __cdecl nextafterl ( long double  ,
long double   
)

◆ nexttoward()

double __cdecl nexttoward ( double  ,
long double   
)

◆ nexttowardf()

float __cdecl nexttowardf ( float  ,
long double   
)

◆ nexttowardl()

long double __cdecl nexttowardl ( long double  ,
long double   
)

◆ remainder()

double __cdecl remainder ( double  x,
double  y 
)

Definition at line 75 of file remainder.c.

79{
80 double dx, dy, scale, w, t, v, c, cc;
81 int i, ntimes, xexp, yexp;
82 unsigned long long u, ux, uy, ax, ay, todd;
83 unsigned int sw;
84
85 dx = x;
86 dy = y;
87
88
89 GET_BITS_DP64(dx, ux);
90 GET_BITS_DP64(dy, uy);
91 ax = ux & ~SIGNBIT_DP64;
92 ay = uy & ~SIGNBIT_DP64;
93 xexp = (int)((ux & EXPBITS_DP64) >> EXPSHIFTBITS_DP64);
94 yexp = (int)((uy & EXPBITS_DP64) >> EXPSHIFTBITS_DP64);
95
96 if (xexp < 1 || xexp > BIASEDEMAX_DP64 ||
97 yexp < 1 || yexp > BIASEDEMAX_DP64)
98 {
99 /* x or y is zero, denormalized, NaN or infinity */
100 if (xexp > BIASEDEMAX_DP64)
101 {
102 /* x is NaN or infinity */
103 if (ux & MANTBITS_DP64)
104 {
105 /* x is NaN */
106 return _handle_error(_FUNCNAME, _OPERATION, ux|0x0008000000000000, _DOMAIN, 0,
107 EDOM, x, y, 2);
108 }
109 else
110 {
111 /* x is infinity; result is NaN */
113 AMD_F_INVALID, EDOM, x, y, 2);
114 }
115 }
116 else if (yexp > BIASEDEMAX_DP64)
117 {
118 /* y is NaN or infinity */
119 if (uy & MANTBITS_DP64)
120 {
121 /* y is NaN */
122 return _handle_error(_FUNCNAME, _OPERATION, uy|0x0008000000000000, _DOMAIN, 0,
123 EDOM, x, y, 2);
124 }
125 else
126 {
127#ifdef _CRTBLD_C9X
128 /* C99 return for y = +-inf is x */
129 return x;
130#else
131 /* y is infinity; result is indefinite */
133 AMD_F_INVALID, EDOM, x, y, 2);
134#endif
135 }
136 }
137 else if (ax == 0x0000000000000000)
138 {
139 /* x is zero */
140 if (ay == 0x0000000000000000)
141 {
142 /* y is zero */
144 AMD_F_INVALID, EDOM, x, y, 2);
145 }
146 else
147 /* C99 return for x = 0 must preserve sign */
148 return x;
149 }
150 else if (ay == 0x0000000000000000)
151 {
152 /* y is zero */
154 AMD_F_INVALID, EDOM, x, y, 2);
155 }
156
157 /* We've exhausted all other possibilities. One or both of x and
158 y must be denormalized */
159 if (xexp < 1)
160 {
161 /* x is denormalized. Figure out its exponent. */
162 u = ax;
163 while (u < IMPBIT_DP64)
164 {
165 xexp--;
166 u <<= 1;
167 }
168 }
169 if (yexp < 1)
170 {
171 /* y is denormalized. Figure out its exponent. */
172 u = ay;
173 while (u < IMPBIT_DP64)
174 {
175 yexp--;
176 u <<= 1;
177 }
178 }
179 }
180 else if (ax == ay)
181 {
182 /* abs(x) == abs(y); return zero with the sign of x */
184 return dx;
185 }
186
187 /* Set x = abs(x), y = abs(y) */
189 PUT_BITS_DP64(ay, dy);
190
191 if (ax < ay)
192 {
193 /* abs(x) < abs(y) */
194#if !defined(COMPILING_FMOD)
195 if (dx > 0.5*dy)
196 dx -= dy;
197#endif
198 return x < 0.0? -dx : dx;
199 }
200
201 /* Save the current floating-point status word. We need
202 to do this because the remainder function is always
203 exact for finite arguments, but our algorithm causes
204 the inexact flag to be raised. We therefore need to
205 restore the entry status before exiting. */
206 sw = get_fpsw_inline();
207
208 /* Set ntimes to the number of times we need to do a
209 partial remainder. If the exponent of x is an exact multiple
210 of 52 larger than the exponent of y, and the mantissa of x is
211 less than the mantissa of y, ntimes will be one too large
212 but it doesn't matter - it just means that we'll go round
213 the loop below one extra time. */
214 if (xexp <= yexp)
215 ntimes = 0;
216 else
217 ntimes = (xexp - yexp) / 52;
218
219 if (ntimes == 0)
220 {
221 w = dy;
222 scale = 1.0;
223 }
224 else
225 {
226 /* Set w = y * 2^(52*ntimes) */
227 w = scaleDouble_3(dy, ntimes * 52);
228
229 /* Set scale = 2^(-52) */
230 PUT_BITS_DP64((unsigned long long)(-52 + EXPBIAS_DP64) << EXPSHIFTBITS_DP64,
231 scale);
232 }
233
234
235 /* Each time round the loop we compute a partial remainder.
236 This is done by subtracting a large multiple of w
237 from x each time, where w is a scaled up version of y.
238 The subtraction must be performed exactly in quad
239 precision, though the result at each stage can
240 fit exactly in a double precision number. */
241 for (i = 0; i < ntimes; i++)
242 {
243 /* t is the integer multiple of w that we will subtract.
244 We use a truncated value for t.
245
246 N.B. w has been chosen so that the integer t will have
247 at most 52 significant bits. This is the amount by
248 which the exponent of the partial remainder dx gets reduced
249 every time around the loop. In theory we could use
250 53 bits in t, but the quad precision multiplication
251 routine dekker_mul12 does not allow us to do that because
252 it loses the last (106th) bit of its quad precision result. */
253
254 /* Set dx = dx - w * t, where t is equal to trunc(dx/w). */
255 t = (double)(long long)(dx / w);
256 /* At this point, t may be one too large due to
257 rounding of dx/w */
258
259 /* Compute w * t in quad precision */
260 dekker_mul12(w, t, &c, &cc);
261
262 /* Subtract w * t from dx */
263 v = dx - c;
264 dx = v + (((dx - v) - c) - cc);
265
266 /* If t was one too large, dx will be negative. Add back
267 one w */
268 /* It might be possible to speed up this loop by finding
269 a way to compute correctly truncated t directly from dx and w.
270 We would then avoid the need for this check on negative dx. */
271 if (dx < 0.0)
272 dx += w;
273
274 /* Scale w down by 2^(-52) for the next iteration */
275 w *= scale;
276 }
277
278 /* One more time */
279 /* Variable todd says whether the integer t is odd or not */
280 t = (double)(long long)(dx / w);
281 todd = ((long long)(dx / w)) & 1;
282 dekker_mul12(w, t, &c, &cc);
283 v = dx - c;
284 dx = v + (((dx - v) - c) - cc);
285 if (dx < 0.0)
286 {
287 todd = !todd;
288 dx += w;
289 }
290
291 /* At this point, dx lies in the range [0,dy) */
292#if !defined(COMPILING_FMOD)
293 /* For the fmod function, we're done apart from setting
294 the correct sign. */
295 /* For the remainder function, we need to adjust dx
296 so that it lies in the range (-y/2, y/2] by carefully
297 subtracting w (== dy == y) if necessary. The rigmarole
298 with todd is to get the correct sign of the result
299 when x/y lies exactly half way between two integers,
300 when we need to choose the even integer. */
301 if (ay < 0x7fd0000000000000)
302 {
303 if (dx + dx > w || (todd && (dx + dx == w)))
304 dx -= w;
305 }
306 else if (dx > 0.5 * w || (todd && (dx == 0.5 * w)))
307 dx -= w;
308
309#endif
310
311 /* **** N.B. for some reason this breaks the 32 bit version
312 of remainder when compiling with optimization. */
313 /* Restore the entry status flags */
314 set_fpsw_inline(sw);
315
316 /* Set the result sign according to input argument x */
317 return x < 0.0? -dx : dx;
318
319}
double __cdecl _handle_error(char *fname, int opcode, unsigned long long value, int type, int flags, int error, double arg1, double arg2, int nargs)
Handles an error condition.
Definition: _handle_error.c:34
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
#define EDOM
Definition: errno.h:39
const GLdouble * v
Definition: gl.h:2040
GLdouble GLdouble t
Definition: gl.h:2047
GLenum GLenum GLenum GLenum GLenum scale
Definition: glext.h:9032
const GLubyte * c
Definition: glext.h:8905
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6102
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 const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
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 _DOMAIN
Definition: math.h:39
uint32_t cc
Definition: isohybrid.c:75
#define c
Definition: ke_i.h:80
#define AMD_F_INVALID
Definition: libm_new.h:86
#define IMPBIT_DP64
Definition: libm_util.h:50
#define INDEFBITPATT_DP64
Definition: libm_util.h:52
#define EXPSHIFTBITS_DP64
Definition: libm_util.h:56
#define GET_BITS_DP64(x, ux)
Definition: libm_util.h:118
#define BIASEDEMAX_DP64
Definition: libm_util.h:59
#define SIGNBIT_DP64
Definition: libm_util.h:44
#define EXPBITS_DP64
Definition: libm_util.h:45
#define EXPBIAS_DP64
Definition: libm_util.h:55
#define MANTBITS_DP64
Definition: libm_util.h:46
#define PUT_BITS_DP64(ux, x)
Definition: libm_util.h:124
GLint dy
Definition: linetemp.h:97
GLint dx
Definition: linetemp.h:97
static const char mbstate_t *static wchar_t const char mbstate_t *static const wchar_t int *static double
Definition: string.c:80
#define long
Definition: qsort.c:33
#define _FUNCNAME
#define _OPERATION
static void dekker_mul12(double x, double y, double *z, double *zz)
Definition: remainder.c:50
ecx edi movl ebx edx edi decl ecx esi eax jecxz decl eax andl eax esi movl edx movl TEMP incl eax andl eax ecx incl ebx testl eax jnz xchgl ecx incl TEMP esp ecx subl ebx pushl ecx ecx edx ecx shrl ecx mm0 mm4 mm0 mm4 mm1 mm5 mm1 mm5 mm2 mm6 mm2 mm6 mm3 mm7 mm3 mm7 paddd mm0 paddd mm4 paddd mm0 paddd mm4 paddd mm0 paddd mm4 movq mm1 movq mm5 psrlq mm1 psrlq mm5 paddd mm0 paddd mm4 psrad mm0 psrad mm4 packssdw mm0 packssdw mm4 mm1 punpckldq mm0 pand mm1 pand mm0 por mm1 movq edi esi edx edi decl ecx jnz popl ecx andl ecx jecxz mm0 mm0 mm1 mm1 mm2 mm2 mm3 mm3 paddd mm0 paddd mm0 paddd mm0 movq mm1 psrlq mm1 paddd mm0 psrad mm0 packssdw mm0 movd eax movw ax
Definition: synth_sse3d.h:180

Referenced by IDirectSoundBufferImpl_Lock(), layout_recall_range(), positive_remainder(), stripe_next_unit(), TAB_SetItemBounds(), test_RegQueryValueExPerformanceData(), VARIANT_DecScale(), VARIANT_DI_div(), VARIANT_DI_mul(), VARIANT_DI_tostringW(), VARIANT_do_division(), VARIANT_int_addlossy(), VARIANT_int_divbychar(), widGetPosition(), and wodGetPosition().

◆ remainderf()

float __cdecl remainderf ( float  x,
float  y 
)

Definition at line 60 of file remainderf.c.

64{
65 double dx, dy, scale, w, t;
66 int i, ntimes, xexp, yexp;
67 unsigned long long ux, uy, ax, ay;
68
69 unsigned int sw;
70
71 dx = x;
72 dy = y;
73
74
75 GET_BITS_DP64(dx, ux);
76 GET_BITS_DP64(dy, uy);
77 ax = ux & ~SIGNBIT_DP64;
78 ay = uy & ~SIGNBIT_DP64;
79 xexp = (int)((ux & EXPBITS_DP64) >> EXPSHIFTBITS_DP64);
80 yexp = (int)((uy & EXPBITS_DP64) >> EXPSHIFTBITS_DP64);
81
82 if (xexp < 1 || xexp > BIASEDEMAX_DP64 ||
83 yexp < 1 || yexp > BIASEDEMAX_DP64)
84 {
85 /* x or y is zero, NaN or infinity (neither x nor y can be
86 denormalized because we promoted from float to double) */
87 if (xexp > BIASEDEMAX_DP64)
88 {
89 /* x is NaN or infinity */
90 if (ux & MANTBITS_DP64)
91 {
92 /* x is NaN */
93 unsigned int ufx;
94 GET_BITS_SP32(x, ufx);
95 return _handle_errorf(_FUNCNAME, _OPERATION, ufx|0x00400000, _DOMAIN, 0,
96 EDOM, x, y, 2);
97 }
98 else
99 {
100 /* x is infinity; result is NaN */
102 AMD_F_INVALID, EDOM, x, y, 2);
103 }
104 }
105 else if (yexp > BIASEDEMAX_DP64)
106 {
107 /* y is NaN or infinity */
108 if (uy & MANTBITS_DP64)
109 {
110 /* y is NaN */
111 unsigned int ufy;
112 GET_BITS_SP32(y, ufy);
113 return _handle_errorf(_FUNCNAME, _OPERATION, ufy|0x00400000, _DOMAIN, 0,
114 EDOM, x, y, 2);
115 }
116 else
117 {
118#ifdef _CRTBLD_C9X
119 /* C99 return for y = +-inf is x */
120 return x;
121#else
122 /* y is infinity; result is indefinite */
124 AMD_F_INVALID, EDOM, x, y, 2);
125#endif
126 }
127 }
128 else if (xexp < 1)
129 {
130 /* x must be zero (cannot be denormalized) */
131 if (yexp < 1)
132 {
133 /* y must be zero (cannot be denormalized) */
135 AMD_F_INVALID, EDOM, x, y, 2);
136 }
137 else
138 /* C99 return for x = 0 must preserve sign */
139 return x;
140 }
141 else
142 {
143 /* y must be zero */
145 AMD_F_INVALID, EDOM, x, y, 2);
146 }
147 }
148 else if (ax == ay)
149 {
150 /* abs(x) == abs(y); return zero with the sign of x */
152 return (float)dx;
153 }
154
155 /* Set dx = abs(x), dy = abs(y) */
157 PUT_BITS_DP64(ay, dy);
158
159 if (ax < ay)
160 {
161 /* abs(x) < abs(y) */
162#if !defined(COMPILING_FMOD)
163 if (dx > 0.5*dy)
164 dx -= dy;
165#endif
166 return (float)(x < 0.0? -dx : dx);
167 }
168
169 /* Save the current floating-point status word. We need
170 to do this because the remainder function is always
171 exact for finite arguments, but our algorithm causes
172 the inexact flag to be raised. We therefore need to
173 restore the entry status before exiting. */
174 sw = get_fpsw_inline();
175
176 /* Set ntimes to the number of times we need to do a
177 partial remainder. If the exponent of x is an exact multiple
178 of 24 larger than the exponent of y, and the mantissa of x is
179 less than the mantissa of y, ntimes will be one too large
180 but it doesn't matter - it just means that we'll go round
181 the loop below one extra time. */
182 if (xexp <= yexp)
183 {
184 ntimes = 0;
185 w = dy;
186 scale = 1.0;
187 }
188 else
189 {
190 ntimes = (xexp - yexp) / 24;
191
192 /* Set w = y * 2^(24*ntimes) */
193 PUT_BITS_DP64((unsigned long long)(ntimes * 24 + EXPBIAS_DP64) << EXPSHIFTBITS_DP64,
194 scale);
195 w = scale * dy;
196 /* Set scale = 2^(-24) */
197 PUT_BITS_DP64((unsigned long long)(-24 + EXPBIAS_DP64) << EXPSHIFTBITS_DP64,
198 scale);
199 }
200
201
202 /* Each time round the loop we compute a partial remainder.
203 This is done by subtracting a large multiple of w
204 from x each time, where w is a scaled up version of y.
205 The subtraction can be performed exactly when performed
206 in double precision, and the result at each stage can
207 fit exactly in a single precision number. */
208 for (i = 0; i < ntimes; i++)
209 {
210 /* t is the integer multiple of w that we will subtract.
211 We use a truncated value for t. */
212 t = (double)((int)(dx / w));
213 dx -= w * t;
214 /* Scale w down by 2^(-24) for the next iteration */
215 w *= scale;
216 }
217
218 /* One more time */
219#if defined(COMPILING_FMOD)
220 t = (double)((int)(dx / w));
221 dx -= w * t;
222#else
223 {
224 unsigned int todd;
225 /* Variable todd says whether the integer t is odd or not */
226 t = (double)((int)(dx / w));
227 todd = ((int)(dx / w)) & 1;
228 dx -= w * t;
229
230 /* At this point, dx lies in the range [0,dy) */
231 /* For the remainder function, we need to adjust dx
232 so that it lies in the range (-y/2, y/2] by carefully
233 subtracting w (== dy == y) if necessary. */
234 if (dx > 0.5 * w || ((dx == 0.5 * w) && todd))
235 dx -= w;
236 }
237#endif
238
239 /* **** N.B. for some reason this breaks the 32 bit version
240 of remainder when compiling with optimization. */
241 /* Restore the entry status flags */
242 set_fpsw_inline(sw);
243
244 /* Set the result sign according to input argument x */
245 return (float)(x < 0.0? -dx : dx);
246
247}
float __cdecl _handle_errorf(char *fname, int opcode, unsigned long long value, int type, int flags, int error, float arg1, float arg2, int nargs)
Definition: _handle_error.c:56
#define INDEFBITPATT_SP32
Definition: libm_util.h:76
#define GET_BITS_SP32(x, ux)
Definition: libm_util.h:105
#define _FUNCNAME
#define _OPERATION

◆ remainderl()

long double __cdecl remainderl ( long double  ,
long double   
)

◆ remquo()

double __cdecl remquo ( double  ,
double  ,
int  
)

◆ remquof()

float __cdecl remquof ( float  ,
float  ,
int  
)

◆ remquol()

long double __cdecl remquol ( long double  ,
long double  ,
int  
)

◆ rint()

__CRT_INLINE double __cdecl rint ( double  x)

Definition at line 350 of file mingw_math.h.

351 {
352 double retval = 0.0;
353 __asm__ __volatile__ ("frndint;": "=t" (retval) : "0" (x));
354 return retval;
355 }

◆ rintf()

__CRT_INLINE float __cdecl rintf ( float  x)

Definition at line 357 of file mingw_math.h.

358 {
359 float retval = 0.0;
360 __asm__ __volatile__ ("frndint;" : "=t" (retval) : "0" (x) );
361 return retval;
362 }

◆ rintl()

__CRT_INLINE long double __cdecl rintl ( long double  x)

Definition at line 364 of file mingw_math.h.

365 {
366 long double retval = 0.0l;
367 __asm__ __volatile__ ("frndint;" : "=t" (retval) : "0" (x) );
368 return retval;
369 }

◆ round()

double __cdecl round ( double  arg)

Definition at line 10 of file round.c.

11{
12 if (arg < 0.0)
13 return ceil(arg - 0.5);
14 else
15 return floor(arg + 0.5);
16}
_Check_return_ _CRTIMP double __cdecl floor(_In_ double x)
_Check_return_ _CRTIMP double __cdecl ceil(_In_ double x)

◆ roundf()

float __cdecl roundf ( float  arg)

Definition at line 10 of file roundf.c.

11{
12 if (arg < 0.0)
13 return ceilf(arg - 0.5);
14 else
15 return floorf(arg + 0.5);
16}
#define ceilf(x)
Definition: mymath.h:62
#define floorf(x)
Definition: mymath.h:65

◆ roundl()

long double __cdecl roundl ( long double  )

◆ scalbln()

double __cdecl scalbln ( double  ,
long   
)

◆ scalblnf()

float __cdecl scalblnf ( float  ,
long   
)

◆ scalblnl()

long double __cdecl scalblnl ( long double  ,
long   
)

◆ scalbn()

double __cdecl scalbn ( double  ,
int   
)

◆ scalbnf()

float __cdecl scalbnf ( float  ,
int   
)

◆ scalbnl()

long double __cdecl scalbnl ( long double  ,
int   
)

◆ tgamma()

double __cdecl tgamma ( double  )

◆ tgammaf()

float __cdecl tgammaf ( float  )

◆ tgammal()

long double __cdecl tgammal ( long double  )

◆ trunc()

double __cdecl trunc ( double  )

Referenced by divide_ext().

◆ truncf()

float __cdecl truncf ( float  )

◆ truncl()

long double __cdecl truncl ( long double  )

Variable Documentation

◆ __INFF

const float __INFF
extern

◆ __INFL

const long double __INFL
extern

◆ __QNAN

const double __QNAN
extern