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) { if(fabsf(x)>1.0f) {
/* acosf(|x|>1) */ /* acosf(|x|>1) */
errno = EDOM; errno = EDOM;
return (float) nan(""); return nanf("");
} else } else
return z; return z;
#endif #endif

View File

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

View File

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

View File

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