From patchwork Wed Mar 19 15:55:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 159 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx21.g.dreamhost.com (caibbdcaaahb.dreamhost.com [208.113.200.71]) by wilcox.dreamhost.com (Postfix) with ESMTP id C7EA63600D6 for ; Wed, 19 Mar 2014 08:56:07 -0700 (PDT) Received: by homiemail-mx21.g.dreamhost.com (Postfix, from userid 14307373) id 71757CA6139; Wed, 19 Mar 2014 08:56:07 -0700 (PDT) X-Original-To: glibc@patchwork.siddhesh.in Delivered-To: x14307373@homiemail-mx21.g.dreamhost.com 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 homiemail-mx21.g.dreamhost.com (Postfix) with ESMTPS id 4D9FCCA3261 for ; Wed, 19 Mar 2014 08:56:07 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=oWnlcD+j4TdgIa3ZvlsqeikF4PRDA CW7ZUhyE/O0Hpa3uvPfVHlRHnTSfpXFGi7eb4TSoq/CpkJSohwk4d2GXJCYTSzXk 9S91sIcSHbSPMrW7OOpAzG9YbIT6ecW/pwmY7K0RCnOZ2nt6rpTAdPrUzRaEW/tB kSMyaHTtjSKdT4= 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:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=/iWM1Ba/2ljlt16o+ORPCCakSvo=; b=p4E VZdr6lE4GhTgRYi2zShRCqjx4Qe3T49XjN0SqnrdFKmk2MSbaAX/a4PQ0+RKO83m czf7lUs1xfjiuQH+GX4ledCPDcm1lmyiO+zuQANMAwF2tsb4AO9F+cZp6KCK2L7w 7hP+A8y31a6sOKgdx4ErHkGGImxLpWxB9opsX0PI= Received: (qmail 16182 invoked by alias); 19 Mar 2014 15:56:05 -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 16173 invoked by uid 89); 19 Mar 2014 15:56:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Date: Wed, 19 Mar 2014 15:55:42 +0000 From: "Joseph S. Myers" To: Subject: Use ALL_RM_TEST for more libm tests Message-ID: MIME-Version: 1.0 X-DH-Original-To: glibc@patchwork.siddhesh.in Continuing the move to using ALL_RM_TEST for tests in libm-test.inc, this patch converts the tests of fdim, ldexp and scalb. fdim and scalb are cases where tests could depend on the rounding mode though none of the present test inputs do; ldexp is such a case where the function is equivalent to scalbn (for binary floating point) and the tests used were a subset of those for scalbn, so this patch makes ldexp testing use the scalbn tests, as done for other cases of libm function aliases. Tested x86_64 and x86. 2014-03-19 Joseph Myers * math/libm-test.inc (fdim_test): Use ALL_RM_TEST. (ldexp_test_data): Remove. (ldexp_test): Move to after scalbn_test. Use ALL_RM_TEST with scalbn_test_data. (scalb_test): Use ALL_RM_TEST. diff --git a/math/libm-test.inc b/math/libm-test.inc index 5ad0255..47c162f 100644 --- a/math/libm-test.inc +++ b/math/libm-test.inc @@ -7445,9 +7445,7 @@ static const struct test_ff_f_data fdim_test_data[] = static void fdim_test (void) { - START (fdim, 1); - RUN_TEST_LOOP_ff_f (fdim, fdim_test_data, ); - END; + ALL_RM_TEST (fdim, 1, fdim_test_data, RUN_TEST_LOOP_ff_f, END); } @@ -8169,31 +8167,6 @@ jn_test (void) } -static const struct test_fi_f_data ldexp_test_data[] = - { - TEST_fi_f (ldexp, 0, 0, 0, NO_INEXACT_EXCEPTION), - TEST_fi_f (ldexp, minus_zero, 0, minus_zero, NO_INEXACT_EXCEPTION), - - TEST_fi_f (ldexp, plus_infty, 1, plus_infty, NO_INEXACT_EXCEPTION), - TEST_fi_f (ldexp, minus_infty, 1, minus_infty, NO_INEXACT_EXCEPTION), - TEST_fi_f (ldexp, qnan_value, 1, qnan_value, NO_INEXACT_EXCEPTION), - - TEST_fi_f (ldexp, 0.8L, 4, 12.8L, NO_INEXACT_EXCEPTION), - TEST_fi_f (ldexp, -0.854375L, 5, -27.34L, NO_INEXACT_EXCEPTION), - - /* ldexp (x, 0) == x. */ - TEST_fi_f (ldexp, 1.0L, 0L, 1.0L, NO_INEXACT_EXCEPTION), - }; - -static void -ldexp_test (void) -{ - START (ldexp, 1); - RUN_TEST_LOOP_fi_f (ldexp, ldexp_test_data, ); - END; -} - - static const struct test_f_f1_data lgamma_test_data[] = { TEST_f_f1 (lgamma, plus_infty, plus_infty, 1), @@ -9784,10 +9757,7 @@ static const struct test_ff_f_data scalb_test_data[] = static void scalb_test (void) { - - START (scalb, 1); - RUN_TEST_LOOP_ff_f (scalb, scalb_test_data, ); - END; + ALL_RM_TEST (scalb, 1, scalb_test_data, RUN_TEST_LOOP_ff_f, END); } @@ -9830,6 +9800,13 @@ scalbn_test (void) ALL_RM_TEST (scalbn, 1, scalbn_test_data, RUN_TEST_LOOP_fi_f, END); } +static void +ldexp_test (void) +{ + /* ldexp uses the same test data as scalbn. */ + ALL_RM_TEST (ldexp, 1, scalbn_test_data, RUN_TEST_LOOP_fi_f, END); +} + static const struct test_fl_f_data scalbln_test_data[] = {