public inbox for newlib-cvs@sourceware.org help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org> To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] Use nanf() instead of nan() in single-precision float libm math functions Date: Wed, 23 Jan 2019 09:53:00 -0000 [thread overview] Message-ID: <20190123095359.103862.qmail@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=b644774b8f796d58ff9ac71af2c6aa0fa1cbcaf9 commit b644774b8f796d58ff9ac71af2c6aa0fa1cbcaf9 Author: Jozef Lawrynowicz <jozef.l@mittosystems.com> Date: Tue Jan 22 10:40:18 2019 +0000 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. Diff: --- newlib/libm/math/wf_acos.c | 2 +- newlib/libm/math/wf_asin.c | 2 +- newlib/libm/math/wf_log.c | 2 +- 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 15d8699..c24912d 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 2f9ffaf..c9f15e3 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 93d1d21..97f4a7f 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 c9f8ecb..529ed65 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;
reply other threads:[~2019-01-23 9:53 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20190123095359.103862.qmail@sourceware.org \ --to=corinna@sourceware.org \ --cc=newlib-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).