newlib: Don't do double divide in powf.

* Use 0.0f instead of 0.0 in divide.
This commit is contained in:
Jim Wilson 2017-12-12 11:39:13 -08:00 committed by Corinna Vinschen
parent c338bc2255
commit c874f1145f
1 changed files with 3 additions and 1 deletions

View File

@ -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)) {