Use nanf() instead of nan() in single-precision float libm math functions

This patch reduces code size for a few single-precision float math
functions, by using nanf() instead of nan() where required.
This commit is contained in:
Jozef Lawrynowicz 2019-01-22 10:40:18 +00:00 committed by Corinna Vinschen
parent d451d9ec78
commit b644774b8f
4 changed files with 4 additions and 4 deletions

View File

@ -31,7 +31,7 @@
if(fabsf(x)>1.0f) {
/* acosf(|x|>1) */
errno = EDOM;
return (float) nan("");
return nanf("");
} else
return z;
#endif

View File

@ -38,7 +38,7 @@
if(fabsf(x)>1.0f) {
/* asinf(|x|>1) */
errno = EDOM;
return (float)nan("");
return nanf("");
} else
return z;
#endif

View File

@ -41,7 +41,7 @@
} else {
/* logf(x<0) */
errno = EDOM;
return nan("");
return nanf("");
}
#endif
}

View File

@ -41,7 +41,7 @@
} else {
/* log10f(x<0) */
errno = EDOM;
return nan("");
return nanf("");
}
} else
return z;