From owner-freebsd-current@FreeBSD.ORG Fri Jul 13 15:23:21 2012 Return-Path: Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FEF5106566C; Fri, 13 Jul 2012 15:23:21 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) by mx1.freebsd.org (Postfix) with ESMTP id 346C58FC0C; Fri, 13 Jul 2012 15:23:21 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.5/8.14.5) with ESMTP id q6DFNJYn066979; Fri, 13 Jul 2012 08:23:19 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.5/8.14.5/Submit) id q6DFNHOC066978; Fri, 13 Jul 2012 08:23:17 -0700 (PDT) (envelope-from sgk) Date: Fri, 13 Jul 2012 08:23:17 -0700 From: Steve Kargl To: Peter Jeremy Message-ID: <20120713152317.GA66875@troutmask.apl.washington.edu> References: <20120708124047.GA44061@zim.MIT.EDU> <210816F0-7ED7-4481-ABFF-C94A700A3EA0@bsdimp.com> <20120708233624.GA53462@troutmask.apl.washington.edu> <4FFBF16D.2030007@gwdg.de> <2A1DE516-ABB4-49D7-8C3D-2C4DA2D9FCF5@bsdimp.com> <20120711212009.GA15542@night.db.net> <20120711214346.GA9877@troutmask.apl.washington.edu> <20120711215414.GA16350@night.db.net> <20120711223247.GA9964@troutmask.apl.washington.edu> <20120713114100.GB83006@server.rulingia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120713114100.GB83006@server.rulingia.com> User-Agent: Mutt/1.4.2.3i Cc: Diane Bruce , freebsd-current@FreeBSD.ORG, David Schultz , Warner Losh 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: Fri, 13 Jul 2012 15:23:21 -0000 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 hyperbolic functions of complex float and complex double arguments, one can follow the approach in msun/src/s_ccosh[f].c. For the missing hyperbolic functions of long double and complex long double argument, people will need to wait for expl() and expm1l() to show up in tree. I have a working expl() and almost working expm1l() for ld80 systems. Until a few months ago, I did not have access to a ld128 system, so I haven't wasted my time implementing ld128 version that I could not test. > >When I do find > >some free time, I look at what is missing and start to > >put together a new function. At the moment, it seems > >that it takes 3+ years to get a new function written, > >tested, and committed. > > And, from what I can see, much of this is done quietly - which opens > up the possibility that two people might both implement the same code > or that people will avoid the area in fear of treading on someone > else's toes. As I said previously, I believe the existing wiki page > could be improved to form a central co-ordinating point to show what > what activity is (or isn't) occurring. Well, I've posted the code I've written to freebsd-standards mailinglist more than once, and have only ever received comments from exactly 2 people. > >but most people seem to push the "easy button" and want > >to grab either cephes or netlib's libm. There are > >technical issues with this approach that I won't > >rehash again. > > Doing it properly requires significant effort by people with fairly > specialised skills. Whilst the project has several people with the > skills, it appears that none of them currently have the time. In the > meantime, FreeBSD is taking free kicks from other FOSS groups that > have gone down the quick-and-dirty path. > > 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 functions, the Project would be best served by > committing the best code that is currently available under a suitable > license and cleaning it up over time (as was done for the current > libm). Well, hopefully, the someone who takes the best available code also tests this code before it is committed. I suspect that some if not all of those codes that involve complex arguments will have problems with the requirements in n1256.pdf[1], because neither gcc in base nor clang do complex arithmetic correctly under certains conditions when an expression uses I from complex.h. [1] http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf -- Steve