From owner-freebsd-numerics@freebsd.org Wed Feb 8 15:10:36 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 08B92CD647E for ; Wed, 8 Feb 2017 15:10:36 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id C4A011342 for ; Wed, 8 Feb 2017 15:10:35 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id 0C9741A334D; Thu, 9 Feb 2017 02:10:24 +1100 (AEDT) Date: Thu, 9 Feb 2017 02:10:23 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: "Montgomery-Smith, Stephen" cc: "freebsd-numerics@freebsd.org" Subject: Re: C11 conformance of casinl-like functions. In-Reply-To: <0256e890-05ca-6a1b-9635-88034c544724@missouri.edu> Message-ID: <20170209014517.Y17120@besplex.bde.org> References: <20170208221449.K14261@besplex.bde.org> <0256e890-05ca-6a1b-9635-88034c544724@missouri.edu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=H7qr+6Qi c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=KKXDUkkEAAAA:8 a=nZGPi9ZBRngCGGTXSC0A:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=y4xSRo1Ep5AFAAv36VUM:22 X-BeenThere: freebsd-numerics@freebsd.org X-Mailman-Version: 2.1.23 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, 08 Feb 2017 15:10:36 -0000 On Wed, 8 Feb 2017, Montgomery-Smith, Stephen wrote: > On 02/08/17 06:47, mokhi wrote: >>> I think you mean acosl, asinl, ... >> yeah :D >> >>> These were implemented quite well in 2012-2013, but not quite finished, >>> and not committed. Only the float and double version were committed. >>> The raw versions are still available in >>> https://people.freebsd.org/~stephen/catrig*.c. These have rotted and >>> require some editing. Compare with the committed parts to see most >>> of the necessary editing. >> Okay, I'll do. >> Would you like that I add you on Phabricator for reviewing when my >> editing is done? >> >> Thanks and best wishes, Mokhi. > > I would love to see these functions implemented. I spent a lot of time > on them, and they went through a lot of testing to make sure they were > accurate, even in very extreme edge cases. It was you that implemented them :-). Except for many onerous details like testing on all supported arches and committing them. > Here are more details about the implementation. > > http://faculty.missouri.edu/~stephen/software/#catrig It says that the the results are good to 4 ulps except in float precision. I dout that that is correct. Higher precisions are just less likely to get near the corner cases where the errors are larger. Corner cases are probably only near zeros and poles, but I test the real and imaginary parts separately and this gives a dubious size for an ulp (for the error relative to each part instead of relative to the absolute value of the result). This gives 1-dimensional sets of corner cases. The functions try to get a small error by this measure and mostly succeed. Bruce