[PATCH] include: Add some math declarations.

Daniel Lehman dlehman25 at gmail.com
Sun Apr 3 02:16:08 CDT 2022


Signed-off-by: Daniel Lehman <dlehman25 at gmail.com>
---
 include/msvcrt/math.h | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/include/msvcrt/math.h b/include/msvcrt/math.h
index da07303bcd9..a9e6b563eac 100644
--- a/include/msvcrt/math.h
+++ b/include/msvcrt/math.h
@@ -69,12 +69,17 @@ _ACRTIMP double __cdecl fabs(double);
 _ACRTIMP double __cdecl ldexp(double, int);
 _ACRTIMP double __cdecl frexp(double, int*);
 _ACRTIMP double __cdecl modf(double, double*);
+_ACRTIMP double __cdecl fdim(double, double);
+_ACRTIMP double __cdecl fma(double, double, double);
 _ACRTIMP double __cdecl fmod(double, double);
 _ACRTIMP double __cdecl fmin(double, double);
 _ACRTIMP double __cdecl fmax(double, double);
 _ACRTIMP double __cdecl erf(double);
+_ACRTIMP double __cdecl remainder(double, double);
 _ACRTIMP double __cdecl remquo(double, double, int*);
 _ACRTIMP float __cdecl remquof(float, float, int*);
+_ACRTIMP double __cdecl lgamma(double);
+_ACRTIMP double __cdecl tgamma(double);
 
 _ACRTIMP double __cdecl _hypot(double, double);
 _ACRTIMP double __cdecl _j0(double);
@@ -86,18 +91,30 @@ _ACRTIMP double __cdecl _yn(int, double);
 
 _ACRTIMP double __cdecl cbrt(double);
 _ACRTIMP double __cdecl exp2(double);
+_ACRTIMP double __cdecl expm1(double);
+_ACRTIMP double __cdecl ilogb(double);
+_ACRTIMP double __cdecl log1p(double);
 _ACRTIMP double __cdecl log2(double);
+_ACRTIMP double __cdecl logb(double);
 _ACRTIMP double __cdecl rint(double);
 _ACRTIMP double __cdecl round(double);
 _ACRTIMP double __cdecl trunc(double);
 
 _ACRTIMP float __cdecl cbrtf(float);
 _ACRTIMP float __cdecl exp2f(float);
+_ACRTIMP float __cdecl expm1f(float);
+_ACRTIMP float __cdecl ilogbf(float);
+_ACRTIMP float __cdecl log1pf(float);
 _ACRTIMP float __cdecl log2f(float);
+_ACRTIMP float __cdecl logbf(float);
 _ACRTIMP float __cdecl rintf(float);
 _ACRTIMP float __cdecl roundf(float);
 _ACRTIMP float __cdecl truncf(float);
 
+_ACRTIMP long long __cdecl llrint(double);
+_ACRTIMP long long __cdecl llrintf(float);
+_ACRTIMP long long __cdecl llround(double);
+_ACRTIMP long long __cdecl llroundf(float);
 _ACRTIMP __msvcrt_long __cdecl lrint(double);
 _ACRTIMP __msvcrt_long __cdecl lrintf(float);
 _ACRTIMP __msvcrt_long __cdecl lround(double);
@@ -105,6 +122,8 @@ _ACRTIMP __msvcrt_long __cdecl lroundf(float);
 
 _ACRTIMP double __cdecl scalbn(double,int);
 _ACRTIMP float  __cdecl scalbnf(float,int);
+_ACRTIMP double __cdecl scalbln(double,int);
+_ACRTIMP float  __cdecl scalblnf(float,int);
 
 _ACRTIMP double __cdecl _copysign (double, double);
 _ACRTIMP double __cdecl _chgsign (double);
@@ -115,6 +134,8 @@ _ACRTIMP int    __cdecl _finite(double);
 _ACRTIMP int    __cdecl _isnan(double);
 _ACRTIMP int    __cdecl _fpclass(double);
 
+_ACRTIMP double __cdecl nextafter(double, double);
+
 #ifndef __i386__
 
 _ACRTIMP float __cdecl sinf(float);
@@ -137,6 +158,7 @@ _ACRTIMP float __cdecl ceilf(float);
 _ACRTIMP float __cdecl floorf(float);
 _ACRTIMP float __cdecl frexpf(float, int*);
 _ACRTIMP float __cdecl modff(float, float*);
+_ACRTIMP float __cdecl fmaf(float, float, float);
 _ACRTIMP float __cdecl fmodf(float, float);
 
 _ACRTIMP int   __cdecl _finitef(float);
@@ -164,6 +186,7 @@ static inline float ceilf(float x) { return ceil(x); }
 static inline float floorf(float x) { return floor(x); }
 static inline float frexpf(float x, int *y) { return frexp(x, y); }
 static inline float modff(float x, float *y) { double yd, ret = modf(x, &yd); *y = yd; return ret; }
+static inline float fmaf(float x, float y, float z) { return fma(x, y, z); }
 static inline float fmodf(float x, float y) { return fmod(x, y); }
 
 static inline int   _finitef(float x) { return _finite(x); }
@@ -199,6 +222,14 @@ _ACRTIMP float __cdecl _logbf(float);
 _ACRTIMP float __cdecl acoshf(float);
 _ACRTIMP float __cdecl asinhf(float);
 _ACRTIMP float __cdecl atanhf(float);
+_ACRTIMP float __cdecl erff(float);
+_ACRTIMP float __cdecl fdimf(float, float);
+_ACRTIMP float __cdecl fmaxf(float, float);
+_ACRTIMP float __cdecl fminf(float, float);
+_ACRTIMP float __cdecl lgammaf(float);
+_ACRTIMP float __cdecl nextafterf(float, float);
+_ACRTIMP float __cdecl remainderf(float, float);
+_ACRTIMP float __cdecl tgammaf(float);
 
 #else
 
@@ -208,6 +239,14 @@ static inline float _logbf(float x) { return _logb(x); }
 static inline float acoshf(float x) { return acosh(x); }
 static inline float asinhf(float x) { return asinh(x); }
 static inline float atanhf(float x) { return atanh(x); }
+static inline float erff(float x) { return erf(x); }
+static inline float fdimf(float x, float y) { return fdim(x, y); }
+static inline float fmaxf(float x, float y) { return fmax(x, y); }
+static inline float fminf(float x, float y) { return fmin(x, y); }
+static inline float lgammaf(float x) { return lgamma(x); }
+static inline float nextafterf(float x, float y) { return nextafter(x, y); }
+static inline float remainderf(float x, float y) { return remainder(x, y); }
+static inline float tgammaf(float x) { return tgamma(x); }
 
 #endif
 
-- 
2.25.1




More information about the wine-devel mailing list