diff options
author | Jozef Lawrynowicz <jozef.l@mittosystems.com> | 2019-01-22 13:40:18 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2019-01-23 12:46:30 +0300 |
commit | b644774b8f796d58ff9ac71af2c6aa0fa1cbcaf9 (patch) | |
tree | 2ebf29129dcbb0eff46d3ea3d4738a84fb7681ad /newlib | |
parent | d451d9ec78854766fe4b95795de7bdfa099f8524 (diff) |
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.
Diffstat (limited to 'newlib')
-rw-r--r-- | newlib/libm/math/wf_acos.c | 2 | ||||
-rw-r--r-- | newlib/libm/math/wf_asin.c | 2 | ||||
-rw-r--r-- | newlib/libm/math/wf_log.c | 2 | ||||
-rw-r--r-- | newlib/libm/math/wf_log10.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/newlib/libm/math/wf_acos.c b/newlib/libm/math/wf_acos.c index 15d869980..c24912de5 100644 --- a/newlib/libm/math/wf_acos.c +++ b/newlib/libm/math/wf_acos.c @@ -31,7 +31,7 @@ if(fabsf(x)>1.0f) { /* acosf(|x|>1) */ errno = EDOM; - return (float) nan(""); + return nanf(""); } else return z; #endif diff --git a/newlib/libm/math/wf_asin.c b/newlib/libm/math/wf_asin.c index 2f9ffaf6e..c9f15e352 100644 --- a/newlib/libm/math/wf_asin.c +++ b/newlib/libm/math/wf_asin.c @@ -38,7 +38,7 @@ if(fabsf(x)>1.0f) { /* asinf(|x|>1) */ errno = EDOM; - return (float)nan(""); + return nanf(""); } else return z; #endif diff --git a/newlib/libm/math/wf_log.c b/newlib/libm/math/wf_log.c index 93d1d213e..97f4a7f1a 100644 --- a/newlib/libm/math/wf_log.c +++ b/newlib/libm/math/wf_log.c @@ -41,7 +41,7 @@ } else { /* logf(x<0) */ errno = EDOM; - return nan(""); + return nanf(""); } #endif } diff --git a/newlib/libm/math/wf_log10.c b/newlib/libm/math/wf_log10.c index c9f8ecb57..529ed6514 100644 --- a/newlib/libm/math/wf_log10.c +++ b/newlib/libm/math/wf_log10.c @@ -41,7 +41,7 @@ } else { /* log10f(x<0) */ errno = EDOM; - return nan(""); + return nanf(""); } } else return z; |