From owner-freebsd-numerics@freebsd.org Sat Dec 16 01:33:31 2017 Return-Path: Delivered-To: freebsd-numerics@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96646E931DE for ; Sat, 16 Dec 2017 01:33:31 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 7D58D6F2C1 for ; Sat, 16 Dec 2017 01:33:31 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.15.2/8.15.2) with ESMTPS id vBG1XPdB029874 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Fri, 15 Dec 2017 17:33:25 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.15.2/8.15.2/Submit) id vBG1XPt4029873 for freebsd-numerics@freebsd.org; Fri, 15 Dec 2017 17:33:25 -0800 (PST) (envelope-from sgk) Date: Fri, 15 Dec 2017 17:33:25 -0800 From: Steve Kargl To: freebsd-numerics@freebsd.org Subject: progress on powl. Message-ID: <20171216013325.GA27344@troutmask.apl.washington.edu> Reply-To: sgk@troutmask.apl.washington.edu MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.7.2 (2016-11-26) X-BeenThere: freebsd-numerics@freebsd.org X-Mailman-Version: 2.1.25 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: Sat, 16 Dec 2017 01:33:31 -0000 All, As expect no one elase is working on powl, I have dusted off my work-in-progress that is now some 1+ year in the works. I've now got a sort of working version in very limited testing. % ./testl -a 1.2345 3.124 libmu = LD80C(0xf7303d48d62e9df4, 0, 1.93115964943387024991e+00L), mpfru = LD80C(0xf7303d48d62e9df5, 0, 1.93115964943387025002e+00L), ulp = 0.73609 I'm still slowing working out some thresholds and few other kinks. The biggest problem is that src/e_pow.c may be the worse commented code that I've had the pleasure to read. There are 3 polynomial approximations. One is easy to work. The other two are gaint mysteries at moment. I'll note that src/e_powf.c uses the same polynomials and it appears that these use naively rounded coefficients. I suspect that these polynomials can be reduced to lower order, but have pursued that yet. -- Steve