From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21573 invoked by alias); 22 Mar 2012 16:11:29 -0000 Received: (qmail 21557 invoked by uid 22791); 22 Mar 2012 16:11:27 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,TO_NO_BRKTS_PCNT X-Spam-Check-By: sourceware.org Received: from vinc17.pck.nerim.net (HELO smtp-xvii.vinc17.net) (213.41.242.187) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 22 Mar 2012 16:11:10 +0000 Received: by xvii.vinc17.org (Postfix, from userid 1000) id B575A31400B; Thu, 22 Mar 2012 17:11:07 +0100 (CET) Date: Thu, 22 Mar 2012 16:11:00 -0000 From: Vincent Lefevre To: munroesj@us.ibm.com Cc: "Joseph S. Myers" , libc-alpha@sourceware.org, gcc@gcc.gnu.org, Geert Bosch , Christoph Lauter Subject: Re: The state of glibc libm Message-ID: <20120322161107.GA28285@xvii.vinc17.org> Mail-Followup-To: munroesj@us.ibm.com, "Joseph S. Myers" , libc-alpha@sourceware.org, gcc@gcc.gnu.org, Geert Bosch , Christoph Lauter References: <20120314143045.GG3804@xvii.vinc17.org> <20120315020743.GH3804@xvii.vinc17.org> <1331826725.7288.6.camel@spokane1.rchland.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1331826725.7288.6.camel@spokane1.rchland.ibm.com> X-Mailer-Info: http://www.vinc17.net/mutt/ User-Agent: Mutt/1.5.21-6201-vl-r48020 (2011-12-20) X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2012-03/txt/msg00353.txt.bz2 On 2012-03-15 10:52:05 -0500, Steven Munroe wrote: > On Thu, 2012-03-15 at 03:07 +0100, Vincent Lefevre wrote: > > On 2012-03-14 14:40:06 +0000, Joseph S. Myers wrote: > > > On Wed, 14 Mar 2012, Vincent Lefevre wrote: > > > > > > > For double-double (IBM long double), I don't think the notion of > > > > correct rounding makes much sense anyway. Actually the double-double > > > > arithmetic is mainly useful for the basic operations in order to be > > > > able to implement elementary functions accurately (first step in > > > > Ziv's strategy, possibly a second step as well). IMHO, on such a > > > > platform, if expl() (for instance) just calls exp(), this is OK. > > > > Why would that be OK? If we have higher precision long double then the > libm should deliver that higher precision. I initially thought that the only goal of a double-double format (instead of the standard quadruple precision) was to get an accurate implementation of the elementary functions in double precision (BTW, that's probably why expl() and so on didn't exist before C99). Now, since expl() now exists, if the user calls it, perhaps his goal is to get more precision, so finally I agree that expl() should really have an accuracy close to LDBL_MANT_DIG. However this is quite useless in portable programs, where long double can have the same precision as double (as this is the case on ARM). For the same reason, if the user chose long double instead of double, this may be because he wanted more precision than double. So, in the long term, the ABI should probably be changed to have long double = quadruple precision (binary128). -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)