From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5862 invoked by alias); 14 Mar 2012 14:31:06 -0000 Received: (qmail 5839 invoked by uid 22791); 14 Mar 2012 14:31:05 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00 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; Wed, 14 Mar 2012 14:30:48 +0000 Received: by xvii.vinc17.org (Postfix, from userid 1000) id 86C1A32C003; Wed, 14 Mar 2012 15:30:45 +0100 (CET) Date: Wed, 14 Mar 2012 14:31:00 -0000 From: Vincent Lefevre To: "Joseph S. Myers" Cc: libc-alpha@sourceware.org, gcc@gcc.gnu.org, Geert Bosch , Christoph Lauter Subject: Re: The state of glibc libm Message-ID: <20120314143045.GG3804@xvii.vinc17.org> Mail-Followup-To: "Joseph S. Myers" , libc-alpha@sourceware.org, gcc@gcc.gnu.org, Geert Bosch , Christoph Lauter References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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/msg00200.txt.bz2 On 2012-02-29 17:17:17 +0000, Joseph S. Myers wrote: > (a) Most libm functions are not correctly rounded - and do not make an > attempt at being correctly rounded. > > A full fix would likely require new (automatically generated and tuned) > implementations such as proposed at > . As I understand it, > correct rounding (proved correct) is generally feasible for functions of > one binary32, binary64 or x86 extended argument. For functions of two > arguments, or one binary128 argument, it may not be feasible to search for > worst cases for correct rounding, although it may be possible to produce > implementations that are "probably" correctly rounding. For functions of > complex arguments or IBM long double, correct rounding may be less > feasible (even complex multiplication and division, and all of +-*/ on IBM > long double, are not correctly rounding, and correct rounding isn't so > well-defined for IBM long double with its possibility of discontiguous > mantissa bits). 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. > (b) Where functions do make attempts at being correctly rounded > (especially the IBM Accurate Mathematical Library functions), they tend to > be sufficiently slow that the slowness attracts bug reports. Again, this > would likely be addressed by new implementations that use careful error > bounds and information about worst cases to reduce the cost of being > correctly rounding. I'm not sure that the complaints are about worst cases. More probably software implementation vs hardware implementation in the average case. But a new software implementation (better in average) could help. -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)