From owner-svn-src-head@FreeBSD.ORG Mon Jun 3 18:07:05 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 17146BAE; Mon, 3 Jun 2013 18:07:05 +0000 (UTC) (envelope-from kargl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 099B11DA4; Mon, 3 Jun 2013 18:07:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r53I74bb005038; Mon, 3 Jun 2013 18:07:04 GMT (envelope-from kargl@svn.freebsd.org) Received: (from kargl@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r53I74RQ005035; Mon, 3 Jun 2013 18:07:04 GMT (envelope-from kargl@svn.freebsd.org) Message-Id: <201306031807.r53I74RQ005035@svn.freebsd.org> From: Steve Kargl Date: Mon, 3 Jun 2013 18:07:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r251328 - head/lib/msun/ld80 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 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: Mon, 03 Jun 2013 18:07:05 -0000 Author: kargl Date: Mon Jun 3 18:07:04 2013 New Revision: 251328 URL: http://svnweb.freebsd.org/changeset/base/251328 Log: Add a u suffix to the IEEEl2bits unions o_threshold and u_threshold, and use macros to access the e component of the unions. This allows the portions of the code in ld80 to be identical to the ld128 code. Obtained from: bde Modified: head/lib/msun/ld80/s_expl.c Modified: head/lib/msun/ld80/s_expl.c ============================================================================== --- head/lib/msun/ld80/s_expl.c Mon Jun 3 17:51:08 2013 (r251327) +++ head/lib/msun/ld80/s_expl.c Mon Jun 3 18:07:04 2013 (r251328) @@ -61,9 +61,12 @@ static volatile const long double tiny = static const union IEEEl2bits /* log(2**16384 - 0.5) rounded towards zero: */ -o_threshold = LD80C(0xb17217f7d1cf79ab, 13, 11356.5234062941439488L), +/* log(2**16384 - 0.5 + 1) rounded towards zero for expm1l() is the same: */ +o_thresholdu = LD80C(0xb17217f7d1cf79ab, 13, 11356.5234062941439488L), +#define o_threshold (o_thresholdu.e) /* log(2**(-16381-64-1)) rounded towards zero: */ -u_threshold = LD80C(0xb21dfe7f09e2baa9, 13, -11399.4985314888605581L); +u_thresholdu = LD80C(0xb21dfe7f09e2baa9, 13, -11399.4985314888605581L); +#define u_threshold (u_thresholdu.e) static const double /* @@ -246,9 +249,9 @@ expl(long double x) return (0.0L); /* x is -Inf */ return (x + x); /* x is +Inf, NaN or unsupported */ } - if (x > o_threshold.e) + if (x > o_threshold) return (huge * huge); - if (x < u_threshold.e) + if (x < u_threshold) return (tiny * tiny); } else if (ix < BIAS - 66) { /* |x| < 0x1p-66 */ /* includes pseudo-denormals */