msvcrt: Implement nearbyint and nearbyintf.
Signed-off-by: Stefan Silviu <sylviu44@gmail.com> Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
89d4e14c0a
commit
4d37b87219
|
@ -17130,6 +17130,8 @@ for ac_func in \
|
|||
lrintf \
|
||||
lround \
|
||||
lroundf \
|
||||
nearbyint \
|
||||
nearbyintf \
|
||||
powl \
|
||||
remainder \
|
||||
remainderf \
|
||||
|
|
|
@ -2554,6 +2554,8 @@ AC_CHECK_FUNCS(\
|
|||
lrintf \
|
||||
lround \
|
||||
lroundf \
|
||||
nearbyint \
|
||||
nearbyintf \
|
||||
powl \
|
||||
remainder \
|
||||
remainderf \
|
||||
|
|
|
@ -291,9 +291,9 @@
|
|||
@ stub nan
|
||||
@ stub nanf
|
||||
@ stub nanl
|
||||
@ stub nearbyint
|
||||
@ stub nearbyintf
|
||||
@ stub nearbyintl
|
||||
@ cdecl nearbyint(double) ucrtbase.nearbyint
|
||||
@ cdecl nearbyintf(float) ucrtbase.nearbyintf
|
||||
@ cdecl nearbyintl(double) ucrtbase.nearbyintl
|
||||
@ cdecl nextafter(double double) ucrtbase.nextafter
|
||||
@ cdecl nextafterf(float float) ucrtbase.nextafterf
|
||||
@ cdecl nextafterl(double double) ucrtbase.nextafterl
|
||||
|
|
|
@ -2296,9 +2296,9 @@
|
|||
@ stub nan
|
||||
@ stub nanf
|
||||
@ stub nanl
|
||||
@ stub nearbyint
|
||||
@ stub nearbyintf
|
||||
@ stub nearbyintl
|
||||
@ cdecl nearbyint(double) MSVCRT_nearbyint
|
||||
@ cdecl nearbyintf(float) MSVCRT_nearbyintf
|
||||
@ cdecl nearbyintl(double) MSVCRT_nearbyint
|
||||
@ cdecl nextafter(double double) MSVCRT__nextafter
|
||||
@ cdecl nextafterf(float float) MSVCRT__nextafterf
|
||||
@ cdecl nextafterl(double double) MSVCRT__nextafter
|
||||
|
|
|
@ -1959,9 +1959,9 @@
|
|||
@ stub nan
|
||||
@ stub nanf
|
||||
@ stub nanl
|
||||
@ stub nearbyint
|
||||
@ stub nearbyintf
|
||||
@ stub nearbyintl
|
||||
@ cdecl nearbyint(double) msvcr120.nearbyint
|
||||
@ cdecl nearbyintf(float) msvcr120.nearbyintf
|
||||
@ cdecl nearbyintl(double) msvcr120.nearbyintl
|
||||
@ cdecl nextafter(double double) msvcr120.nextafter
|
||||
@ cdecl nextafterf(float float) msvcr120.nextafterf
|
||||
@ cdecl nextafterl(double double) msvcr120.nextafterl
|
||||
|
|
|
@ -1353,6 +1353,30 @@ double CDECL MSVCRT__yn(int order, double num)
|
|||
return retval;
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* _nearbyint (MSVCRT.@)
|
||||
*/
|
||||
double CDECL MSVCRT_nearbyint(double num)
|
||||
{
|
||||
#ifdef HAVE_NEARBYINT
|
||||
return nearbyint(num);
|
||||
#else
|
||||
return num >= 0 ? floor(num + 0.5) : ceil(num - 0.5);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* _nearbyintf (MSVCRT.@)
|
||||
*/
|
||||
float CDECL MSVCRT_nearbyintf(float num)
|
||||
{
|
||||
#ifdef HAVE_NEARBYINTF
|
||||
return nearbyintf(num);
|
||||
#else
|
||||
return MSVCRT_nearbyint(num);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* _nextafter (MSVCRT.@)
|
||||
*/
|
||||
|
|
|
@ -2432,9 +2432,9 @@
|
|||
@ stub nan
|
||||
@ stub nanf
|
||||
@ stub nanl
|
||||
@ stub nearbyint
|
||||
@ stub nearbyintf
|
||||
@ stub nearbyintl
|
||||
@ cdecl nearbyint(double) MSVCRT_nearbyint
|
||||
@ cdecl nearbyintf(float) MSVCRT_nearbyintf
|
||||
@ cdecl nearbyintl(double) MSVCRT_nearbyint
|
||||
@ cdecl nextafter(double double) MSVCRT__nextafter
|
||||
@ cdecl nextafterf(float float) MSVCRT__nextafterf
|
||||
@ cdecl nextafterl(double double) MSVCRT__nextafter
|
||||
|
|
|
@ -564,6 +564,12 @@
|
|||
/* Define to 1 if you have the <ncurses.h> header file. */
|
||||
#undef HAVE_NCURSES_H
|
||||
|
||||
/* Define to 1 if you have the `nearbyint' function. */
|
||||
#undef HAVE_NEARBYINT
|
||||
|
||||
/* Define to 1 if you have the `nearbyintf' function. */
|
||||
#undef HAVE_NEARBYINTF
|
||||
|
||||
/* Define to 1 if you have the <netdb.h> header file. */
|
||||
#undef HAVE_NETDB_H
|
||||
|
||||
|
|
|
@ -148,6 +148,9 @@ float __cdecl fmodf(float, float);
|
|||
|
||||
#define ldexpf(x,y) ((float)ldexp((double)(x),(y)))
|
||||
|
||||
double __cdecl nearbyint(double);
|
||||
float __cdecl nearbyintf(float);
|
||||
|
||||
float __cdecl _hypotf(float, float);
|
||||
|
||||
int __cdecl _matherr(struct _exception*);
|
||||
|
|
Loading…
Reference in New Issue