mirror of
https://github.com/LIV2/libnix.git
synced 2025-12-06 00:23:08 +00:00
14 lines
192 B
C
14 lines
192 B
C
#undef __HAVE_68881__
|
|
#include <math.h>
|
|
|
|
double modf(double x,double *p)
|
|
{
|
|
if(x<0){
|
|
*p=ceil(x);
|
|
return(*p-x);
|
|
}else{
|
|
*p=floor(x);
|
|
return(x-*p);
|
|
}
|
|
}
|