From owner-freebsd-numerics@FreeBSD.ORG Sun Aug 12 21:56:58 2012 Return-Path: Delivered-To: freebsd-numerics@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F41671065675 for ; Sun, 12 Aug 2012 21:56:57 +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 5F17E8FC0C for ; Sun, 12 Aug 2012 21:56:56 +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 q7CLusO9075316 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 13 Aug 2012 07:56:55 +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 q7CLum4O019986 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 13 Aug 2012 07:56:48 +1000 (EST) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.14.5/8.14.5/Submit) id q7CLumUZ019985 for freebsd-numerics@freebsd.org; Mon, 13 Aug 2012 07:56:48 +1000 (EST) (envelope-from peter) Date: Mon, 13 Aug 2012 07:56:48 +1000 From: Peter Jeremy To: freebsd-numerics@freebsd.org Message-ID: <20120812215648.GA19810@server.rulingia.com> References: <20120717225328.GA86902@server.rulingia.com> <20120717232740.GA95026@troutmask.apl.washington.edu> <20120718001337.GA87817@server.rulingia.com> <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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Q68bSM7Ycu6FN28Q" Content-Disposition: inline In-Reply-To: <20120728125824.GA26553@server.rulingia.com> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp User-Agent: Mutt/1.5.21 (2010-09-15) 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, 12 Aug 2012 21:56:58 -0000 --Q68bSM7Ycu6FN28Q Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2012-Jul-28 22:58:24 +1000, Peter Jeremy wro= te: >My test harness can be found at http://www.rulingia.com/~peter/ctest.c >There are no special compilation options, it just needs to be linked >with '-lm' (and '-ldl' on Linux). For normal use, just run the >executable - it will report any failures. For "finite" arguments, it >currently uses 3=CF=80/4 and 32769 other random numbers (the latter is >S_COUNT+1). stephen@ found that it wasn't checking long-double NAN results (it checked float results twice due to a typo). I've fixed that and can't see any other similar errors. An updated version can be found at http://www.rulingia.com/~peter/ctest.c Also, because it uses dlfunc() to locate functions for testing, all test functions have to be in shared libraries - it won't detect functions directly linked in. This means you need Makefile entries similar to: ctest: ctest.c libfoo.so cc ${CFLAGS} -Wl,-rpath=3D. ctest.c -o ctest -L. -lfoo -lm libfoo.so: foo.c cc ${CFLAGS} -fPIC -c foo.c cc ${CFLAGS} -shared -Wl,-soname,libfoo.so -o libfoo.so foo.o And, since I don't think I mentioned it before, it does bitwise comparisons of finite results. Particularly in cases where the result is a transcendental number, this can result in false positives where the result is out by a few ULP. You will need to interpret the actual report to decide whether the result is acceptable. --=20 Peter Jeremy --Q68bSM7Ycu6FN28Q Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlAoJqAACgkQ/opHv/APuIdqGACdE2bxIMKI1o1qIQKEcs3gaS1G 9qQAoKVbKzrHD2f9OKZ5C2HHMARh+u+0 =PGQt -----END PGP SIGNATURE----- --Q68bSM7Ycu6FN28Q--