From owner-freebsd-current@FreeBSD.ORG Wed Jul 11 00:55:16 2012 Return-Path: Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6210D1065673 for ; Wed, 11 Jul 2012 00:55:16 +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 E02AE8FC0C for ; Wed, 11 Jul 2012 00:55:15 +0000 (UTC) Received: from server.rulingia.com (c220-239-248-69.belrs5.nsw.optusnet.com.au [220.239.248.69]) by vps.rulingia.com (8.14.5/8.14.5) with ESMTP id q6B0tCRM063851 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 11 Jul 2012 10:55:13 +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 q6B0t6cC089446 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 11 Jul 2012 10:55:06 +1000 (EST) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.14.5/8.14.5/Submit) id q6B0t6bh089445 for freebsd-current@FreeBSD.ORG; Wed, 11 Jul 2012 10:55:06 +1000 (EST) (envelope-from peter) Date: Wed, 11 Jul 2012 10:55:06 +1000 From: Peter Jeremy To: freebsd-current@FreeBSD.ORG Message-ID: <20120711005506.GA88249@server.rulingia.com> References: <20120529045612.GB4445@server.rulingia.com> <20120708124047.GA44061@zim.MIT.EDU> <210816F0-7ED7-4481-ABFF-C94A700A3EA0@bsdimp.com> <20120708233624.GA53462@troutmask.apl.washington.edu> <4FFBF16D.2030007@gwdg.de> <2A1DE516-ABB4-49D7-8C3D-2C4DA2D9FCF5@bsdimp.com> <4FFC412B.4090202@gwdg.de> <20120710151115.GA56950@zim.MIT.EDU> <4FFC5E5D.8000502@gwdg.de> <20120710225801.GB58778@zim.MIT.EDU> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zhXaljGHf11kAtnf" Content-Disposition: inline In-Reply-To: <20120710225801.GB58778@zim.MIT.EDU> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Subject: Re: Use of C99 extra long double math functions after r236148 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jul 2012 00:55:16 -0000 --zhXaljGHf11kAtnf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2012-Jul-08 19:01:07 -0700, Steve Kargl wrote: >Well, on the most popular hardware (that being i386/amd64), >ld80 will use hardware fp instruction while ld128 must be >done completely in software. The speed difference is >significant. AFAIK, of the architectures that FreeBSD supports, only sparc64 defines ld128 in the architecture and I don't believe there are any SPARC chip implementations that implement ld128 math in hardware. For that matter, I don't believe anything except x86 provides full IEEE FP support in hardware - most architectures require software assistance for subnormals and some corner cases. If your application happens to hit those cases often, performance will also suffer. On 2012-Jul-08 20:05:04 -0700, Steve Kargl wrote: >AFAIK, neither gcc in base nor clang would be c99 complaint >even if all of the c99 math functions were available. That sort of argument can easily get circular. Lets get the C99 bits of libm out of the way and then we can have another bikeshed about the shortcomings of the compiler(s). On 2012-Jul-08 19:56:52 -0400, David Schultz wrote: >Yes, Bruce has ld128 versions, and clusteradm very kindly got us a >sparc64 machine to test on. That was about the time I ran out of time >to keep working on it. If someone wants to pick it up, that would be >great. I have access to a couple of SPARC systems as well and would be willing to help work on the missing bits. On 2012-Jul-10 18:58:01 -0400, David Schultz wrote: >On Tue, Jul 10, 2012, Rainer Hurling wrote: >> powl: src/extra/trio/triostr.c >> src/extra/trio/trio.c >> src/main/format.c > >It's hard to do a good job on powl(), but the simple approach >(exp(log(x)*y)) plus a few special cases may suffice for many uses. A simplistic exp(log(x)*y) throws away 15 bits of precision (size of the FP exponent field). cephes has a powl() that appears to do better or, alternatively, it shouldn't be too difficult to extend the approach used by __ieee754_pow() using long doubles. >> BTW: There seems to be a discrepancy about missing functions listed in >> http://wiki.freebsd.org/MissingMathStuff and in >> http://svnweb.freebsd.org/base/head/lib/msun/src/math.h?r1=3D227472&r2= =3D236148&pathrev=3D236148. >> So the wiki is a bit outdated now? >My list: [elided] I was thinking that a wiki page would be a good spot to co-ordinate the work (as well as making it clear what is still to be done). The existing page needs some TLC to be useful. --=20 Peter Jeremy --zhXaljGHf11kAtnf Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk/8zuoACgkQ/opHv/APuId9gQCgn0BumQyzCOMJTf/GoUu4PAxr fkcAn0iSSglTkje2VSlYwOFc5caV2v9f =TGxS -----END PGP SIGNATURE----- --zhXaljGHf11kAtnf--