From: Craig Howland <howland@LGSInnovations.com>
To: <newlib@sourceware.org>
Subject: Re: [PATCH] Avoid extra float->double conversion
Date: Thu, 20 Apr 2017 00:36:00 -0000 [thread overview]
Message-ID: <10ded3d6-37d2-9b85-48f6-501254eaf7fe@LGSInnovations.com> (raw)
In-Reply-To: <CAMY0PLUCOrGeeKZ2HYNPDygXMA+R3PnTM0qZDTYpywN6HHmThg@mail.gmail.com>
On 04/19/2017 08:03 PM, Richard Allen wrote:
> There were a few more spots triggering double-precision math.
> Attached patch updated to include comparisons and multiplies.
>
> On Wed, Apr 19, 2017 at 6:53 PM, Richard Allen <rsaxvc@rsaxvc.net> wrote:
>> Patch avoids an unnecessary float->double
>> conversion to save a small amount of codespace.
>>
>> -Richard
This is better than the first one, with the catch on the constants. Have you
checked what was linked to be certain that no other double things are still
there? (Perhaps easier than inspecting the source.)
To be the most gung-ho, isnan() should be isnanf() throughout--saves a
conversion and might avoid a double function being linked. (It seems odd that
it does have isfinitef(), but not isnanf().)
And just wondering, did you check all of the "f" functions? (I'd guess so since
your 0/0 patch edits multiple files, but better to know for sure.) It would not
be at all surprising if others (or even all) of the f forms had the same flaw.
Craig
next prev parent reply other threads:[~2017-04-20 0:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-19 23:53 Richard Allen
2017-04-20 0:03 ` Richard Allen
2017-04-20 0:36 ` Craig Howland [this message]
2017-04-21 13:30 ` Richard Allen
2017-05-18 23:58 ` Richard Allen
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=10ded3d6-37d2-9b85-48f6-501254eaf7fe@LGSInnovations.com \
--to=howland@lgsinnovations.com \
--cc=newlib@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: link
Be 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).