From owner-freebsd-numerics@FreeBSD.ORG Mon Aug 13 19:42:07 2012 Return-Path: Delivered-To: freebsd-numerics@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB7E9106564A for ; Mon, 13 Aug 2012 19:42:07 +0000 (UTC) (envelope-from stephen@missouri.edu) Received: from wilberforce.math.missouri.edu (wilberforce.math.missouri.edu [128.206.184.213]) by mx1.freebsd.org (Postfix) with ESMTP id AB0788FC0C for ; Mon, 13 Aug 2012 19:42:07 +0000 (UTC) Received: from [127.0.0.1] (wilberforce.math.missouri.edu [128.206.184.213]) by wilberforce.math.missouri.edu (8.14.5/8.14.5) with ESMTP id q7DJfxpR020858; Mon, 13 Aug 2012 14:42:00 -0500 (CDT) (envelope-from stephen@missouri.edu) Message-ID: <50295887.2010608@missouri.edu> Date: Mon, 13 Aug 2012 14:41:59 -0500 From: Stephen Montgomery-Smith User-Agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120714 Thunderbird/14.0 MIME-Version: 1.0 To: Bruce Evans References: <5017111E.6060003@missouri.edu> <501C361D.4010807@missouri.edu> <20120804165555.X1231@besplex.bde.org> <501D51D7.1020101@missouri.edu> <20120805030609.R3101@besplex.bde.org> <501D9C36.2040207@missouri.edu> <20120805175106.X3574@besplex.bde.org> <501EC015.3000808@missouri.edu> <20120805191954.GA50379@troutmask.apl.washington.edu> <20120807205725.GA10572@server.rulingia.com> <20120809025220.N4114@besplex.bde.org> <5027F07E.9060409@missouri.edu> <20120814003614.H3692@besplex.bde.org> In-Reply-To: <20120814003614.H3692@besplex.bde.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-numerics@FreeBSD.org Subject: Re: Complex arg-trig functions 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: Mon, 13 Aug 2012 19:42:08 -0000 On 08/13/2012 11:57 AM, Bruce Evans wrote: > I finally tested a version of this. I only did simple comparisons (float > vs double and double vs long double). The results look promising after > fixing a few bugs: Thank you very much for doing the testing, and for fixing the bugs. > > % amd64 float prec, on 2**12 * 2**12 args: > % icacosh:max_er = 0x3690000000 436.5000, avg_er = 0.317, #>=1:0.5 = > 29104:255732 > There are negative reasons to have the float versions unless they are not > wrappers. The reasons to have non-wrappers are to test the algorithm and > run faster. That large max-err for the imaginary part of icacosh for float bothers me. It means that I haven't thought it through properly. Could you send me the input values that created this error(s)? The float versions really are much harder than the double and long-double versions. And it just doesn't seem worth the effort, because who uses them when the double versions are available? In my case, not for speed. Because on my machine the float versions are slightly slower than the double version. Also, you made the comment that in the float version, all the 0.5 should become 0.5F. Two questions: 1. Doesn't the compiler do this conversion for me? 2. What is wrong with using x/2 instead of 0.5*x? You told me in a far earlier email to use 0.5*x. (Similarly in one place I have a 0.25.)