From owner-freebsd-current@FreeBSD.ORG Mon May 28 21:36:42 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 2E734106566B for ; Mon, 28 May 2012 21:36:41 +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 5B8FD8FC19 for ; Mon, 28 May 2012 21:36:40 +0000 (UTC) Received: from aspire.rulingia.com (12.58.233.220.static.exetel.com.au [220.233.58.12]) by vps.rulingia.com (8.14.5/8.14.5) with ESMTP id q4SLaYHZ020112 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 29 May 2012 07:36:39 +1000 (EST) (envelope-from peter@rulingia.com) Received: from aspire.rulingia.com (localhost [127.0.0.1]) by aspire.rulingia.com (8.14.5/8.14.5) with ESMTP id q4SL59GK037835 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 29 May 2012 07:05:09 +1000 (EST) (envelope-from peter@aspire.rulingia.com) Received: (from peter@localhost) by aspire.rulingia.com (8.14.5/8.14.5/Submit) id q4SL584l037834 for freebsd-current@freebsd.org; Tue, 29 May 2012 07:05:08 +1000 (EST) (envelope-from peter) Date: Tue, 29 May 2012 07:05:07 +1000 From: Peter Jeremy To: freebsd-current@freebsd.org Message-ID: <20120528210507.GF2675@aspire.rulingia.com> References: <4FC30090.4070003@gwdg.de> <4D8CF7D2-CBEE-438E-A9E7-9C47A8892622@FreeBSD.org> <4FC36FE1.9080908@gwdg.de> <4FC38B81.6000302@gwdg.de> <4FC3A154.8030702@missouri.edu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="i3lJ51RuaGWuFYNw" Content-Disposition: inline In-Reply-To: <4FC3A154.8030702@missouri.edu> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.21 (2010-09-15) 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: Mon, 28 May 2012 21:36:42 -0000 --i3lJ51RuaGWuFYNw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2012-May-28 11:01:24 -0500, Stephen Montgomery-Smith wrote: >One thing that could be done is to have a "math/cephes" port that adds=20 >the extra C99 math functions. This is already done in the math/sage=20 >port, using a rather clever patch due to Peter Jeremy, that applies to=20 >the cephes code. > >What it would do is to create a /usr/local/lib/libm.so that would=20 >provide the extra functions not currently included in /lib/libm.so, and=20 >then link in /lib/libm.so as well. It would also create its own=20 >/usr/local/include/math.h and /usr/local/include/complex.h as well. Basically, as long as the compiler searches /usr/local/{include,lib} before the base include/lib then , and -lm give the application a complete C99 math implementation by using base functions where they exist and cephes functions where they don't. The patch I wrote for sage can be found at http://trac.sagemath.org/sage_trac/ticket/9543 If there's any interest, I could produce a port for this. Another option would be to import cephes into base and use it to provide the missing C99 functions. Cephes includes copyright notices but the closest I can find to a license is: " Some software in this archive may be from the book _Methods and Programs for Mathematical Functions_ (Prentice-Hall or Simon & Schuster International, 1989) or from the Cephes Mathematical Library, a commercial product. In either event, it is copyrighted by the author. What you see here may be used freely but it comes with no support or guarantee." --=20 Peter Jeremy --i3lJ51RuaGWuFYNw Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk/D6IMACgkQ/opHv/APuIfYoQCeJUVoQsperj4ZoWT3RfbTxhzb KtAAnivi5vYWRSdyUY/7cqLifg9Xs6T+ =mYYQ -----END PGP SIGNATURE----- --i3lJ51RuaGWuFYNw--