From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 71793 invoked by alias); 26 Oct 2017 18:30:12 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 71651 invoked by uid 89); 26 Oct 2017 18:30:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=H*UA:6.3, H*u:6.3, recommending X-HELO: aserp1040.oracle.com Subject: Re: [PATCH] Improves __ieee754_exp() performance by greater than 5x on sparc/x86. To: Joseph Myers Cc: libc-alpha@sourceware.org References: <1509036263-113745-1-git-send-email-patrick.mcgehearty@oracle.com> From: Patrick McGehearty Message-ID: <11d420be-be7e-45ea-f5b4-4557eca5096b@oracle.com> Date: Thu, 26 Oct 2017 18:30:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2017-10/txt/msg01213.txt.bz2 On 10/26/2017 12:25 PM, Joseph Myers wrote: > On Thu, 26 Oct 2017, Joseph Myers wrote: > >> Unless a particular constant, table etc. is needed in the code both as >> integers and as double, just define it as double and initialize with a C99 >> hex float constant, without involving unions at all. This certainly >> applies to some of your constants, possibly all of them. > To be clear: all my past and present comments about hex floats always mean > C99 0x1.2p3 and similar constants. Never hex integer values with a union > as in this patch. You should never, anywhere in glibc, have any occasion > to initialize a floating-point constant via specifying the integer values > of its representation (except in testcases for special ldbl-96 and > ldbl-128ibm representations). Proper hex floating-point constants are > always better. > I was following the hex pattern used in sysdeps/ieee754/dbl-64/uexp.tbl To be sure I'm understanding your comment correctly, you are recommending I change from the union form of the hex constants to 0x1.23p3 form of the constants and resubmit the patch. That would reduce the chance of errors in any future updates of constant values. Is that correct? - patrick