From owner-svn-src-head@freebsd.org Sat Dec 5 02:34:35 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 E8541A403C4; Sat, 5 Dec 2015 02:34:34 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x22d.google.com (mail-pf0-x22d.google.com [IPv6:2607:f8b0:400e:c00::22d]) (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 B23531797; Sat, 5 Dec 2015 02:34:34 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by pfdd184 with SMTP id d184so34840249pfd.3; Fri, 04 Dec 2015 18:34:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=/z3l0qp9LLs+hxWiXE4OPNURoYXfCLnK2GNqQEF6S2A=; b=T8MfkJ03VdXnECvCdWwilChXM6EI1fWjpdM5V10tN41fVyVyVZolJF7kR1okYb/NCm OETmhIEXGJ4vG7jVoClhRDjg3c5ZDUEL2QkzCbAA4mJivYIsUFARcKho4sIHb9ZvU0PH llKv4iND0OT5wNUg1u5bSa8mFbxspxzVuqWztX20iqM6nbxaRvQDUh/rbS70cQt8k4Ep J8rke+gbUzZKSs0nt6jVt1DKRjbXcvpLWZlmHxOXupLfeu6bIdDN2+xfhFtA7c5FWLI4 hOJn1YInaziGyzQDZ59YQFBKmvRQtaTARWHxd3Tlcd7wGcxh9GA2cw48jPtmzwqOx3DS x8Hg== X-Received: by 10.98.70.141 with SMTP id o13mr26657150pfi.44.1449282874126; Fri, 04 Dec 2015 18:34:34 -0800 (PST) Received: from [192.168.20.7] (c-24-16-212-205.hsd1.wa.comcast.net. [24.16.212.205]) by smtp.gmail.com with ESMTPSA id u64sm19686142pfa.89.2015.12.04.18.34.31 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 Dec 2015 18:34:32 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: svn commit: r290605 - in head/lib/msun: . man From: NGie Cooper In-Reply-To: <20151109223117.Y2340@besplex.bde.org> Date: Fri, 4 Dec 2015 18:34:31 -0800 Cc: Garrett Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <4E9A0C74-DC06-41E3-A27D-46FF06A98C95@gmail.com> References: <201511091040.tA9AeG0B038056@repo.freebsd.org> <20151109223117.Y2340@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.2104) 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 02:34:35 -0000 Hi Bruce! > On Nov 9, 2015, at 04:03, Bruce Evans wrote: >=20 > On Mon, 9 Nov 2015, Garrett Cooper wrote: >=20 >> Log: >> Document powl(3) >=20 > 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); =46rom exp(3): double pow(double x, double y); float powf(float x, float y); long double powl(long double x, long double y); If the implementation is bugged/questionable, it should be documented in = CAVEATS. >> @@ -122,9 +126,10 @@ Otherwise the error in these functions i >> These functions will return the appropriate computation unless an = error >> occurs or an argument is out of range. >=20 > powl() almost never returns the appropriate computation. Its bugs are > most obvious when an argument is too large for double but not out of = range. These are bugs that need to be fixed then in the longterm, but in the = short term should be documented under CAVEATS. > I doubt that the rest of this section (about exception handling) is > correct for powl(). >=20 > 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. Thank you for the input! -NGie=