From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 108647 invoked by alias); 14 Dec 2017 01:28:48 -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 108627 invoked by uid 89); 14 Dec 2017 01:28:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS,URIBL_RED autolearn=ham version=3.3.2 spammy=degree X-HELO: relay1.mentorg.com Date: Thu, 14 Dec 2017 01:28:00 -0000 From: Joseph Myers To: Patrick McGehearty CC: Subject: Re: [PATCH] Improves __ieee754_exp() performance by greater than 5x on sparc/x86. In-Reply-To: <1512774211-43942-1-git-send-email-patrick.mcgehearty@oracle.com> Message-ID: References: <1512774211-43942-1-git-send-email-patrick.mcgehearty@oracle.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-SW-Source: 2017-12/txt/msg00422.txt.bz2 On Fri, 8 Dec 2017, Patrick McGehearty wrote: > Revised constants t2, t3, t4, t5 to better match values of 1/n factorial. To expand on the logic for such a change: If the values were previously not 1/n! presumably they were coefficients in some form of minimax approximation minimising the maximum error (however measured) in the interval used in the original implementation. The maximum error from just using 1/n! would be at the endpoints of the interval (whereas a minimax approximation using an nth degree polynomial would have equal maximum errors with alternating signs at n+2 points - increasing some errors closer to 0 to decrease those at the endpoints). You've changed the code to use a narrower interval. Thus, the original minimax approximation is no longer optimal for the new interval, and it's quite plausible that the maximum error from using 1/n! is smaller when you restrict to the new interval. This patch version is OK. -- Joseph S. Myers joseph@codesourcery.com