From owner-freebsd-current@FreeBSD.ORG Thu May 31 15:57:55 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 916671065678 for ; Thu, 31 May 2012 15:57:55 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 636378FC08 for ; Thu, 31 May 2012 15:57:55 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id A6E8FB9A4; Thu, 31 May 2012 11:57:54 -0400 (EDT) From: John Baldwin To: freebsd-current@freebsd.org Date: Thu, 31 May 2012 11:45:15 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <4FC30090.4070003@gwdg.de> <20120528210507.GF2675@aspire.rulingia.com> <20120528230218.GC76723@troutmask.apl.washington.edu> In-Reply-To: <20120528230218.GC76723@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201205311145.15454.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 31 May 2012 11:57:54 -0400 (EDT) Cc: Peter Jeremy , Steve Kargl 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: Thu, 31 May 2012 15:57:55 -0000 On Monday, May 28, 2012 7:02:18 pm Steve Kargl wrote: > On Tue, May 29, 2012 at 07:05:07AM +1000, Peter Jeremy wrote: > > 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 > > >the extra C99 math functions. This is already done in the math/sage > > >port, using a rather clever patch due to Peter Jeremy, that applies to > > >the cephes code. > > > > > >What it would do is to create a /usr/local/lib/libm.so that would > > >provide the extra functions not currently included in /lib/libm.so, and > > >then link in /lib/libm.so as well. It would also create its own > > >/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." > > Please talk to das@ (although I believe he's finishing up his > dissertation). I recall that he's stated that he looked into > using cephes, and concluded that it is not suitable for libm. > > Note there is also > > http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/147599 > > which I've also objected to importing into libm. I do think we should provide something in ports as an interim solution. There are other 3rd party applications looking to drop FreeBSD support because we are missing APIs that almost all other OS's have. I'm fine if the interim lives in ports and that we don't import substandard routines into the base. I would even be fine with calling it /usr/local/lib/libm_inaccurate.so. However, I do think we need an option. -- John Baldwin