Commit 0cdc52c6 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Implement llrintf using rintf function.

parent 45586c57
......@@ -19636,7 +19636,6 @@ for ac_func in \
fmaf \
lgamma \
lgammaf \
llrintf \
log1p \
log1pf \
log2 \
......
......@@ -2676,7 +2676,6 @@ AC_CHECK_FUNCS(\
fmaf \
lgamma \
lgammaf \
llrintf \
log1p \
log1pf \
log2 \
......
......@@ -4388,7 +4388,15 @@ __int64 CDECL llrint(double x)
*/
__int64 CDECL llrintf(float x)
{
return unix_funcs->llrintf( x );
float f;
f = rintf(x);
if ((f < 0 && f != (float)(__int64)f)
|| (f >= 0 && f != (float)(unsigned __int64)f)) {
*_errno() = EDOM;
return 0;
}
return f;
}
/*********************************************************************
......
......@@ -436,18 +436,6 @@ static float CDECL unix_lgammaf(float x)
}
/*********************************************************************
* llrintf
*/
static __int64 CDECL unix_llrintf(float x)
{
#ifdef HAVE_LLRINTF
return llrintf(x);
#else
return x >= 0 ? floorf(x + 0.5) : ceilf(x - 0.5);
#endif
}
/*********************************************************************
* log
*/
static double CDECL unix_log( double x )
......@@ -846,7 +834,6 @@ static const struct unix_funcs funcs =
unix_ldexp,
unix_lgamma,
unix_lgammaf,
unix_llrintf,
unix_log,
unix_logf,
unix_log10,
......
......@@ -60,7 +60,6 @@ struct unix_funcs
double (CDECL *ldexp)(double x, int exp);
double (CDECL *lgamma)(double x);
float (CDECL *lgammaf)(float x);
__int64 (CDECL *llrintf)(float x);
double (CDECL *log)(double x);
float (CDECL *logf)(float x);
double (CDECL *log10)(double x);
......
......@@ -453,9 +453,6 @@
/* Define to 1 if you have the <linux/videodev2.h> header file. */
#undef HAVE_LINUX_VIDEODEV2_H
/* Define to 1 if you have the `llrintf' function. */
#undef HAVE_LLRINTF
/* Define to 1 if you have the `log1p' function. */
#undef HAVE_LOG1P
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment