reactos/reactos/lib/crtdll/math/modf.c
Boudewijn Dekker ed08466464 Added various files.
--> failed to pass test printing a simple string

svn path=/trunk/; revision=380
1999-04-14 21:27:02 +00:00

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;
}