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:
parent
d451d9ec78
commit
b644774b8f
|
@ -31,7 +31,7 @@
|
|||
if(fabsf(x)>1.0f) {
|
||||
/* acosf(|x|>1) */
|
||||
errno = EDOM;
|
||||
return (float) nan("");
|
||||
return nanf("");
|
||||
} else
|
||||
return z;
|
||||
#endif
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
if(fabsf(x)>1.0f) {
|
||||
/* asinf(|x|>1) */
|
||||
errno = EDOM;
|
||||
return (float)nan("");
|
||||
return nanf("");
|
||||
} else
|
||||
return z;
|
||||
#endif
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
} else {
|
||||
/* logf(x<0) */
|
||||
errno = EDOM;
|
||||
return nan("");
|
||||
return nanf("");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
} else {
|
||||
/* log10f(x<0) */
|
||||
errno = EDOM;
|
||||
return nan("");
|
||||
return nanf("");
|
||||
}
|
||||
} else
|
||||
return z;
|
||||
|
|
Loading…
Reference in New Issue