From owner-freebsd-numerics@FreeBSD.ORG Sun Aug 12 23:10: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 2AD9B1065678 for ; Sun, 12 Aug 2012 23:10:24 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vps.rulingia.com (host-122-100-2-194.octopus.com.au [122.100.2.194]) by mx1.freebsd.org (Postfix) with ESMTP id B36FF8FC0A for ; Sun, 12 Aug 2012 23:10:23 +0000 (UTC) Received: from server.rulingia.com (c220-239-249-137.belrs5.nsw.optusnet.com.au [220.239.249.137]) by vps.rulingia.com (8.14.5/8.14.5) with ESMTP id q7CNANtk075819 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 13 Aug 2012 09:10:23 +1000 (EST) (envelope-from peter@rulingia.com) X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.14.5/8.14.5) with ESMTP id q7CNAGUL021612 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 13 Aug 2012 09:10:17 +1000 (EST) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.14.5/8.14.5/Submit) id q7CNAG5H021611 for freebsd-numerics@freebsd.org; Mon, 13 Aug 2012 09:10:16 +1000 (EST) (envelope-from peter) Resent-From: Peter Jeremy Resent-Date: Mon, 13 Aug 2012 09:10:16 +1000 Resent-Message-ID: <20120812231016.GV20453@server.rulingia.com> Resent-To: freebsd-numerics@freebsd.org Received: from vps.rulingia.com (host-122-100-2-194.octopus.com.au [122.100.2.194]) by server.rulingia.com (8.14.5/8.14.5) with ESMTP id q6L2Y9Qg063003 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 21 Jul 2012 12:34:10 +1000 (EST) (envelope-from brde@optusnet.com.au) Received: from mail11.syd.optusnet.com.au (mail11.syd.optusnet.com.au [211.29.132.192]) by vps.rulingia.com (8.14.5/8.14.5) with ESMTP id q6L2Y9fR095299 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 21 Jul 2012 12:34:09 +1000 (EST) (envelope-from brde@optusnet.com.au) Received: from c122-106-171-246.carlnfd1.nsw.optusnet.com.au (c122-106-171-246.carlnfd1.nsw.optusnet.com.au [122.106.171.246]) by mail11.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q6L2XrP4003178 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 21 Jul 2012 12:33:54 +1000 From: Bruce Evans Mail-Followup-To: freebsd-numerics@freebsd.org X-X-Sender: bde@besplex.bde.org To: Stephen Montgomery-Smith In-Reply-To: <5009BB46.3050001@missouri.edu> Message-ID: <20120721122309.R856@besplex.bde.org> References: <20120714120432.GA70706@server.rulingia.com> <20120717084457.U3890@besplex.bde.org> <5004A5C7.1040405@missouri.edu> <5004DEA9.1050001@missouri.edu> <20120717200931.U6624@besplex.bde.org> <5006D13D.2080702@missouri.edu> <20120718205625.GA409@troutmask.apl.washington.edu> <500725F2.7060603@missouri.edu> <20120719025345.GA1376@troutmask.apl.washington.edu> <50077987.1080307@missouri.edu> <20120719032706.GA1558@troutmask.apl.washington.edu> <5007826D.7060806@missouri.edu> <5007AD41.9070000@missouri.edu> <20120719205347.T2601@besplex.bde.org> <50084322.7020401@missouri.edu> <20120720035001.W4053@besplex.bde.org> <50085441.4090305@missouri.edu> <20120720162953.N2162@besplex.bde.org> <20120720184114.B2790@besplex.bde.org> <50095CDE.4050507@missouri.edu> <20120721011112.D5008@besplex.bde.org> <5009BB46.3050001@missouri.edu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Mailman-Approved-At: Sun, 12 Aug 2012 23:56:00 +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: , Date: Sun, 12 Aug 2012 23:10:24 -0000 X-Original-Date: Sat, 21 Jul 2012 12:33:53 +1000 (EST) X-List-Received-Date: Sun, 12 Aug 2012 23:10:24 -0000 On Fri, 20 Jul 2012, Stephen Montgomery-Smith wrote: > On 07/20/2012 11:25 AM, Bruce Evans wrote: >> On Fri, 20 Jul 2012, Stephen Montgomery-Smith wrote: > > >> % x0 = (float)x; >> % x1 = x - x0; >> % y0 = (float)y; >> % y1 = y - y0; >> >> A good way to do the hi+lo decompositions. > > That was the way I tried first. But it didn't work for me! > > But I see you changed things further down, so that is probably why it works > for you. I didn't understand what was happening before, but think I can explain it now: - the above gives correct hi+lo decompositions. Both hi and lo are usually nonzero. The code below did't really understand hi+lo decompositions, and often increases the final error (relative to naive code). - your code often gives null but backwards hi+lo decompositions, with hi = 0 and lo = full value. The code below did't really understand hi+lo decompositions. But when hi = 0, it is especially easy to add and multiply it exactly, so the final error isn't increased so often. Bruce