Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2009-08-22 00:25:28 +0400
committerJeff Johnston <jjohnstn@redhat.com>2009-08-22 00:25:28 +0400
commitc11ba63d52f86470878b8ab9c22bfc6676f1dd12 (patch)
tree65a668d161c5874cb4006459269576bd3daeeedb /newlib/libm
parenta2c5f4b4e47813022a63a68dcbcdb3964d5839a9 (diff)
2009-08-21 Craig Howland <howland@LGSInnovations.com>
* libm/common/s_remquo.c (remquo): Fix sign of quotient when |x|==|y|. * libc/stdio/mktemp.c: Add #include <stdlib.h> for function prototypes.
Diffstat (limited to 'newlib/libm')
-rw-r--r--newlib/libm/common/s_remquo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/newlib/libm/common/s_remquo.c b/newlib/libm/common/s_remquo.c
index 9e18ab132..8ae287575 100644
--- a/newlib/libm/common/s_remquo.c
+++ b/newlib/libm/common/s_remquo.c
@@ -104,8 +104,8 @@ remquo(double x, double y, int *quo)
goto fixup; /* |x|<|y| return x or x-y */
}
if(lx==ly) {
- *quo = 1;
- return Zero[(__uint32_t)sx>>31]; /* |x|=|y| return x*0*/
+ *quo = (sxy ? -1 : 1);
+ return Zero[(__uint32_t)sx>>31]; /* |x|=|y| return x*0 */
}
}