From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 43341 invoked by alias); 20 Apr 2017 00:36:58 -0000 Mailing-List: contact newlib-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-owner@sourceware.org Received: (qmail 43315 invoked by uid 89); 20 Apr 2017 00:36:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=H*r:sk:mail02., H*RU:sk:mail02., HX-HELO:sk:mail02., Hx-spam-relays-external:sk:mail02. X-HELO: mail02.lgsinnovations.com Received: from mail02.lgsinnovations.com (HELO mail02.lgsinnovations.com) (63.149.110.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 20 Apr 2017 00:36:56 +0000 Subject: Re: [PATCH] Avoid extra float->double conversion To: References: From: Craig Howland Message-ID: <10ded3d6-37d2-9b85-48f6-501254eaf7fe@LGSInnovations.com> Date: Thu, 20 Apr 2017 00:36:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LGS-EX05.lgsdirect.com (135.22.48.227) To LGS-EX02.lgsdirect.com (135.22.77.165) X-IsSubscribed: yes X-SW-Source: 2017/txt/msg00313.txt.bz2 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 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