Date: Mon, 28 May 2012 16:02:18 -0700 From: Steve Kargl <sgk@troutmask.apl.washington.edu> To: Peter Jeremy <peter@rulingia.com> Cc: freebsd-current@freebsd.org Subject: Re: Use of C99 extra long double math functions after r236148 Message-ID: <20120528230218.GC76723@troutmask.apl.washington.edu> In-Reply-To: <20120528210507.GF2675@aspire.rulingia.com> References: <4FC30090.4070003@gwdg.de> <4D8CF7D2-CBEE-438E-A9E7-9C47A8892622@FreeBSD.org> <4FC36FE1.9080908@gwdg.de> <DFE44442-A1B1-40B3-9A79-874BD2BE45E7@FreeBSD.org> <4FC38B81.6000302@gwdg.de> <4FC3A154.8030702@missouri.edu> <20120528210507.GF2675@aspire.rulingia.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, May 29, 2012 at 07:05:07AM +1000, Peter Jeremy wrote:
> On 2012-May-28 11:01:24 -0500, Stephen Montgomery-Smith <stephen@missouri.edu> 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 <math.h>, <complex.h> 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.
--
Steve
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120528230218.GC76723>
