mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 10:33:11 +00:00
25 lines
No EOL
412 B
C
25 lines
No EOL
412 B
C
// from linux libc
|
|
|
|
#include <crtdll/math.h>
|
|
|
|
long double modfl(long double x,long double *pint);
|
|
|
|
/* Slooow version. */
|
|
|
|
double modf(double x,double *pint)
|
|
{
|
|
if (x >= 0)
|
|
*pint = floor(x);
|
|
else
|
|
*pint = ceil(x);
|
|
return x - *pint;
|
|
}
|
|
|
|
long double modfl(long double x,long double *pint)
|
|
{
|
|
if (x >= 0)
|
|
*pint = floor(x);
|
|
else
|
|
*pint = ceil(x);
|
|
return x - *pint;
|
|
} |