From patchwork Thu May 26 21:42:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul E. Murphy" X-Patchwork-Id: 626899 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rG2h14HP9z9t3Z for ; Fri, 27 May 2016 07:43:13 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b=r3IkWy0T; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:in-reply-to :references:in-reply-to:references; q=dns; s=default; b=hYx3/KF9 EJqkWZ81wSqHL82CrWvWTvi3cbn07TBKGRxpmJ2sc+jWkL/YFrnjB8j0V6bfylQa sLk+b58crcVsjeHz8vKqPqAOkap0+uWKn0qB5QcVSZUsBKo3NwLE1Fec4p859KJ8 Y0+acZLdpKTfqTuqmdiZReVTdjENzmAxdLw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:in-reply-to :references:in-reply-to:references; s=default; bh=I/uPhh5nqwFIRk zMW++PX6/OGug=; b=r3IkWy0T/hmyC8ECCUiyfsqxvosczXkW3hP6uhfFa0mXS+ YKbZMNr/GxQKVZZLfa7UGFobDkT93dpSuSos1RJo6XiBCazFru3u/0CJD5tfz8bh ZiX/JZx7W7asW3wX6l4LnozQp1wjID62Exw76lQCN7QVQoSuWlESzXe7eFG8o= Received: (qmail 83519 invoked by alias); 26 May 2016 21:42:59 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 83467 invoked by uid 89); 26 May 2016 21:42:58 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=Hx-languages-length:2200, 38.0 X-HELO: e17.ny.us.ibm.com X-IBM-Helo: d01dlp01.pok.ibm.com X-IBM-MailFrom: murphyp@linux.vnet.ibm.com X-IBM-RcptTo: libc-alpha@sourceware.org From: "Paul E. Murphy" To: libc-alpha@sourceware.org Subject: [PATCHv3 07/11] Replace M_El with lit_e in libm-test.inc Date: Thu, 26 May 2016 16:42:36 -0500 Message-Id: <7d91e6c3ff37776f85d0e9a7055dc5f242a7365a.1464297421.git.murphyp@linux.vnet.ibm.com> In-Reply-To: References: In-Reply-To: References: X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16052621-0041-0000-0000-0000043FFE1B X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused This is useful in situations where the long double type is less precise than the type under test. * libm-test.inc: Replace usage of M_El with (lit_e): New macro. --- math/libm-test.inc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/math/libm-test.inc b/math/libm-test.inc index 38f03bd..874b6b8 100644 --- a/math/libm-test.inc +++ b/math/libm-test.inc @@ -328,6 +328,11 @@ struct ulp_data /* pi */ #define lit_pi LITM (M_PI) +/* Other useful constants. */ + +/* e */ +#define lit_e LITM (M_E) + #define ulps_file_name "ULPs" /* Name of the ULPs file. */ static FILE *ulps_file; /* File to document difference. */ static int output_ulps; /* Should ulps printed? */ @@ -7104,7 +7109,7 @@ static const struct test_f_f_data fabs_test_data[] = TEST_f_f (fabs, -min_value, min_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), TEST_f_f (fabs, -max_value, max_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), TEST_f_f (fabs, 38.0, 38.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), - TEST_f_f (fabs, -M_El, M_El, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (fabs, -lit_e, lit_e, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), }; static void @@ -7940,7 +7945,7 @@ hypot_test (void) static const struct test_f_i_data ilogb_test_data[] = { TEST_f_i (ilogb, 1, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), - TEST_f_i (ilogb, M_El, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_i (ilogb, lit_e, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), TEST_f_i (ilogb, 1024, 10, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), TEST_f_i (ilogb, -2000, 10, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), TEST_f_i (ilogb, 0.5, -1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED); @@ -9112,7 +9117,7 @@ static const struct test_f_f_data logb_test_data[] = TEST_f_f (logb, -snan_value, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION), TEST_f_f (logb, 1, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), - TEST_f_f (logb, M_El, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (logb, lit_e, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), TEST_f_f (logb, 1024, 10, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), TEST_f_f (logb, -2000, 10, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),