diff options
Diffstat (limited to 'sysdeps/powerpc/power5+')
-rw-r--r-- | sysdeps/powerpc/power5+/fpu/s_modf.c | 4 | ||||
-rw-r--r-- | sysdeps/powerpc/power5+/fpu/s_modff.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sysdeps/powerpc/power5+/fpu/s_modf.c b/sysdeps/powerpc/power5+/fpu/s_modf.c index eb469f7647..06da3ac809 100644 --- a/sysdeps/powerpc/power5+/fpu/s_modf.c +++ b/sysdeps/powerpc/power5+/fpu/s_modf.c @@ -36,12 +36,12 @@ __modf (double x, double *iptr) if (x >= 0.0) { *iptr = __floor (x); - return (x - *iptr); + return __copysign (x - *iptr, x); } else { *iptr = __ceil (x); - return (x - *iptr); + return __copysign (x - *iptr, x); } } weak_alias (__modf, modf) diff --git a/sysdeps/powerpc/power5+/fpu/s_modff.c b/sysdeps/powerpc/power5+/fpu/s_modff.c index e4fe857d29..af17becf13 100644 --- a/sysdeps/powerpc/power5+/fpu/s_modff.c +++ b/sysdeps/powerpc/power5+/fpu/s_modff.c @@ -35,12 +35,12 @@ __modff (float x, float *iptr) if (x >= 0.0) { *iptr = __floorf (x); - return (x - *iptr); + return __copysignf (x - *iptr, x); } else { *iptr = __ceilf (x); - return (x - *iptr); + return __copysignf (x - *iptr, x); } } weak_alias (__modff, modff) |