From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 13:38:36 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DCFAC102 for ; Mon, 22 Oct 2012 13:38:36 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ie0-f182.google.com (mail-ie0-f182.google.com [209.85.223.182]) by mx1.freebsd.org (Postfix) with ESMTP id 8729D8FC0A for ; Mon, 22 Oct 2012 13:38:36 +0000 (UTC) Received: by mail-ie0-f182.google.com with SMTP id k10so4817559iea.13 for ; Mon, 22 Oct 2012 06:38:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=si9eNGSymMdnXN7xfYL/jAKFhpZivOT8ZhH7revdICY=; b=SfvzDTTyjBRxf99Lin++sdLzJuH9edimrVuXWbsqmJsZWcvji+Q92p+/t2TprE/1GL U5Kqajj7hXvizDnwEDp/rPDH+3hgR7zLzSJod56mMV1WWU/RE2GgnQd4zatzHvgsLyYN NmyauI3Yvno3AAKpGFpxkujguMGeD15zck5Xy4GEHG4zK3AZ6ekUIYqIwMafga2Hw1x3 +W8+NiYRySd5vcKO5NnXKcfL5jtoJG05zfegrKLl2DXhvix7/LAQ6YNiu9v8mPbu1ziW nIgbn2mvFlaFV3q2NGuTlAOKMQlpmv42vEQOmCdIW9pRA63YTeGp8rqByoKjI21ID+bM RHig== Received: by 10.50.171.4 with SMTP id aq4mr9198218igc.72.1350913115737; Mon, 22 Oct 2012 06:38:35 -0700 (PDT) Received: from 63.imp.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPS id 7sm5500415igh.0.2012.10.22.06.38.29 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 22 Oct 2012 06:38:35 -0700 (PDT) Sender: Warner Losh Subject: Re: svn commit: r241755 - head/lib/msun/src Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <20121022213348.T1373@besplex.bde.org> Date: Mon, 22 Oct 2012 07:38:28 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <80A9038D-C84B-47D3-A137-F281449F4D88@bsdimp.com> References: <201210192246.q9JMkm4R092929@svn.freebsd.org> <20121020150917.I1095@besplex.bde.org> <18177777-6EE0-4103-98B0-272EFF98FE96@bsdimp.com> <20121022213348.T1373@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.1084) X-Gm-Message-State: ALoCoQkX1nO96vuGMZQJPUDf+iEm0lJ13EUK1QcrYYXoDzPZKSvttqAH51QnT0We8oIJlulEqe6H Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Oct 2012 13:38:37 -0000 On Oct 22, 2012, at 5:14 AM, Bruce Evans wrote: > On Sun, 21 Oct 2012, Warner Losh wrote: >=20 >> Feel free to fix them however. I added the comments because the = algorithms weren't quite the same... If you have a better way, feel = free to back my stuff out on the way to it. >=20 > But the algorithms are identical to a fault. Inside the functions, = all > lines except 1 in each correspond exactly, and the exception is a = style > bug. Only about 30 lines in each are not lexically identical. The > non-lexical differences are for things like different magic numbers. Except that's not true. For expf, only the first two terms of the 5 are = computed in Remes expansion. That's why I bothered to document the = difference. For logf, there are at least two additional terms in the = intermediate form. The differences here are: /* logf */ t1=3D w*(Lg2+w*Lg4);=20 t2=3D z*(Lg1+w*Lg3);=20 /* log */ t1=3D w*(Lg2+w*(Lg4+w*Lg6)); t2=3D z*(Lg1+w*(Lg3+w*(Lg5+w*Lg7))); =20 which to even the most casual observer are clearly different. > The old fdlibm comments aren't too careful about keeping magic numbers > out of the algorithm description so that the algorithm description is > as general as possible. The precise magic numbers are often critical > to the details of the implementation of the algorithm but not really > to the algorithm itself. The current code isn't careful at all about magic numbers. Which ones = are magic hex constants for IEEE stuff, and which ones are hex numbers = for the exact representation of important constants? Anyway, it is clear you guys don't want them in there so I've reverted = them. I'm totally baffled by this request because these algorithms are = similar not identical, but since you guys are the active maintainers, = I'll accede to your wishes after expressing my utter bafflement at the = justifications. Warner=