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

From: Stephen Montgomery-Smith <stephen_at_missouri.edu>
Date: Tue, 29 May 2012 12:54:51 -0500
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 into FreeBSD. I can
>> assure you that there has never been a rush of people
>> volunteering to help or a rush of people willing to fund
>> the development of the necessary code.
>
> The almost complete absence of volunteers in this case is first of all
> caused by the need of very special, deep knowlegdes on mathematical and
> informatical issues. I bet there are only a few people out there, who
> are really good in both (three of them are known to us ;) ). The
> problems with quality standards in such libraries spreaded over most
> OS'es and platforms support this view. (I am aware that these arguments
> are kown and discussed before.)

> The more important question to me is, how can the remaining (huge!) work
> on the systems libm done in a foreseeable time. As one possibility,
> wouldn't it be imaginable to pay some people for doing (some of) this
> work (FreeBSD Foundation, Sponsors from industry and science etc.)? I
> personally, as a private person, would be willing to pay a few hundred
> dollars for it. Paying people for other tasks in FreeBSD is not entirely
> uncommon, if I am not mistaken.

If there were a "freebsd-floating-point_at_FreeBSD.org" mailing list to 
discuss these issues, I would eagerly join.  While I have never written 
libm-style libraries myself, I do have knowledge of both computers AND 
mathematics, and I do teach two university courses: "Numerical Methods" 
and "Numerical Linear Algebra."  And I have written quite a bit of 
numerical code, so I do know about the issues of testing and debugging 
such code.

I would be happy to take on any steep learning curve, and make 
contributions, if only I were part of a group that would steer me in the 
right direction.

Finally, Steve made a point that the way gcc multiplies complex numbers 
is wasteful in computational time.  I have been bitten by this.  I wrote 
some code that involved multiplying large numbers of complex numbers.  I 
first wrote it using the complex C99 code.  Then I rewrote it using 
double, writing out the complex multiplication long hand, and the 
program went twice as fast!  (It involved multiplying numbers that were 
purely real or purely imaginary, so performing (x)*(I*y) by 
(x+0*I)*(0+y*I) really did slow it down.)

Anyway, given that floating point is a big issue, and we are about a 
decade behind schedule, really suggests that a 
floating-point_at_freebsd.org mailing list is needed.  Or maybe there is an 
existing freebsd mailing list you guys already occupy.

Stephen
Received on Tue May 29 2012 - 15:54:55 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:27 UTC