aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--newlib/libm/math/wf_pow.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/newlib/libm/math/wf_pow.c b/newlib/libm/math/wf_pow.c
index 9a10254..f753b52 100644
--- a/newlib/libm/math/wf_pow.c
+++ b/newlib/libm/math/wf_pow.c
@@ -108,7 +108,9 @@
if (_LIB_VERSION == _SVID_)
exc.retval = 0.0;
else
- exc.retval = 0.0/0.0; /* X/Open allow NaN */
+ /* Use a float divide, to avoid a soft-float double
+ divide call on single-float only targets. */
+ exc.retval = (0.0f/0.0f); /* X/Open allow NaN */
if (_LIB_VERSION == _POSIX_)
errno = EDOM;
else if (!matherr(&exc)) {