From owner-freebsd-numerics@FreeBSD.ORG Wed Aug 15 15:39:58 2012 Return-Path: Delivered-To: freebsd-numerics@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C0FEC1065677 for ; Wed, 15 Aug 2012 15:39:58 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail01.syd.optusnet.com.au (mail01.syd.optusnet.com.au [211.29.132.182]) by mx1.freebsd.org (Postfix) with ESMTP id 403C28FC12 for ; Wed, 15 Aug 2012 15:39:57 +0000 (UTC) Received: from c122-106-171-246.carlnfd1.nsw.optusnet.com.au (c122-106-171-246.carlnfd1.nsw.optusnet.com.au [122.106.171.246]) by mail01.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q7FFdmxP023395 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 16 Aug 2012 01:39:50 +1000 Date: Thu, 16 Aug 2012 01:39:48 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Peter Jeremy In-Reply-To: <20120814235832.GC33399@server.rulingia.com> Message-ID: <20120816012258.U2233@besplex.bde.org> References: <502A8CCC.5080606@missouri.edu> <20120814175257.GA69865@troutmask.apl.washington.edu> <20120814183518.GA70092@troutmask.apl.washington.edu> <502AA971.4010403@missouri.edu> <20120814195659.GA70571@troutmask.apl.washington.edu> <20120815070807.B3431@besplex.bde.org> <20120814235832.GC33399@server.rulingia.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-numerics@freebsd.org Subject: Re: Status of expl logl X-BeenThere: freebsd-numerics@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussions of high quality implementation of libm functions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2012 15:39:58 -0000 On Wed, 15 Aug 2012, Peter Jeremy wrote: > On 2012-Aug-15 08:15:52 +1000, Bruce Evans wrote: >> I hardly looked at e_pow.c before. It is apparently half about repeating >> e_log.c and e_exp.c, to get at their extra internal precision. > > I expect cpow() will similarly have to copy slabs of code from e_pow.c > to avoid losing precision or domain. Is it worth pulling some of this > "common" code out so that it can be shared amongst all the different > functions that need it? We already have kernels for exp and log, but it is difficult to find the right interfaces and internals, and these don't have them. There are also __exp__D() and __log__D(). My s_log*.c have yet another interface. With heavyweight inlining and optimization, it works OK to return internals in a big struct, with flags saying what was returned. However, the compiler never seems to do quite as well as manual inlining. Bruce