From owner-freebsd-numerics@FreeBSD.ORG Mon Dec 17 04:18:24 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 E1DD5289 for ; Mon, 17 Dec 2012 04:18:24 +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 8A4CE8FC12 for ; Mon, 17 Dec 2012 04:18:24 +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 qBH4IKHT039249 for ; Sun, 16 Dec 2012 22:18:23 -0600 (CST) (envelope-from stephen@missouri.edu) Message-ID: <50CE9D0C.8080901@missouri.edu> Date: Sun, 16 Dec 2012 22:18:20 -0600 From: Stephen Montgomery-Smith User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: freebsd-numerics@freebsd.org Subject: complex arc-trig etc X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-numerics@freebsd.org X-Mailman-Version: 2.1.14 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, 17 Dec 2012 04:18:25 -0000 Hey guys, my complex arc-trig functions at http://people.freebsd.org/~stephen/ have been sitting there a long time. Anyone want to commit them? Thanks, Stephen From owner-freebsd-numerics@FreeBSD.ORG Mon Dec 17 04:54:15 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 33AB099F for ; Mon, 17 Dec 2012 04:54:15 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) by mx1.freebsd.org (Postfix) with ESMTP id DE87F8FC13 for ; Mon, 17 Dec 2012 04:54:14 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.5/8.14.5) with ESMTP id qBH4mZtd016214; Sun, 16 Dec 2012 20:48:35 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.5/8.14.5/Submit) id qBH4mZZV016213; Sun, 16 Dec 2012 20:48:35 -0800 (PST) (envelope-from sgk) Date: Sun, 16 Dec 2012 20:48:35 -0800 From: Steve Kargl To: Stephen Montgomery-Smith Subject: Re: complex arc-trig etc Message-ID: <20121217044835.GA16191@troutmask.apl.washington.edu> References: <50CE9D0C.8080901@missouri.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50CE9D0C.8080901@missouri.edu> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-numerics@freebsd.org X-BeenThere: freebsd-numerics@freebsd.org X-Mailman-Version: 2.1.14 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, 17 Dec 2012 04:54:15 -0000 On Sun, Dec 16, 2012 at 10:18:20PM -0600, Stephen Montgomery-Smith wrote: > Hey guys, my complex arc-trig functions at > http://people.freebsd.org/~stephen/ have been sitting there a long time. > Anyone want to commit them? > I've been swamped with work and family life. What little time I have has been spent on trying to fix the implementation of expm1l. I won't have time to look over the code or do any testing for awhile. I know you and Bruce worked on the details. If Bruce says that code can be committed, I have no objection. -- Steve From owner-freebsd-numerics@FreeBSD.ORG Mon Dec 17 08:39:01 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 49D8EB56 for ; Mon, 17 Dec 2012 08:39:01 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail02.syd.optusnet.com.au (mail02.syd.optusnet.com.au [211.29.132.183]) by mx1.freebsd.org (Postfix) with ESMTP id C24D58FC14 for ; Mon, 17 Dec 2012 08:38:56 +0000 (UTC) Received: from c122-106-175-26.carlnfd1.nsw.optusnet.com.au (c122-106-175-26.carlnfd1.nsw.optusnet.com.au [122.106.175.26]) by mail02.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id qBH8cllC012662 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 17 Dec 2012 19:38:49 +1100 Date: Mon, 17 Dec 2012 19:38:47 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Stephen Montgomery-Smith Subject: Re: complex arc-trig etc In-Reply-To: <50CE9D0C.8080901@missouri.edu> Message-ID: <20121217191324.T1277@besplex.bde.org> References: <50CE9D0C.8080901@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.0 cv=CJhyxmXD c=1 sm=1 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=dRsa3-H_XCsA:10 a=6I5d2MoRAAAA:8 a=SeOzMwUpzxxNuz14_owA:9 a=CjuIK1q_8ugA:10 a=YvYoSAOdmps8Tcex:21 a=yI1VI7nG_aBaLIG-:21 a=bxQHXO5Py4tHmhUgaywp5w==:117 Cc: freebsd-numerics@FreeBSD.org X-BeenThere: freebsd-numerics@freebsd.org X-Mailman-Version: 2.1.14 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, 17 Dec 2012 08:39:01 -0000 On Sun, 16 Dec 2012, Stephen Montgomery-Smith wrote: > Hey guys, my complex arc-trig functions at > http://people.freebsd.org/~stephen/ have been sitting there a long time. > Anyone want to commit them? I was sort of waiting for the next rounds of changes: 1. update the template to give similar code for float and long double 2. make it work for i386 using ENTERI() 3. test (2) 4. fix some style bugs. It would be easy for me to run it through indent(1) and get large diffs, but I want you to do it. 5. decide what to do for atanhl(). I would prefer a version that is a direct translation of e_atanh.c including style bugs and the filename prefix but not the comment, unless you change the algorithm. 6. decide what to do with the template and/or the generation from it that strips comments. I haven't done (2), (3) or (6) for clog*() either. For (6), instead of a template and stripped comments, I have all the functions in the same file and all comments duplicated, and have to split the file manually to compare the functions. I only have these local patches. They correspond to (1) and (5). Also, keep up with the API change in LD80C(). % --- /home/stephen/public_html/catrigf.c 2012-09-22 21:13:50.000000000 +0000 % +++ catrigf.c 2012-09-22 21:35:51.287614000 +0000 % @@ -353,12 +353,7 @@ % } % % - if (ax == 1 && ay < FLT_EPSILON) { % -#if 0 % - if (ay > 2*FLT_MIN) % - rx = - logf(ay/2) / 2; % - else % -#endif % - rx = - (logf(ay) - m_ln2) / 2; % - } else % + if (ax == 1 && ay < FLT_EPSILON) % + rx = - (logf(ay) - m_ln2) / 2; % + else % rx = log1pf(4*ax / sum_squares(ax-1, ay)) / 4; % % --- /home/stephen/public_html/catrigl.c 2012-09-22 21:14:24.000000000 +0000 % +++ catrigl.c 2012-09-28 19:39:47.799585000 +0000 % @@ -60,6 +60,6 @@ % #if LDBL_MANT_DIG == 64 % static const union IEEEl2bits % -um_e = LD80C(0xadf85458a2bb4a9b, 1, 0, 2.71828182845904523536e0L), % -um_ln2 = LD80C(0xb17217f7d1cf79ac, -1, 0, 6.93147180559945309417e-1L); % +um_e = LD80C(0xadf85458a2bb4a9b, 1, 2.71828182845904523536e+0L), % +um_ln2 = LD80C(0xb17217f7d1cf79ac, -1, 6.93147180559945309417e-1L); % #define m_e um_e.e % #define m_ln2 um_ln2.e % @@ -348,5 +348,5 @@ % % if (y == 0 && ax <= 1) % - return (cpackl(atanhl(x), y)); /* XXX need atanhl() */ % + return (cpackl(atanh(x), y)); /* XXX need atanhl() */ % % if (x == 0) % @@ -369,12 +369,7 @@ % } % % - if (ax == 1 && ay < LDBL_EPSILON) { % -#if 0 % - if (ay > 2*LDBL_MIN) % - rx = - logl(ay/2) / 2; % - else % -#endif % - rx = - (logl(ay) - m_ln2) / 2; % - } else % + if (ax == 1 && ay < LDBL_EPSILON) % + rx = - (logl(ay) - m_ln2) / 2; % + else % rx = log1pl(4*ax / sum_squares(ax-1, ay)) / 4; % You also need log*l() be committed before catrigl() can work. Bruce From owner-freebsd-numerics@FreeBSD.ORG Mon Dec 17 11:06:48 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 1FFAC9D1 for ; Mon, 17 Dec 2012 11:06:48 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 035FD8FC13 for ; Mon, 17 Dec 2012 11:06:48 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id qBHB6le3023533 for ; Mon, 17 Dec 2012 11:06:47 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id qBHB6lnv023531 for freebsd-numerics@FreeBSD.org; Mon, 17 Dec 2012 11:06:47 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 17 Dec 2012 11:06:47 GMT Message-Id: <201212171106.qBHB6lnv023531@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-numerics@FreeBSD.org Subject: Current problem reports assigned to freebsd-numerics@FreeBSD.org X-BeenThere: freebsd-numerics@freebsd.org X-Mailman-Version: 2.1.14 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, 17 Dec 2012 11:06:48 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o bin/170206 numerics [msun] [patch] complex arcsinh, log, etc. 1 problem total. From owner-freebsd-numerics@FreeBSD.ORG Mon Dec 17 13:30:49 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 E1107AD8 for ; Mon, 17 Dec 2012 13:30:49 +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 B3C528FC15 for ; Mon, 17 Dec 2012 13:30:49 +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 qBHDUlb2090001; Mon, 17 Dec 2012 07:30:48 -0600 (CST) (envelope-from stephen@missouri.edu) Message-ID: <50CF1E87.7030803@missouri.edu> Date: Mon, 17 Dec 2012 07:30:47 -0600 From: Stephen Montgomery-Smith User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Bruce Evans Subject: Re: complex arc-trig etc References: <50CE9D0C.8080901@missouri.edu> <20121217191324.T1277@besplex.bde.org> In-Reply-To: <20121217191324.T1277@besplex.bde.org> X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-numerics@freebsd.org X-BeenThere: freebsd-numerics@freebsd.org X-Mailman-Version: 2.1.14 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, 17 Dec 2012 13:30:49 -0000 On 12/17/2012 02:38 AM, Bruce Evans wrote: > On Sun, 16 Dec 2012, Stephen Montgomery-Smith wrote: > >> Hey guys, my complex arc-trig functions at >> http://people.freebsd.org/~stephen/ have been sitting there a long time. >> Anyone want to commit them? > > I was sort of waiting for the next rounds of changes: > > 1. update the template to give similar code for float and long double > 2. make it work for i386 using ENTERI() > 3. test (2) > 4. fix some style bugs. It would be easy for me to run it through > indent(1) and get large diffs, but I want you to do it. > 5. decide what to do for atanhl(). I would prefer a version that is a > direct translation of e_atanh.c including style bugs and the filename > prefix but not the comment, unless you change the algorithm. > 6. decide what to do with the template and/or the generation from it > that strips comments. > > I haven't done (2), (3) or (6) for clog*() either. For (6), instead of > a template and stripped comments, I have all the functions in the same > file and all comments duplicated, and have to split the file manually > to compare the functions. > > I only have these local patches. They correspond to (1) and (5). Also, > keep up with the API change in LD80C(). > > % --- /home/stephen/public_html/catrigf.c 2012-09-22 > 21:13:50.000000000 +0000 > % +++ catrigf.c 2012-09-22 21:35:51.287614000 +0000 > % @@ -353,12 +353,7 @@ > % } > % % - if (ax == 1 && ay < FLT_EPSILON) { > % -#if 0 > % - if (ay > 2*FLT_MIN) > % - rx = - logf(ay/2) / 2; > % - else > % -#endif > % - rx = - (logf(ay) - m_ln2) / 2; > % - } else > % + if (ax == 1 && ay < FLT_EPSILON) > % + rx = - (logf(ay) - m_ln2) / 2; > % + else > % rx = log1pf(4*ax / sum_squares(ax-1, ay)) / 4; > % % --- /home/stephen/public_html/catrigl.c 2012-09-22 > 21:14:24.000000000 +0000 > % +++ catrigl.c 2012-09-28 19:39:47.799585000 +0000 > % @@ -60,6 +60,6 @@ > % #if LDBL_MANT_DIG == 64 > % static const union IEEEl2bits > % -um_e = LD80C(0xadf85458a2bb4a9b, 1, 0, > 2.71828182845904523536e0L), > % -um_ln2 = LD80C(0xb17217f7d1cf79ac, -1, 0, > 6.93147180559945309417e-1L); > % +um_e = LD80C(0xadf85458a2bb4a9b, 1, 2.71828182845904523536e+0L), > % +um_ln2 = LD80C(0xb17217f7d1cf79ac, -1, 6.93147180559945309417e-1L); > % #define m_e um_e.e > % #define m_ln2 um_ln2.e > % @@ -348,5 +348,5 @@ > % % if (y == 0 && ax <= 1) > % - return (cpackl(atanhl(x), y)); /* XXX need atanhl() */ > % + return (cpackl(atanh(x), y)); /* XXX need atanhl() */ > % % if (x == 0) > % @@ -369,12 +369,7 @@ > % } > % % - if (ax == 1 && ay < LDBL_EPSILON) { > % -#if 0 > % - if (ay > 2*LDBL_MIN) > % - rx = - logl(ay/2) / 2; > % - else > % -#endif > % - rx = - (logl(ay) - m_ln2) / 2; > % - } else > % + if (ax == 1 && ay < LDBL_EPSILON) > % + rx = - (logl(ay) - m_ln2) / 2; > % + else > % rx = log1pl(4*ax / sum_squares(ax-1, ay)) / 4; > % > > You also need log*l() be committed before catrigl() can work. > > Bruce > > OK, I didn't realize it needed this much work (which I admit isn't that much but...). So maybe I'll sit on these things for a while. I am not swamped like Steve is. But I do have other projects that should take priority for now. Thanks, Stephen