From owner-freebsd-numerics@FreeBSD.ORG Sun Jul 29 22:39:37 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 42C08106566B; Sun, 29 Jul 2012 22:39:37 +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 D8C2E8FC12; Sun, 29 Jul 2012 22:39:36 +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 q6TMdR65044239; Sun, 29 Jul 2012 17:39:27 -0500 (CDT) (envelope-from stephen@missouri.edu) Message-ID: <5015BB9F.90807@missouri.edu> Date: Sun, 29 Jul 2012 17:39:27 -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: <20120718123627.D1575@besplex.bde.org> <20120722121219.GC73662@server.rulingia.com> <500DAD41.5030104@missouri.edu> <20120724113214.G934@besplex.bde.org> <501204AD.30605@missouri.edu> <20120727032611.GB25690@server.rulingia.com> <20120728125824.GA26553@server.rulingia.com> <501460BB.30806@missouri.edu> <20120728231300.GA20741@server.rulingia.com> <50148F02.4020104@missouri.edu> <20120729222706.GA29048@server.rulingia.com> In-Reply-To: <20120729222706.GA29048@server.rulingia.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Sun, 29 Jul 2012 23:14:30 +0000 Cc: Diane Bruce , Bruce Evans , John Baldwin , David Chisnall , Bruce Evans , Steve Kargl , David Schultz , Peter Jeremy , Warner Losh Subject: Re: Use of C99 extra long double math functions after r236148 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: Sun, 29 Jul 2012 22:39:37 -0000 On 07/29/2012 05:27 PM, Peter Jeremy wrote: > [For anyone not previously in on this discussion, this is part of an > ongoing discussion that has been occurring off-list in the absence of > a suitable list. It is planned to archive that discussion here, > subject to all the participants agreeing]. > > On 2012-Jul-28 20:16:50 -0500, Stephen Montgomery-Smith wrote: >> One thing your program doesn't check are things like: >> >> real part of casinh(-0+I*x) is -0 >> imaginary part of casinh(x-I*0) is -0 >> >> etc, where x is finite, non-zero. (This follows from casinh being odd >> and conjugate invariant.) > > As it currently exists, my program solely implements the checks in > WG14/N1256 G.6. I hadn't considered extending that to verifying that > purely real or imaginary inputs give purely real or imaginary outputs, > with the appropriately signed zero. This might be reasonable but it's > not completely trivial to implement in general since the domains of > the real part can be different. Maybe this should be a different program, since its logical structure would be quite different. In particular, you wouldn't be checking the value of the non-zero parts. Also I forgot that the real part of casinh(0+I*x) isn't always 0. If |x|>1, it is something non-zero. And so you need to check that creal(casinh(0+I*x)) and creal(casinh(-0+I*x)) have opposite signs in this case. > I'm less sure of the next logical > step, which is to check things like > casinh(x + I*0) = asinh(x) + I*0 Does C99 mandate this? My programs probably won't satisfy this, because I realized that the computation works in these cases anyway. Of course, it would be easy to make it happen.