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:
authorFabian Schriever <fabian.schriever@gtd-gmbh.de>2020-03-02 17:40:23 +0300
committerCorinna Vinschen <corinna@vinschen.de>2020-03-02 18:46:03 +0300
commitcef36220f247e02847ee4f39790b7debcc50a36b (patch)
tree38f2eacdb2761aef449e8dc77748422c7624160d
parentf973a7d8bea03ad840bdcbc7eae032516e75174b (diff)
Fix error in powf for (-1.0, NaN) input
Prevent confusion between -1.0 and 1.0 in powf. The corresponding similar error was previously fixed for pow (see commit bb25dd1b)
-rw-r--r--newlib/libm/math/ef_pow.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/newlib/libm/math/ef_pow.c b/newlib/libm/math/ef_pow.c
index 524e3f9b0..d9e85a95e 100644
--- a/newlib/libm/math/ef_pow.c
+++ b/newlib/libm/math/ef_pow.c
@@ -79,7 +79,7 @@ ivln2_l = 7.0526075433e-06; /* 0x36eca570 =1/ln2 tail*/
/* x|y==NaN return NaN unless x==1 then return 1 */
if(FLT_UWORD_IS_NAN(ix) ||
FLT_UWORD_IS_NAN(iy)) {
- if(ix==0x3f800000) return one;
+ if(hx==0x3f800000) return one;
else return nanf("");
}