diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2009-08-22 00:25:28 +0400 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2009-08-22 00:25:28 +0400 |
commit | c11ba63d52f86470878b8ab9c22bfc6676f1dd12 (patch) | |
tree | 65a668d161c5874cb4006459269576bd3daeeedb /newlib/libm | |
parent | a2c5f4b4e47813022a63a68dcbcdb3964d5839a9 (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.c | 4 |
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 */ } } |