Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 May 2012 13:49:16 +0100
From:      David Chisnall <theraven@FreeBSD.org>
To:        Rainer Hurling <rhurlin@gwdg.de>
Cc:        freebsd-current@FreeBSD.org
Subject:   Re: Use of C99 extra long double math functions after r236148
Message-ID:  <DFE44442-A1B1-40B3-9A79-874BD2BE45E7@FreeBSD.org>
In-Reply-To: <4FC36FE1.9080908@gwdg.de>
References:  <4FC30090.4070003@gwdg.de> <4D8CF7D2-CBEE-438E-A9E7-9C47A8892622@FreeBSD.org> <4FC36FE1.9080908@gwdg.de>

next in thread | previous in thread | raw e-mail | index | archive | help
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:
>=20
> 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 rest =
is more a type of binning?

Yes, it's just about making libc++'s cmath header compile, nothing more. =
=20

> Yes, I agree. These outstanding long double math functions (like =
log1pl) and better unicode support are really needed for some important =
third party projects like R or SAGA GIS.

I very much doubt that anything is using the C11 unicode stuff yet, =
since no compiler or libc currently supports it...

> In the past I have read several times discussions about the =
correctness of long double functions on FreeBSD. Some drafts have been =
dismissed because of there inaccuracy in special cases. Also was =
discussed to get missing libm routines from NetBSD [1]. It appears as if =
we have to wait some more time ...

I thought we did pull in some NetBSD libm stuff recently.  Not sure what =
the status of that is, you'd need to check with das@.

> Yes, I think in most cases math/R is tolerant enough of just using =
doubles. But in the near future they plan to implement much more of the =
C99 stuff and their tolerance to offer workarounds for FreeBSD shrinks =
from release to release [2]. So these problems will increase :-(

Reading that email, it seems that they would prefer a function that =
exists and returns the wrong result to one that does not exist.  If this =
is really the attitude of the developers of R, then I shall make =
absolutely certain that I avoid using R for anything where I actually =
care about the results, and would strongly encourage everyone else to do =
the same. =20

In general, (sane) people use the long double versions because they need =
the extra precision and care about the result.  We could easily =
implement the long double versions now as toy versions that just called =
the double versions, but that would upset a lot of people who actually =
care about accuracy, who are the main target audience for these =
functions. =20

David=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?DFE44442-A1B1-40B3-9A79-874BD2BE45E7>