From owner-svn-src-all@freebsd.org Sun Dec 27 21:58:15 2015 Return-Path: Delivered-To: svn-src-all@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 1C582A5282F; Sun, 27 Dec 2015 21:58:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E3D86180A; Sun, 27 Dec 2015 21:58:14 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tBRLwDlW012100; Sun, 27 Dec 2015 21:58:13 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tBRLwDkS012099; Sun, 27 Dec 2015 21:58:13 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512272158.tBRLwDkS012099@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 27 Dec 2015 21:58:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r292807 - stable/9/tools/regression/lib/msun X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 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: Sun, 27 Dec 2015 21:58:15 -0000 Author: ngie Date: Sun Dec 27 21:58:13 2015 New Revision: 292807 URL: https://svnweb.freebsd.org/changeset/base/292807 Log: MFstable/10 r226602: r226602 (by das): Tests for cancellation in fma(). Also include more tests for 128-bit long doubles. Thanks for clusteradm (simon) for making the needed hardware available. Modified: stable/9/tools/regression/lib/msun/test-fma.c Directory Properties: stable/9/ (props changed) stable/9/tools/ (props changed) stable/9/tools/regression/ (props changed) Modified: stable/9/tools/regression/lib/msun/test-fma.c ============================================================================== --- stable/9/tools/regression/lib/msun/test-fma.c Sun Dec 27 21:55:26 2015 (r292806) +++ stable/9/tools/regression/lib/msun/test-fma.c Sun Dec 27 21:58:13 2015 (r292807) @@ -364,6 +364,65 @@ test_accuracy(void) 0x1.d87da3aafda40p70L, 0x1.d87da3aafda3fp70L, 0x1.d87da3aafda3fp70L, ALL_STD_EXCEPT, FE_INEXACT); #endif + + /* ilogb(x*y) - ilogb(z) = 0 */ + testrnd(fmaf, 0x1.31ad02p+100, 0x1.2fbf7ap-42, -0x1.c3e106p+58, + -0x1.64c27cp+56, -0x1.64c27ap+56, -0x1.64c27cp+56, + -0x1.64c27ap+56, ALL_STD_EXCEPT, FE_INEXACT); + testrnd(fma, 0x1.31ad012ede8aap+100, 0x1.2fbf79c839067p-42, + -0x1.c3e106929056ep+58, -0x1.64c282b970a5fp+56, + -0x1.64c282b970a5ep+56, -0x1.64c282b970a5fp+56, + -0x1.64c282b970a5ep+56, ALL_STD_EXCEPT, FE_INEXACT); +#if LDBL_MANT_DIG == 113 + testrnd(fmal, 0x1.31ad012ede8aa282fa1c19376d16p+100L, + 0x1.2fbf79c839066f0f5c68f6d2e814p-42L, + -0x1.c3e106929056ec19de72bfe64215p+58L, + -0x1.64c282b970a612598fc025ca8cddp+56L, + -0x1.64c282b970a612598fc025ca8cddp+56L, + -0x1.64c282b970a612598fc025ca8cdep+56L, + -0x1.64c282b970a612598fc025ca8cddp+56L, + ALL_STD_EXCEPT, FE_INEXACT); +#elif LDBL_MANT_DIG == 64 + testrnd(fmal, 0x1.31ad012ede8aa4eap+100L, 0x1.2fbf79c839066aeap-42L, + -0x1.c3e106929056e61p+58L, -0x1.64c282b970a60298p+56L, + -0x1.64c282b970a60298p+56L, -0x1.64c282b970a6029ap+56L, + -0x1.64c282b970a60298p+56L, ALL_STD_EXCEPT, FE_INEXACT); +#elif LDBL_MANT_DIG == 53 + testrnd(fmal, 0x1.31ad012ede8aap+100L, 0x1.2fbf79c839067p-42L, + -0x1.c3e106929056ep+58L, -0x1.64c282b970a5fp+56L, + -0x1.64c282b970a5ep+56L, -0x1.64c282b970a5fp+56L, + -0x1.64c282b970a5ep+56L, ALL_STD_EXCEPT, FE_INEXACT); +#endif + + /* x*y (rounded) ~= -z */ + /* XXX spurious inexact exceptions */ + testrnd(fmaf, 0x1.bbffeep-30, -0x1.1d164cp-74, 0x1.ee7296p-104, + -0x1.c46ea8p-128, -0x1.c46ea8p-128, -0x1.c46ea8p-128, + -0x1.c46ea8p-128, ALL_STD_EXCEPT & ~FE_INEXACT, 0); + testrnd(fma, 0x1.bbffeea6fc7d6p-30, 0x1.1d164c6cbf078p-74, + -0x1.ee72993aff948p-104, -0x1.71f72ac7d9d8p-159, + -0x1.71f72ac7d9d8p-159, -0x1.71f72ac7d9d8p-159, + -0x1.71f72ac7d9d8p-159, ALL_STD_EXCEPT & ~FE_INEXACT, 0); +#if LDBL_MANT_DIG == 113 + testrnd(fmal, 0x1.bbffeea6fc7d65927d147f437675p-30L, + 0x1.1d164c6cbf078b7a22607d1cd6a2p-74L, + -0x1.ee72993aff94973876031bec0944p-104L, + 0x1.64e086175b3a2adc36e607058814p-217L, + 0x1.64e086175b3a2adc36e607058814p-217L, + 0x1.64e086175b3a2adc36e607058814p-217L, + 0x1.64e086175b3a2adc36e607058814p-217L, + ALL_STD_EXCEPT & ~FE_INEXACT, 0); +#elif LDBL_MANT_DIG == 64 + testrnd(fmal, 0x1.bbffeea6fc7d6592p-30L, 0x1.1d164c6cbf078b7ap-74L, + -0x1.ee72993aff949736p-104L, 0x1.af190e7a1ee6ad94p-168L, + 0x1.af190e7a1ee6ad94p-168L, 0x1.af190e7a1ee6ad94p-168L, + 0x1.af190e7a1ee6ad94p-168L, ALL_STD_EXCEPT & ~FE_INEXACT, 0); +#elif LDBL_MANT_DIG == 53 + testrnd(fmal, 0x1.bbffeea6fc7d6p-30L, 0x1.1d164c6cbf078p-74L, + -0x1.ee72993aff948p-104L, -0x1.71f72ac7d9d8p-159L, + -0x1.71f72ac7d9d8p-159L, -0x1.71f72ac7d9d8p-159L, + -0x1.71f72ac7d9d8p-159L, ALL_STD_EXCEPT & ~FE_INEXACT, 0); +#endif } static void @@ -409,9 +468,10 @@ test_double_rounding(void) test(fmal, 0x1.4p+0L, 0x1.0000000000000004p+0L, 0x1p-128L, 0x1.4000000000000006p+0L, ALL_STD_EXCEPT, FE_INEXACT); #elif LDBL_MANT_DIG == 113 - /* XXX untested test */ - test(fmal, 0x1.4p+0L, 0x1.0000000000000000000000000002p+0L, 0x1p-224L, - 0x1.4000000000000000000000000003p+0L, ALL_STD_EXCEPT, FE_INEXACT); + test(fmal, 0x1.8000000000000000000000000001p+0L, + 0x1.8000000000000000000000000001p+0L, + -0x1.0000000000000000000000000001p-224L, + 0x1.2000000000000000000000000001p+1L, ALL_STD_EXCEPT, FE_INEXACT); #endif }