1#if defined(__SOFTFP__)
2
3#include <math.h>
4#warning Temporary softfloat implementation of modf, performance is expected to be terrible.
5
6double modf(double x, double *iptr) {
7 *iptr = trunc(x);
8 double tmp = isinf(x) ? 0.0 : x - *iptr;
9 return __builtin_copysign(tmp, x);
10}
11
12#endif