From owner-svn-src-head@freebsd.org Sat Dec 5 05:20:09 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 64D5DA4117C for ; Sat, 5 Dec 2015 05:20:09 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qg0-x22f.google.com (mail-qg0-x22f.google.com [IPv6:2607:f8b0:400d:c04::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 149781D98 for ; Sat, 5 Dec 2015 05:20:09 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by qgcc31 with SMTP id c31so106400928qgc.3 for ; Fri, 04 Dec 2015 21:20:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=bV6YlqEQ+aRAfX93iyt2o2Ep/uxbuiFJVDPY/ZolT2w=; b=g5/U0fi6zR2ATC4Y4SFT0Tx9RpMQdgWX3QrTQnefoh06S/cpBnLCaZ3IcPp59YLO9h FQ7teBcE1Ge1N3B9O/yhyNsC34pHVMUo1vziMoMMUFMDRC86JEQoTKNs/v/zBUyT7sRd iOhEEpWLktM/WJr33rzII4AI1NxX385M4fsPyaFdfJF+qwQ5knCSAzTD3xflEWjzK2j9 r6RBzaKhXST3LZw381N9yPhAFe3xXdWeB2AMrto+I+FziBZvV2hCWNHxgNnNoIU0S88U UbMCeycCkIz6uK94rrdu+nak7igB9DqgtLbvAqOoo3X7Jm7GqcWg4979ty9FSNOSdyQe 5l+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=bV6YlqEQ+aRAfX93iyt2o2Ep/uxbuiFJVDPY/ZolT2w=; b=Y+TeH5/XHqmYYQkF7bXmAuoWn12hCEvI6BzhDDG/dSahwukiDPWohvNuojdF8A1yeb XmmqwqyI65nnjnMtL5jfVDBoQ2L9VO4ZQiIShZ4ID0Y4j9AZ68RaR9tcpiCnJwpa8u8B M5TqYGQk+GZdFTJ5Q1/T4Z8MPNlM9UfdTc/uUp/n3z/Q5GEb2pgIC/7o8pCUPe2QbE6x /1FANhF6ZYJY6NbCNiHgseNZxLp1Tgqh+3vRVS0GdiN3hkqNNSXt0YfiLbf0hh1/DOEB 8BHqfWVQC+UKTBA1GLuV8OWSAxtDHCBMklmYr49U4ifRhZaITcGt7UWc+QaBVr34wBGB Oyag== X-Gm-Message-State: ALoCoQkrYypVxPDsHwLXW40yNXCHJHy5Noq41oubucUy6jDK6W2ukHod1+bRDOZnBqt2DBptWepJ MIME-Version: 1.0 X-Received: by 10.140.250.70 with SMTP id v67mr25577952qhc.43.1449292807968; Fri, 04 Dec 2015 21:20:07 -0800 (PST) Sender: wlosh@bsdimp.com Received: by 10.140.27.181 with HTTP; Fri, 4 Dec 2015 21:20:07 -0800 (PST) X-Originating-IP: [50.253.99.174] In-Reply-To: <4E9A0C74-DC06-41E3-A27D-46FF06A98C95@gmail.com> References: <201511091040.tA9AeG0B038056@repo.freebsd.org> <20151109223117.Y2340@besplex.bde.org> <4E9A0C74-DC06-41E3-A27D-46FF06A98C95@gmail.com> Date: Fri, 4 Dec 2015 22:20:07 -0700 X-Google-Sender-Auth: Wqk8KzhOL9uNm9ZkGt760fCsYiY Message-ID: Subject: Re: svn commit: r290605 - in head/lib/msun: . man From: Warner Losh To: NGie Cooper Cc: Bruce Evans , Garrett Cooper , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 05:20:09 -0000 On Fri, Dec 4, 2015 at 7:34 PM, NGie Cooper wrote: > Hi Bruce! > > > On Nov 9, 2015, at 04:03, Bruce Evans wrote: > > > > On Mon, 9 Nov 2015, Garrett Cooper wrote: > > > >> Log: > >> Document powl(3) > > > > powl was garbage that was intentionally undocumented. At least, I > > intentionally ignored its non-documentation together with it. > > POSIX documents it and I noticed it was missing when porting the msun > testcases from NetBSD. That=E2=80=99s the reason why I filed the bug. > > > powl doesn't compute the value of .Ar x to the exponent .Ar y. It > computes > > the value of (double)(.Ar x) to the exponent (double)(.Ar y), converted > to > > double. > > Hmmm? The types look ok per the function signatures in lib/msun: > > lib/msun/src/imprecise.c:imprecise_powl(long double x, long double y) > lib/msun/src/math.h:long double powl(long double, long double); > The prototype is right. The code is poo. It does as Bruce says. That's why it wasn't documented. People might think it was safe to use. > > These are bugs that need to be fixed then in the longterm, but in the > short term should be documented under CAVEATS. > It is so aweful, it should have remained undocumented until a suitable implementation showed up. > > I doubt that the rest of this section (about exception handling) is > > correct for powl(). > > > > The section on errors wasn't changed since it uses generic pow(). It > > claims that the error is generally less than 1 ulp. But for powl(), > > the error is generally more that 4096 ulps. Much more when the > > error exponentiates. powf() and pow() do well to avoid exponentiation > > of roundoff errors. > > I think the comment above applies here too about adding some notes to > CAVEATS. > This is what makes it poo. 4096 ulps is really horrific. Warner