From owner-freebsd-numerics@FreeBSD.ORG Mon Aug 20 16:29:35 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 43F48106564A for ; Mon, 20 Aug 2012 16:29:35 +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 011D68FC0A for ; Mon, 20 Aug 2012 16:29:34 +0000 (UTC) Received: from [128.206.184.213] (wilberforce.math.missouri.edu [128.206.184.213]) by wilberforce.math.missouri.edu (8.14.5/8.14.5) with ESMTP id q7KGTSH5095059 for ; Mon, 20 Aug 2012 11:29:28 -0500 (CDT) (envelope-from stephen@missouri.edu) Message-ID: <503265E8.3060101@missouri.edu> Date: Mon, 20 Aug 2012 11:29:28 -0500 From: Stephen Montgomery-Smith User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:14.0) Gecko/20120728 Thunderbird/14.0 MIME-Version: 1.0 To: freebsd-numerics@freebsd.org 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> <50295F5C.6010800@missouri.edu> <20120814072946.S5260@besplex.bde.org> <50297CA5.5010900@missouri.edu> <50297E43.7090309@missouri.edu> <20120814201105.T934@besplex.bde.org> <502A780B.2010106@missouri.edu> <20120815223631.N1751@besplex.bde.org> <502C0CF8.8040003@missouri.edu> In-Reply-To: <502C0CF8.8040003@missouri.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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, 20 Aug 2012 16:29:35 -0000 On 08/15/12 15:56, Stephen Montgomery-Smith wrote: > On 08/15/2012 08:35 AM, Bruce Evans wrote: >> On Tue, 14 Aug 2012, Stephen Montgomery-Smith wrote: > > >>> It seemed to me that there is a logic behind why the the infs and nans >>> produce the results they do. I noticed that do_the_hard_work() >>> already got the answers correct for the real part *rx. Getting the >>> imaginary part to work as well seemed to me to be the cleanest way to >>> make it work. (I added all the nan and inf checking after writing the >>> rest of the code.) >> >> An up-front check may still be simpler, and gives more control. In >> csqrt*(), I needed an explicit check and special expressions to get >> uniform behaviour. After thinking about it some more, I decided to go with your approach. The additional checks were so very few, and the code becomes quite a bit simpler. From owner-freebsd-numerics@FreeBSD.ORG Fri Aug 24 03:07:15 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 6306F1065675 for ; Fri, 24 Aug 2012 03:07:15 +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 20E4A8FC12 for ; Fri, 24 Aug 2012 03:07:14 +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 q7O377vp072333 for ; Thu, 23 Aug 2012 22:07:07 -0500 (CDT) (envelope-from stephen@missouri.edu) Message-ID: <5036EFDB.3010304@missouri.edu> Date: Thu, 23 Aug 2012 22:07:07 -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: freebsd-numerics@freebsd.org 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> <50295F5C.6010800@missouri.edu> <20120814072946.S5260@besplex.bde.org> <50297CA5.5010900@missouri.edu> <50297E43.7090309@missouri.edu> <20120814201105.T934@besplex.bde.org> <502A780B.2010106@missouri.edu> <20120815223631.N1751@besplex.bde.org> <502C0CF8.8040003@missouri.edu> <503265E8.3060101@missouri.edu> In-Reply-To: <503265E8.3060101@missouri.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: Fri, 24 Aug 2012 03:07:15 -0000 I just found out that the boost libraries implement the complex asin function. I think their implementation is more faithful to the paper by Hull et al than my implementation is. It does seem to have a BSD style license. The only problem with it is that it is written in C++. http://www.boost.org/doc/libs/1_43_0/boost/math/complex/asin.hpp