From owner-svn-src-all@FreeBSD.ORG Tue Dec 7 02:19:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30EC31065670; Tue, 7 Dec 2010 02:19:16 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 21A838FC14; Tue, 7 Dec 2010 02:19:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oB72JG99051399; Tue, 7 Dec 2010 02:19:16 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oB72JF1n051394; Tue, 7 Dec 2010 02:19:15 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201012070219.oB72JF1n051394@svn.freebsd.org> From: David Schultz Date: Tue, 7 Dec 2010 02:19:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216247 - in head/lib/msun: man src X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 07 Dec 2010 02:19:16 -0000 Author: das Date: Tue Dec 7 02:19:15 2010 New Revision: 216247 URL: http://svn.freebsd.org/changeset/base/216247 Log: Fix various nits in style and comments that were pointed out by bde. Code changes verified with md5. Modified: head/lib/msun/man/math.3 head/lib/msun/src/e_log2.c head/lib/msun/src/e_log2f.c head/lib/msun/src/k_logf.h Modified: head/lib/msun/man/math.3 ============================================================================== --- head/lib/msun/man/math.3 Mon Dec 6 23:49:27 2010 (r216246) +++ head/lib/msun/man/math.3 Tue Dec 7 02:19:15 2010 (r216247) @@ -195,7 +195,7 @@ yn Bessel function of the second kind of .El .Pp The routines -in this section may not produce a result that is correctly rounded, +in this section might not produce a result that is correctly rounded, so reproducible results cannot be guaranteed across platforms. For most of these functions, however, incorrect rounding occurs rarely, and then only in very-close-to-halfway cases. @@ -231,9 +231,8 @@ Many of the routines to compute transcen inaccurate results in other than the default rounding mode. .Pp On the i386 platform, trigonometric argument reduction is not -performed accurately for very large arguments, resulting in errors -greater than 1 -.Em ulp +performed accurately for huge arguments, resulting in +large errors for such arguments to .Fn cos , .Fn sin , Modified: head/lib/msun/src/e_log2.c ============================================================================== --- head/lib/msun/src/e_log2.c Mon Dec 6 23:49:27 2010 (r216246) +++ head/lib/msun/src/e_log2.c Tue Dec 7 02:19:15 2010 (r216247) @@ -14,8 +14,8 @@ #include __FBSDID("$FreeBSD$"); -/* log2(x) - * Return the base 2 logarithm of x. +/* + * Return the base 2 logarithm of x. See k_log.c for details on the algorithm. */ #include "math.h" @@ -24,8 +24,8 @@ __FBSDID("$FreeBSD$"); static const double two54 = 1.80143985094819840000e+16, /* 0x43500000, 0x00000000 */ -ivln2hi = 0x1.71547652000p+0, -ivln2lo = 0x1.705fc2eefa2p-33; +ivln2hi = 1.44269504072144627571e+00, /* 0x3ff71547, 0x65200000 */ +ivln2lo = 1.67517131648865118353e-10; /* 0x3de705fc, 0x2eefa200 */ static const double zero = 0.0; Modified: head/lib/msun/src/e_log2f.c ============================================================================== --- head/lib/msun/src/e_log2f.c Mon Dec 6 23:49:27 2010 (r216246) +++ head/lib/msun/src/e_log2f.c Tue Dec 7 02:19:15 2010 (r216247) @@ -12,14 +12,18 @@ #include __FBSDID("$FreeBSD$"); +/* + * Return the base 2 logarithm of x. See k_log.c for details on the algorithm. + */ + #include "math.h" #include "math_private.h" #include "k_logf.h" static const float two25 = 3.3554432000e+07, /* 0x4c000000 */ -ivln2hi = 0x1.716p+0f, -ivln2lo = -0x1.7135a8fa03d11p-13; +ivln2hi = 1.4428710938e+00, /* 0x3fb8b000 */ +ivln2lo = -1.7605285393e-04; /* 0xb9389ad4 */ static const float zero = 0.0; Modified: head/lib/msun/src/k_logf.h ============================================================================== --- head/lib/msun/src/k_logf.h Mon Dec 6 23:49:27 2010 (r216246) +++ head/lib/msun/src/k_logf.h Tue Dec 7 02:19:15 2010 (r216247) @@ -12,8 +12,8 @@ #include __FBSDID("$FreeBSD$"); -/* __kernel_logf(x) - * Return log(x) - (x-1) for x in ~[sqrt(2)/2, sqrt(2)]. +/* + * float version of __kernel_log(x). See k_log.c for details. */ static const float @@ -33,7 +33,7 @@ __kernel_logf(float x) f = x-(float)1.0; if((0x007fffff&(0x8000+ix))<0xc000) { /* -2**-9 <= f < 2**-9 */ - if(f==0.0) return 0.0; + if(f==0.0f) return 0.0f; return f*f*((float)0.33333333333333333*f-(float)0.5); } s = f/((float)2.0+f);