aboutsummaryrefslogtreecommitdiff
path: root/newlib/libm/math/wf_pow.c
diff options
context:
space:
mode:
authorJozef Lawrynowicz <jozef.l@mittosystems.com>2019-01-22 10:39:38 +0000
committerCorinna Vinschen <corinna@vinschen.de>2019-01-23 10:46:30 +0100
commitd451d9ec78854766fe4b95795de7bdfa099f8524 (patch)
treee2a5fc697811ebfcc980fccc6d7b3d3822d7ae5a /newlib/libm/math/wf_pow.c
parent7db203304ef12ac1b351b4890b0a4d5f61ad2c0c (diff)
Use HUGE_VALF instead of HUGE_VAL in single-precision float libm math functions
This patch replaces instances of "(float).*HUGE_VAL" with a direct usage of HUGE_VALF, which is also defined in math.h.
Diffstat (limited to 'newlib/libm/math/wf_pow.c')
-rw-r--r--newlib/libm/math/wf_pow.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/newlib/libm/math/wf_pow.c b/newlib/libm/math/wf_pow.c
index 2288977e9..73648b83f 100644
--- a/newlib/libm/math/wf_pow.c
+++ b/newlib/libm/math/wf_pow.c
@@ -51,7 +51,7 @@
if(finitef(y)&&y<0.0f) {
/* 0**neg */
errno = EDOM;
- return (float)-HUGE_VAL;
+ return -HUGE_VALF;
}
return z;
}
@@ -67,8 +67,8 @@
/* powf(x,y) overflow */
errno = ERANGE;
if(x<0.0f&&rintf(y)!=y)
- return (float)-HUGE_VAL;
- return (float)HUGE_VAL;
+ return -HUGE_VALF;
+ return HUGE_VALF;
}
}
}