Re: Use of C99 extra long double math functions after r236148

2012-07-26 Thread Rainer Hurling
Am 26.07.2012 03:52 (UTC+1) schrieb Bruce Evans: On Wed, 25 Jul 2012, Rainer Hurling wrote: On 25.07.2012 19:00 (UTC+2), Steve Kargl wrote: On Wed, Jul 25, 2012 at 06:29:18PM +0200, Rainer Hurling wrote: Many thanks to you three for implementing expl() with r238722 and r238724. I am not a C

Re: Use of C99 extra long double math functions after r236148

2012-07-25 Thread Bruce Evans
On Wed, 25 Jul 2012, Stephen Montgomery-Smith wrote: On 07/25/12 12:31, Steve Kargl wrote: On Wed, Jul 25, 2012 at 12:27:43PM -0500, Stephen Montgomery-Smith wrote: Just as a point of comparison, here is the answer computed using Mathematica: N[Exp[2], 50] 7.3890560989306502272304274605750078

Re: Use of C99 extra long double math functions after r236148

2012-07-25 Thread Bruce Evans
On Wed, 25 Jul 2012, Rainer Hurling wrote: On 25.07.2012 19:00 (UTC+2), Steve Kargl wrote: On Wed, Jul 25, 2012 at 06:29:18PM +0200, Rainer Hurling wrote: Many thanks to you three for implementing expl() with r238722 and r238724. I am not a C programmer, but would like to ask if the followin

Re: Use of C99 extra long double math functions after r236148

2012-07-25 Thread Steve Kargl
On Wed, Jul 25, 2012 at 07:33:07PM +0200, Rainer Hurling wrote: > On 25.07.2012 19:00 (UTC+2), Steve Kargl wrote: > > > >If you actually want to test expl() to see if it is producing > >a decent result, you need a reference solution that contains > >a higher precision. I use mpfr with 256 bits of

Re: Use of C99 extra long double math functions after r236148

2012-07-25 Thread Stephen Montgomery-Smith
On 07/25/12 12:31, Steve Kargl wrote: On Wed, Jul 25, 2012 at 12:27:43PM -0500, Stephen Montgomery-Smith wrote: On 07/25/12 11:29, Rainer Hurling wrote: Many thanks to you three for implementing expl() with r238722 and r238724. I am not a C programmer, but would like to ask if the following e

Re: Use of C99 extra long double math functions after r236148

2012-07-25 Thread Rainer Hurling
On 25.07.2012 19:00 (UTC+2), Steve Kargl wrote: On Wed, Jul 25, 2012 at 06:29:18PM +0200, Rainer Hurling wrote: Many thanks to you three for implementing expl() with r238722 and r238724. I am not a C programmer, but would like to ask if the following example is correct and suituable as a minim

Re: Use of C99 extra long double math functions after r236148

2012-07-25 Thread Steve Kargl
On Wed, Jul 25, 2012 at 12:27:43PM -0500, Stephen Montgomery-Smith wrote: > On 07/25/12 11:29, Rainer Hurling wrote: > > >Many thanks to you three for implementing expl() with r238722 and r238724. > > > >I am not a C programmer, but would like to ask if the following example > >is correct and suit

Re: Use of C99 extra long double math functions after r236148

2012-07-25 Thread Stephen Montgomery-Smith
On 07/25/12 11:29, Rainer Hurling wrote: Many thanks to you three for implementing expl() with r238722 and r238724. I am not a C programmer, but would like to ask if the following example is correct and suituable as a minimalistic test of this new C99 function? //-

Re: Use of C99 extra long double math functions after r236148

2012-07-25 Thread Rainer Hurling
On 11.07.2012 00:58 (UTC+2), David Schultz wrote: On Tue, Jul 10, 2012, Rainer Hurling wrote: On 10.07.2012 17:11 (UTC+2), David Schultz wrote: On Tue, Jul 10, 2012, Rainer Hurling wrote: On 10.07.2012 16:02 (UTC+2), Warner Losh wrote: On Jul 10, 2012, at 3:10 AM, Rainer Hurling wrote: As f

Re: Use of C99 extra long double math functions after r236148

2012-07-25 Thread Steve Kargl
On Wed, Jul 25, 2012 at 06:29:18PM +0200, Rainer Hurling wrote: > > Many thanks to you three for implementing expl() with r238722 and r238724. > > I am not a C programmer, but would like to ask if the following example > is correct and suituable as a minimalistic test of this new C99 function? >

Re: Use of C99 extra long double math functions after r236148

2012-07-21 Thread David Schultz
On Fri, Jul 13, 2012, Warner Losh wrote: > Just to jump back into the fray a bit, since this point hasn't been > articulated well. > > On Jul 10, 2012, at 6:55 PM, Peter Jeremy wrote: > > > On 2012-Jul-08 19:01:07 -0700, Steve Kargl > > wrote: > >> Well, on the most popular hardware (that bein

Re: Use of C99 extra long double math functions after r236148

2012-07-14 Thread Warner Losh
On Jul 14, 2012, at 3:24 AM, David Chisnall wrote: > On 13 Jul 2012, at 17:40, Warner Losh wrote: > >> We shouldn't be gating the new math on an issue that only affects sparc64 >> machines > > Mostly agreed, but it's worth noting that the APCS for ARMv8[1] specifies > that long double should

Re: Use of C99 extra long double math functions after r236148

2012-07-14 Thread David Chisnall
On 13 Jul 2012, at 17:40, Warner Losh wrote: > We shouldn't be gating the new math on an issue that only affects sparc64 > machines Mostly agreed, but it's worth noting that the APCS for ARMv8[1] specifies that long double should be IEEE 754- 2008 quad precision. I think ARMv8 is going to be

Re: Use of C99 extra long double math functions after r236148

2012-07-13 Thread Daniel O'Connor
On 14/07/2012, at 2:35, Eitan Adler wrote: >>> >>> If the schedule can't be met, then we can just import Cephes as an >>> interim solution without further ado. This provides Bruce and Steve >>> an opportunity to commit what they have been working on, without >>> forcing the rest of the FreeBSD c

Re: Use of C99 extra long double math functions after r236148

2012-07-13 Thread Diane Bruce
On Sat, Jul 14, 2012 at 08:38:08AM +1000, Peter Jeremy wrote: > On 2012-Jul-13 11:58:05 -0400, David Schultz wrote: > >I propose we set a timeframe for this, on the order of a few months. > ... > >If the schedule can't be met, then we can just import Cephes as an > >interim solution without furthe

Re: Use of C99 extra long double math functions after r236148

2012-07-13 Thread Warner Losh
On Jul 13, 2012, at 4:38 PM, Peter Jeremy wrote: > On 2012-Jul-13 11:58:05 -0400, David Schultz wrote: >> I propose we set a timeframe for this, on the order of a few months. > ... >> If the schedule can't be met, then we can just import Cephes as an >> interim solution without further ado. Thi

Re: Use of C99 extra long double math functions after r236148

2012-07-13 Thread Peter Jeremy
On 2012-Jul-13 11:58:05 -0400, David Schultz wrote: >I propose we set a timeframe for this, on the order of a few months. ... >If the schedule can't be met, then we can just import Cephes as an >interim solution without further ado. This provides Bruce and Steve >an opportunity to commit what the

Re: Use of C99 extra long double math functions after r236148

2012-07-13 Thread John Baldwin
On Friday, July 13, 2012 11:58:05 am David Schultz wrote: > On Fri, Jul 13, 2012, David Chisnall wrote: > > As do I. I'd also point out that the ONLY requirement for long > > double according to the standard is that it has at least the same > > precision as double. Therefore, any implementation o

Re: Use of C99 extra long double math functions after r236148

2012-07-13 Thread Warner Losh
Just to jump back into the fray a bit, since this point hasn't been articulated well. On Jul 10, 2012, at 6:55 PM, Peter Jeremy wrote: > 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 w

Re: Use of C99 extra long double math functions after r236148

2012-07-13 Thread Eitan Adler
On 13 July 2012 09:07, Stephen Montgomery-Smith wrote: > On 07/13/12 10:58, David Schultz wrote: >> >> On Fri, Jul 13, 2012, David Chisnall wrote: >>> >>> As do I. I'd also point out that the ONLY requirement for long >>> double according to the standard is that it has at least the same >>> preci

Re: Use of C99 extra long double math functions after r236148

2012-07-13 Thread Stephen Montgomery-Smith
On 07/13/12 10:58, David Schultz wrote: On Fri, Jul 13, 2012, David Chisnall wrote: As do I. I'd also point out that the ONLY requirement for long double according to the standard is that it has at least the same precision as double. Therefore, any implementation of these functions that is no

Re: Use of C99 extra long double math functions after r236148

2012-07-13 Thread David Schultz
On Fri, Jul 13, 2012, David Chisnall wrote: > As do I. I'd also point out that the ONLY requirement for long > double according to the standard is that it has at least the same > precision as double. Therefore, any implementation of these > functions that is no worse that the double version is co

Re: Use of C99 extra long double math functions after r236148

2012-07-13 Thread Diane Bruce
On Fri, Jul 13, 2012 at 01:53:39PM +0100, David Chisnall wrote: > On 13 Jul 2012, at 13:18, John Baldwin wrote: > > > On Friday, July 13, 2012 7:41:00 am Peter Jeremy wrote: > >> AFAIK, none of the relevant standards (POSIX, IEEE754) have any > >> precision requirements for functions other than +-

Re: Use of C99 extra long double math functions after r236148

2012-07-13 Thread Steve Kargl
On Fri, Jul 13, 2012 at 09:41:00PM +1000, Peter Jeremy wrote: > On 2012-Jul-11 15:32:47 -0700, Steve Kargl > wrote: > >I know an approach to implementing many of the missing > >functions. > > Are you willing to share this insight so someone else could do the work? For the missing trig and hyper

Re: Use of C99 extra long double math functions after r236148

2012-07-13 Thread David Chisnall
On 13 Jul 2012, at 13:18, John Baldwin wrote: > On Friday, July 13, 2012 7:41:00 am Peter Jeremy wrote: >> AFAIK, none of the relevant standards (POSIX, IEEE754) have any >> precision requirements for functions other than +-*/ and sqrt() - all >> of which we have correctly implemented. I therefor

Re: Use of C99 extra long double math functions after r236148

2012-07-13 Thread John Baldwin
On Friday, July 13, 2012 7:41:00 am Peter Jeremy wrote: > AFAIK, none of the relevant standards (POSIX, IEEE754) have any > precision requirements for functions other than +-*/ and sqrt() - all > of which we have correctly implemented. I therefore believe that, for > the remaining missing function

Re: Use of C99 extra long double math functions after r236148

2012-07-13 Thread Peter Jeremy
On 2012-Jul-11 15:32:47 -0700, Steve Kargl wrote: >I know an approach to implementing many of the missing >functions. Are you willing to share this insight so someone else could do the work? > When I do find >some free time, I look at what is missing and start to >put together a new function.

Re: Use of C99 extra long double math functions after r236148

2012-07-11 Thread Steve Kargl
On Wed, Jul 11, 2012 at 04:54:14PM -0500, Diane Bruce wrote: > On Wed, Jul 11, 2012 at 02:43:46PM -0700, Steve Kargl wrote: > > On Wed, Jul 11, 2012 at 04:20:09PM -0500, Diane Bruce wrote: > > > On Tue, Jul 10, 2012 at 08:02:33AM -0600, Warner Losh wrote: > > > > > > > > On Jul 10, 2012, at 3:10 A

Re: Use of C99 extra long double math functions after r236148

2012-07-11 Thread Diane Bruce
On Wed, Jul 11, 2012 at 02:43:46PM -0700, Steve Kargl wrote: > On Wed, Jul 11, 2012 at 04:20:09PM -0500, Diane Bruce wrote: > > On Tue, Jul 10, 2012 at 08:02:33AM -0600, Warner Losh wrote: > > > > > > On Jul 10, 2012, at 3:10 AM, Rainer Hurling wrote: > > > ... > > You submitted on June 6th, 201

Re: Use of C99 extra long double math functions after r236148

2012-07-11 Thread Steve Kargl
On Wed, Jul 11, 2012 at 04:20:09PM -0500, Diane Bruce wrote: > On Tue, Jul 10, 2012 at 08:02:33AM -0600, Warner Losh wrote: > > > > On Jul 10, 2012, at 3:10 AM, Rainer Hurling wrote: > > > > Not having R would be a bit pain in my backside. That's one of the > > practical considerations that I w

Re: Use of C99 extra long double math functions after r236148

2012-07-11 Thread Diane Bruce
On Tue, Jul 10, 2012 at 08:02:33AM -0600, Warner Losh wrote: > > On Jul 10, 2012, at 3:10 AM, Rainer Hurling wrote: > > Not having R would be a bit pain in my backside. That's one of the practical > considerations that I was talking about. It is very real, and if I have to, > I'll commit the

Re: Use of C99 extra long double math functions after r236148

2012-07-10 Thread Peter Jeremy
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 s

Re: Use of C99 extra long double math functions after r236148

2012-07-10 Thread David Schultz
On Tue, Jul 10, 2012, Rainer Hurling wrote: > On 10.07.2012 17:11 (UTC+2), David Schultz wrote: > >On Tue, Jul 10, 2012, Rainer Hurling wrote: > >>On 10.07.2012 16:02 (UTC+2), Warner Losh wrote: > >>> > >>>On Jul 10, 2012, at 3:10 AM, Rainer Hurling wrote: > As far as I understand from discussi

Re: Use of C99 extra long double math functions after r236148

2012-07-10 Thread Steve Kargl
On Tue, Jul 10, 2012 at 01:11:38PM -0500, Stephen Montgomery-Smith wrote: > On 07/10/2012 11:50 AM, Steve Kargl wrote: > >On Tue, Jul 10, 2012 at 11:39:59AM -0500, Stephen Montgomery-Smith wrote: > >>On 07/09/2012 12:02 AM, Steve Kargl wrote: > >> > >>>Yep. Another example is the use of upward rec

Re: Use of C99 extra long double math functions after r236148

2012-07-10 Thread Stephen Montgomery-Smith
On 07/10/2012 11:50 AM, Steve Kargl wrote: On Tue, Jul 10, 2012 at 11:39:59AM -0500, Stephen Montgomery-Smith wrote: On 07/09/2012 12:02 AM, Steve Kargl wrote: Yep. Another example is the use of upward recurion to compute Bessel functions where the argument is larger than the order. The algor

Re: Use of C99 extra long double math functions after r236148

2012-07-10 Thread Rainer Hurling
On 10.07.2012 17:11 (UTC+2), David Schultz wrote: On Tue, Jul 10, 2012, Rainer Hurling wrote: On 10.07.2012 16:02 (UTC+2), Warner Losh wrote: On Jul 10, 2012, at 3:10 AM, Rainer Hurling wrote: As far as I understand from discussions on R mailing list (r-de...@r-project.org), they plan to redu

Re: Use of C99 extra long double math functions after r236148

2012-07-10 Thread Steve Kargl
On Tue, Jul 10, 2012 at 11:39:59AM -0500, Stephen Montgomery-Smith wrote: > On 07/09/2012 12:02 AM, Steve Kargl wrote: > > >Yep. Another example is the use of upward recurion to compute > >Bessel functions where the argument is larger than the order. > >The algorithm is known to be unstable. > >

Re: Use of C99 extra long double math functions after r236148

2012-07-10 Thread Stephen Montgomery-Smith
On 07/09/2012 12:02 AM, Steve Kargl wrote: Yep. Another example is the use of upward recurion to compute Bessel functions where the argument is larger than the order. The algorithm is known to be unstable. By upward recursion, do you mean equation (1) in http://mathworld.wolfram.com/BesselFu

Re: Use of C99 extra long double math functions after r236148

2012-07-10 Thread Warner Losh
On Jul 10, 2012, at 9:11 AM, David Schultz wrote: > On Tue, Jul 10, 2012, Rainer Hurling wrote: >> On 10.07.2012 16:02 (UTC+2), Warner Losh wrote: >>> >>> On Jul 10, 2012, at 3:10 AM, Rainer Hurling wrote: As far as I understand from discussions on R mailing list (r-de...@r-project.or

Re: Use of C99 extra long double math functions after r236148

2012-07-10 Thread David Schultz
On Tue, Jul 10, 2012, Rainer Hurling wrote: > On 10.07.2012 16:02 (UTC+2), Warner Losh wrote: > > > >On Jul 10, 2012, at 3:10 AM, Rainer Hurling wrote: > >>As far as I understand from discussions on R mailing list > >>(r-de...@r-project.org), they plan to reduce the emulation and/or > >>workaroun

Re: Use of C99 extra long double math functions after r236148

2012-07-10 Thread Rainer Hurling
On 10.07.2012 16:02 (UTC+2), Warner Losh wrote: On Jul 10, 2012, at 3:10 AM, Rainer Hurling wrote: As far as I understand from discussions on R mailing list (r-de...@r-project.org), they plan to reduce the emulation and/or workaround of long and complex math functions for FreeBSD and other sy

Re: Use of C99 extra long double math functions after r236148

2012-07-10 Thread Warner Losh
On Jul 10, 2012, at 7:45 AM, Steve Kargl wrote: > On Tue, Jul 10, 2012 at 11:10:05AM +0200, Rainer Hurling wrote: >> >> Do you think your version from >> http://www.freebsd.org/cgi/query-pr.cgi?pr=152415 for expl() ld80 >> version could be the one getting into head? Would you be willing to >>

Re: Use of C99 extra long double math functions after r236148

2012-07-10 Thread Warner Losh
On Jul 10, 2012, at 3:10 AM, Rainer Hurling wrote: > As far as I understand from discussions on R mailing list > (r-de...@r-project.org), they plan to reduce the emulation and/or workaround > of long and complex math functions for FreeBSD and other systems with their > next releases of R devel.

Re: Use of C99 extra long double math functions after r236148

2012-07-10 Thread Steve Kargl
On Tue, Jul 10, 2012 at 11:10:05AM +0200, Rainer Hurling wrote: > > Do you think your version from > http://www.freebsd.org/cgi/query-pr.cgi?pr=152415 for expl() ld80 > version could be the one getting into head? Would you be willing to > commit it? That's a fairly early version of the ld80 ex

Re: Use of C99 extra long double math functions after r236148

2012-07-10 Thread Rainer Hurling
On 09.07.2012 01:36 (UTC+2), Steve Kargl wrote: On Sun, Jul 08, 2012 at 11:51:56AM -0600, Warner Losh wrote: On Jul 8, 2012, at 6:40 AM, David Schultz wrote: On Tue, May 29, 2012, Peter Jeremy wrote: On 2012-May-28 15:54:06 -0700, Steve Kargl wrote: Given that cephes was written years bef

Re: Use of C99 extra long double math functions after r236148

2012-07-09 Thread John Baldwin
On Sunday, July 08, 2012 7:56:52 pm David Schultz wrote: > On Sun, Jul 08, 2012, Steve Kargl wrote: > > > > The question remains of what to do about the missing functions. Bruce > > > > and Steve have been working on expl and logl for years. If those ever > > > > get in the tree, the remaining lo

Re: Use of C99 extra long double math functions after r236148

2012-07-09 Thread Bob Bishop
Hi, On 9 Jul 2012, at 06:02, Steve Kargl wrote: > If you're doing accouting, hopefully, you're using BCD. Would be nice, but it's far too slow for financial analysis; the chip designers go out of their way to provide fast floating point. Fortunately 53 bits is usually plenty with 2dp max. --

Re: Use of C99 extra long double math functions after r236148

2012-07-08 Thread Steve Kargl
On Sun, Jul 08, 2012 at 10:41:44PM -0500, Stephen Montgomery-Smith wrote: > On 07/08/2012 09:01 PM, Steve Kargl wrote: > > >Have you read Goldberg's paper? > > I must admit that I had not. I found it at: > > http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html Yes, it's easy to find.

Re: Use of C99 extra long double math functions after r236148

2012-07-08 Thread Stephen Montgomery-Smith
On 07/08/2012 09:01 PM, Steve Kargl wrote: Have you read Goldberg's paper? I must admit that I had not. I found it at: http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html Not to mention, I've seen way too many examples of 'x - y' where cancellation of significant digits causes p

Re: Use of C99 extra long double math functions after r236148

2012-07-08 Thread Steve Kargl
On Sun, Jul 08, 2012 at 08:13:21PM -0600, Warner Losh wrote: > > On Jul 8, 2012, at 8:01 PM, Steve Kargl wrote: > > Not to mention, I've seen way too many examples of 'x - y' > > where cancellation of significant digits causes > > problems. Throw in rather poor estimates of function > > results w

Re: Use of C99 extra long double math functions after r236148

2012-07-08 Thread Warner Losh
On Jul 8, 2012, at 8:01 PM, Steve Kargl wrote: > Not to mention, I've seen way too many examples of 'x - y' > where cancellation of significant digits causes > problems. Throw in rather poor estimates of function > results with real poor ULP and you have problems. Are these problems significantl

Re: Use of C99 extra long double math functions after r236148

2012-07-08 Thread Steve Kargl
On Sun, Jul 08, 2012 at 07:29:30PM -0500, Stephen Montgomery-Smith wrote: > On 07/08/2012 06:58 PM, Steve Kargl wrote: > >On Sun, Jul 08, 2012 at 02:06:46PM -0500, Stephen Montgomery-Smith wrote: > > >>So do people really work hard to get that last drop of ulp out of their > >>calculations? > > >

Re: Use of C99 extra long double math functions after r236148

2012-07-08 Thread Stephen Montgomery-Smith
On 07/08/2012 06:58 PM, Steve Kargl wrote: On Sun, Jul 08, 2012 at 02:06:46PM -0500, Stephen Montgomery-Smith wrote: So do people really work hard to get that last drop of ulp out of their calculations? I know very few scientist who work hard to reduce the ULP. Most have little understandin

Re: Use of C99 extra long double math functions after r236148

2012-07-08 Thread Steve Kargl
On Sun, Jul 08, 2012 at 02:06:46PM -0500, Stephen Montgomery-Smith wrote: > Here is a technical question. I know that people always talk about > ulp's in the context of how good a function implementation is. I think > the ulp is the number of base 2 digits at the end of the mantissa that > we

Re: Use of C99 extra long double math functions after r236148

2012-07-08 Thread David Schultz
On Sun, Jul 08, 2012, Steve Kargl wrote: > > > The question remains of what to do about the missing functions. Bruce > > > and Steve have been working on expl and logl for years. If those ever > > > get in the tree, the remaining long double functions are easy. Those > > > functions are basicall

Re: Use of C99 extra long double math functions after r236148

2012-07-08 Thread Steve Kargl
On Sun, Jul 08, 2012 at 11:51:56AM -0600, Warner Losh wrote: > > On Jul 8, 2012, at 6:40 AM, David Schultz wrote: > > > On Tue, May 29, 2012, Peter Jeremy wrote: > >> On 2012-May-28 15:54:06 -0700, Steve Kargl > >> wrote: > >>> Given that cephes was written years before C99 was even > >>> conce

Re: Use of C99 extra long double math functions after r236148

2012-07-08 Thread Stephen Montgomery-Smith
Here is a technical question. I know that people always talk about ulp's in the context of how good a function implementation is. I think the ulp is the number of base 2 digits at the end of the mantissa that we cannot rely on. So if one were to write a naive implementation of lexp(x) that u

Re: Use of C99 extra long double math functions after r236148

2012-07-08 Thread Warner Losh
On Jul 8, 2012, at 6:40 AM, David Schultz wrote: > On Tue, May 29, 2012, Peter Jeremy wrote: >> On 2012-May-28 15:54:06 -0700, Steve Kargl >> wrote: >>> Given that cephes was written years before C99 was even >>> conceived, I suspect all functions are sub-standard. >> >> Well, most of cephes w

Re: Use of C99 extra long double math functions after r236148

2012-07-08 Thread David Schultz
On Tue, May 29, 2012, Peter Jeremy wrote: > On 2012-May-28 15:54:06 -0700, Steve Kargl > wrote: > >Given that cephes was written years before C99 was even > >conceived, I suspect all functions are sub-standard. > > Well, most of cephes was written before C99. The C99 parts of > cephes were writ

Re: Use of C99 extra long double math functions after r236148

2012-06-01 Thread Steve Kargl
On Sat, Jun 02, 2012 at 12:04:58AM -0400, Eitan Adler wrote: > On 1 June 2012 23:52, Steve Kargl wrote: > > > Of course. ??Sit down and write code. > > If I ever find the time, I just might. Do we have a wiki page listing > the set of functions which we don't yet have? > I don't know. I don't

Re: Use of C99 extra long double math functions after r236148

2012-06-01 Thread Eitan Adler
On 1 June 2012 23:52, Steve Kargl wrote: > Of course.  Sit down and write code. If I ever find the time, I just might. Do we have a wiki page listing the set of functions which we don't yet have? -- Eitan Adler ___ freebsd-current@freebsd.org mailin

Re: Use of C99 extra long double math functions after r236148

2012-06-01 Thread Steve Kargl
On Fri, Jun 01, 2012 at 05:16:03PM -0700, Eitan Adler wrote: > On 1 June 2012 17:03, Peter Jeremy wrote: > > On 2012-Jun-01 10:29:13 -0400, John Baldwin wrote: > >>On Friday, June 01, 2012 1:55:10 am Eitan Adler wrote: > >>> Also, are there BSD licensed naive implementations of these functions >

Re: Use of C99 extra long double math functions after r236148

2012-06-01 Thread Eitan Adler
On 1 June 2012 17:03, Peter Jeremy wrote: > On 2012-Jun-01 10:29:13 -0400, John Baldwin wrote: >>On Friday, June 01, 2012 1:55:10 am Eitan Adler wrote: >>> Also, are there BSD licensed naive implementations of these functions >>> we can use? Would it be okay to has slow, but accurate versions of

Re: Use of C99 extra long double math functions after r236148

2012-06-01 Thread Peter Jeremy
On 2012-Jun-01 10:29:13 -0400, John Baldwin wrote: >On Friday, June 01, 2012 1:55:10 am Eitan Adler wrote: >> Also, are there BSD licensed naive implementations of these functions >> we can use? Would it be okay to has slow, but accurate versions of >> these functions as a stopgap? > >Peter Jeremy

Re: Use of C99 extra long double math functions after r236148

2012-06-01 Thread John Baldwin
On Friday, June 01, 2012 1:55:10 am Eitan Adler wrote: > On 31 May 2012 08:45, John Baldwin wrote: > > 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

Re: Use of C99 extra long double math functions after r236148

2012-06-01 Thread b. f.
> Do we have a wiki page listing the functions in libm we are missing? > Having some kind of place to track progress and figure out what > exactly is needed is the first step to getting these APIs into shape. I already suggested this, and mentioned: http://wiki.freebsd.org/MissingMathStuff > Als

Re: Use of C99 extra long double math functions after r236148

2012-06-01 Thread b. f.
> > 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 >

Re: Use of C99 extra long double math functions after r236148

2012-05-31 Thread Eitan Adler
On 31 May 2012 08:45, John Baldwin wrote: > 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

Re: Use of C99 extra long double math functions after r236148

2012-05-31 Thread Daniel O'Connor
On 01/06/2012, at 2:42, Stephen Montgomery-Smith wrote: >> >> 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 inter

Re: Use of C99 extra long double math functions after r236148

2012-05-31 Thread Stephen Montgomery-Smith
On 05/31/12 10:45, John Baldwin wrote: 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 th

Re: Use of C99 extra long double math functions after r236148

2012-05-31 Thread John Baldwin
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.

Re: Use of C99 extra long double math functions after r236148

2012-05-30 Thread b. f.
>This discussion confirms my impression, that it should be possible as an >interim solution, to use a port for missing math functions (cephes alike >or whatever). The port itself could warn the user about inaccuracies and >edge-cases. Parts of Cephes are already in ports: math/ldouble. I had plan

Re: Use of C99 extra long double math functions after r236148

2012-05-30 Thread Adrian Chadd
Holy crap, if there was ever a current example of a bikeshed, this is it. :-) Adrian On 30 May 2012 10:19, Mehmet Erol Sanliturk wrote: > On Wed, May 30, 2012 at 8:51 AM, Mark Linimon wrote: > >> Perhaps a more general name might be appropriate so as to include >> fixed-point problems?  math

Re: Use of C99 extra long double math functions after r236148

2012-05-30 Thread Mehmet Erol Sanliturk
On Wed, May 30, 2012 at 8:51 AM, Mark Linimon wrote: > Perhaps a more general name might be appropriate so as to include > fixed-point problems? math-libs@? numerics@? > > I'm sure someone will come up with a better name. > > mcl > Numerics@ is good . Other names may be numerical-analysis@

Re: Use of C99 extra long double math functions after r236148

2012-05-30 Thread Mark Linimon
Perhaps a more general name might be appropriate so as to include fixed-point problems? math-libs@? numerics@? I'm sure someone will come up with a better name. mcl ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo

Re: Use of C99 extra long double math functions after r236148

2012-05-30 Thread Hans Ottevanger
On 05/29/12 19:54, Stephen Montgomery-Smith wrote: [...] Anyway, given that floating point is a big issue, and we are about a decade behind schedule, really suggests that a floating-po...@freebsd.org mailing list is needed. Or maybe there is an existing freebsd mailing list you guys already oc

Re: Use of C99 extra long double math functions after r236148

2012-05-29 Thread Julian H. Stacey
Hi, Reference: > From: Stephen Montgomery-Smith > Anyway, given that floating point is a big issue, and we are about a > decade behind schedule, really suggests that a > floating-po...@freebsd.org mailing list is needed. Or maybe there is an > existing freebsd mailing list you guys a

Re: Use of C99 extra long double math functions after r236148

2012-05-29 Thread Adrian Chadd
.. I don't think it's a bad idea to get freebsd-numeric@ created and start discussing this kind of stuff there. Adrian ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail

Re: Use of C99 extra long double math functions after r236148

2012-05-29 Thread Stephen Montgomery-Smith
On 05/29/2012 11:48 AM, Rainer Hurling wrote: On 29.05.2012 08:10 (UTC+1), Steve Kargl wrote: sqrtl() is a bit special in that IEEE 754 requires that it have no more than 0.5 ULP for all arguments in all roundng modes. As to other functions, I've been trying for 10+ years to get some of these

Re: Use of C99 extra long double math functions after r236148

2012-05-29 Thread Rainer Hurling
On 29.05.2012 08:10 (UTC+1), Steve Kargl wrote: On Tue, May 29, 2012 at 02:56:13PM +1000, Peter Jeremy wrote: On 2012-May-28 15:54:06 -0700, Steve Kargl wrote: There some test code in cephes. Can you point me to a suitable test suite for LD80 and LD128? The reason for calling it libm is to

Re: Use of C99 extra long double math functions after r236148

2012-05-28 Thread Steve Kargl
On Tue, May 29, 2012 at 02:56:13PM +1000, Peter Jeremy wrote: > On 2012-May-28 15:54:06 -0700, Steve Kargl > wrote: > > There some test code in cephes. Can you point me to a suitable test > suite for LD80 and LD128? The reason for calling it libm is to avoid > having to hack every consumer to

Re: Use of C99 extra long double math functions after r236148

2012-05-28 Thread Peter Jeremy
On 2012-May-28 15:54:06 -0700, Steve Kargl wrote: >Given that cephes was written years before C99 was even >conceived, I suspect all functions are sub-standard. Well, most of cephes was written before C99. The C99 parts of cephes were written to turn it into a complete C99 implementation. > F

Re: Use of C99 extra long double math functions after r236148

2012-05-28 Thread Stephen Montgomery-Smith
On 05/28/2012 07:07 PM, Steve Kargl wrote: On Mon, May 28, 2012 at 06:44:42PM -0500, Stephen Montgomery-Smith wrote: On 05/28/2012 06:30 PM, Steve Kargl wrote: > From clog.c in http://www.netlib.org/cephes/c9x-complex double complex ccosh (z) double complex z; { double complex w;

Re: Use of C99 extra long double math functions after r236148

2012-05-28 Thread Steve Kargl
On Mon, May 28, 2012 at 06:44:42PM -0500, Stephen Montgomery-Smith wrote: > On 05/28/2012 06:30 PM, Steve Kargl wrote: > > > > >>From clog.c in http://www.netlib.org/cephes/c9x-complex > > > >double complex > >ccosh (z) > > double complex z; > >{ > > double complex w; > > double x, y; > >

Re: Use of C99 extra long double math functions after r236148

2012-05-28 Thread Stephen Montgomery-Smith
On 05/28/2012 06:30 PM, Steve Kargl wrote: From clog.c in http://www.netlib.org/cephes/c9x-complex double complex ccosh (z) double complex z; { double complex w; double x, y; x = creal(z); y = cimag(z); w = cosh (x) * cos (y) + (sinh (x) * sin (y)) * I; return (w);

Re: Use of C99 extra long double math functions after r236148

2012-05-28 Thread Steve Kargl
On Mon, May 28, 2012 at 06:03:37PM -0500, Stephen Montgomery-Smith wrote: > On 05/28/2012 05:17 PM, Steve Kargl wrote: > >On Mon, May 28, 2012 at 04:19:22PM -0500, Stephen Montgomery-Smith wrote: > >>On 05/28/2012 03:31 PM, Steve Kargl wrote: > >>>On Mon, May 28, 2012 at 11:01:24AM -0500, Stephen M

Re: Use of C99 extra long double math functions after r236148

2012-05-28 Thread Stephen Montgomery-Smith
On 05/28/2012 05:17 PM, Steve Kargl wrote: On Mon, May 28, 2012 at 04:19:22PM -0500, Stephen Montgomery-Smith wrote: On 05/28/2012 03:31 PM, Steve Kargl wrote: On Mon, May 28, 2012 at 11:01:24AM -0500, Stephen Montgomery-Smith wrote: One thing that could be done is to have a "math/cephes" port

Re: Use of C99 extra long double math functions after r236148

2012-05-28 Thread Steve Kargl
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 rat

Re: Use of C99 extra long double math functions after r236148

2012-05-28 Thread Steve Kargl
On Tue, May 29, 2012 at 08:04:36AM +1000, Peter Jeremy wrote: > On 2012-May-28 13:31:59 -0700, Steve Kargl > wrote: > >On Mon, May 28, 2012 at 11:01:24AM -0500, Stephen Montgomery-Smith wrote: > >> One thing that could be done is to have a "math/cephes" port that adds > >> the extra C99 math fun

Re: Use of C99 extra long double math functions after r236148

2012-05-28 Thread Steve Kargl
On Mon, May 28, 2012 at 04:19:22PM -0500, Stephen Montgomery-Smith wrote: > On 05/28/2012 03:31 PM, Steve Kargl wrote: > >On Mon, May 28, 2012 at 11:01:24AM -0500, Stephen Montgomery-Smith wrote: > >>One thing that could be done is to have a "math/cephes" port that adds > >>the extra C99 math funct

Re: Use of C99 extra long double math functions after r236148

2012-05-28 Thread Peter Jeremy
On 2012-May-28 13:31:59 -0700, Steve Kargl wrote: >On Mon, May 28, 2012 at 11:01:24AM -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

Re: Use of C99 extra long double math functions after r236148

2012-05-28 Thread Peter Jeremy
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.

Re: Use of C99 extra long double math functions after r236148

2012-05-28 Thread Stephen Montgomery-Smith
On 05/28/2012 03:31 PM, Steve Kargl wrote: On Mon, May 28, 2012 at 11:01:24AM -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 t

Re: Use of C99 extra long double math functions after r236148

2012-05-28 Thread Steve Kargl
On Mon, May 28, 2012 at 11:01:24AM -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

Re: Use of C99 extra long double math functions after r236148

2012-05-28 Thread Stephen Montgomery-Smith
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

Re: Use of C99 extra long double math functions after r236148

2012-05-28 Thread Rainer Hurling
On 28.05.2012 14:49 (UTC+1), David Chisnall wrote: On 28 May 2012, at 13:30, Rainer Hurling wrote: On 28.05.2012 10:41 (UTC+1), David Chisnall wrote: On 28 May 2012, at 05:35, Rainer Hurling wrote: Ok, that's what I had supposed. Because the main difference between r236147 and r2136148 seem

Re: Use of C99 extra long double math functions after r236148

2012-05-28 Thread David Chisnall
On 28 May 2012, at 13:30, Rainer Hurling wrote: > On 28.05.2012 10:41 (UTC+1), David Chisnall wrote: >> On 28 May 2012, at 05:35, Rainer Hurling wrote: > > Ok, that's what I had supposed. Because the main difference between r236147 > and r2136148 seems to be the define of _MATH_EXTRA_H_, the res

Re: Use of C99 extra long double math functions after r236148

2012-05-28 Thread Rainer Hurling
On 28.05.2012 10:41 (UTC+1), David Chisnall wrote: On 28 May 2012, at 05:35, Rainer Hurling wrote: First I should note that I am by no means an expert in C / C++ or C99 standards. So my comments are only on a level of someone who is using FreeBSD for scientific purposes like GIS and math appl

Re: Use of C99 extra long double math functions after r236148

2012-05-28 Thread David Chisnall
On 28 May 2012, at 05:35, Rainer Hurling wrote: > Yesterday r236148 (Allow inclusion of libc++ to work after including > math.h) was comitted to head, many thanks. > > Does this mean, that extra long double functions like acoshl, expm1l or > log1pl are now "really implemented"? As far as I und

Use of C99 extra long double math functions after r236148

2012-05-27 Thread Rainer Hurling
Yesterday r236148 (Allow inclusion of libc++ to work after including math.h) was comitted to head, many thanks. Does this mean, that extra long double functions like acoshl, expm1l or log1pl are now "really implemented"? As far as I understand, they had only been declared before? If this is

  1   2   >