From patchwork Fri Feb 24 18:37:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tulio Magno Quites Machado Filho X-Patchwork-Id: 732246 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 3vVKcM6D66z9s7M for ; Sat, 25 Feb 2017 05:38:27 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="WhdfL47I"; 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; q=dns; s= default; b=v8WsIZG2h5cZoEJJMGw3l9gjAu0WTEyqcJY5ORaeNEW8A4iEIV/Qu udlCSS1WAP5eK/eMAfDYBJlKsm+u54wxwGo7rzI9jFDJupnyqL1j60mfUnDxtaGA 1L00J17td9XMb/lVc6831S3ix/U2EW+Swilz0CcT4qIbDEhmVOO2NU= 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; s=default; bh=fafqUP1Szd0hbmeNKdfk7MSgGWE=; b=WhdfL47IX0i5pDoGihxRwST9MNY/ HZYcMqS3M/avcnsvnF0MrsbzUAS7O/yqhVFJiDs3OBj7XMLik0nj/Q7QXrajvtO1 55XnFezbYX4WevpQWVWiH9hMyvHjFO52tz0/kvun3pWzisR1KSSOw07wzljQkWpY mGrE9eRL/L/Qzlc= Received: (qmail 3000 invoked by alias); 24 Feb 2017 18:38:18 -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 2988 invoked by uid 89); 24 Feb 2017 18:38:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy= X-HELO: mx0a-001b2d01.pphosted.com From: "Tulio Magno Quites Machado Filho" To: libc-alpha@sourceware.org Subject: [PATCH] Use independent type literals in libm-test-support.c Date: Fri, 24 Feb 2017 15:37:30 -0300 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17022418-1523-0000-0000-0000028306CF X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17022418-1524-0000-0000-00002A18160D Message-Id: <1487961450-21648-1-git-send-email-tuliom@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-02-24_12:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1702240176 2017-02-24 Tulio Magno Quites Machado Filho * math/libm-test-support.c (check_ulp): Use LIT() around literal numbers. --- math/libm-test-support.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/math/libm-test-support.c b/math/libm-test-support.c index 8890c1c..07b8f25 100644 --- a/math/libm-test-support.c +++ b/math/libm-test-support.c @@ -1083,7 +1083,7 @@ check_ulp (void) exit (EXIT_FAILURE); } /* Check that the ulp of one is a normal value... */ - ulps = ulp (1.0L); + ulps = ulp (LIT(1.0)); if (fpclassify (ulps) != FP_NORMAL) { fprintf (stderr, "ulp (1.0L) is not FP_NORMAL\n"); @@ -1094,8 +1094,8 @@ check_ulp (void) We allow +/- 1 ulp around the represented value. */ value = FUNC(nextafter) (0, 1); ulps = ULPDIFF (value, 0); - ulpx = ulp (1.0L); - if (ulps < (1.0L - ulpx) || ulps > (1.0L + ulpx)) + ulpx = ulp (LIT(1.0)); + if (ulps < (LIT(1.0) - ulpx) || ulps > (LIT(1.0) + ulpx)) { fprintf (stderr, "Value outside of 1 +/- 1ulp.\n"); exit (EXIT_FAILURE); @@ -1105,8 +1105,8 @@ check_ulp (void) We allow +/- 1 ulp around the represented value. */ value = FUNC(nextafter) (10, 20); ulps = ULPDIFF (value, 10); - ulpx = ulp (1.0L); - if (ulps < (1.0L - ulpx) || ulps > (1.0L + ulpx)) + ulpx = ulp (LIT(1.0)); + if (ulps < (LIT(1.0) - ulpx) || ulps > (LIT(1.0) + ulpx)) { fprintf (stderr, "Value outside of 1 +/- 1ulp.\n"); exit (EXIT_FAILURE); @@ -1114,8 +1114,8 @@ check_ulp (void) /* This gives one more ulp. */ value = FUNC(nextafter) (value, 20); ulps = ULPDIFF (value, 10); - ulpx = ulp (2.0L); - if (ulps < (2.0L - ulpx) || ulps > (2.0L + ulpx)) + ulpx = ulp (LIT(2.0)); + if (ulps < (LIT(2.0) - ulpx) || ulps > (LIT(2.0) + ulpx)) { fprintf (stderr, "Value outside of 2 +/- 1ulp.\n"); exit (EXIT_FAILURE); @@ -1124,8 +1124,8 @@ check_ulp (void) for (i = 2; i < 100; i++) value = FUNC(nextafter) (value, 20); ulps = ULPDIFF (value, 10); - ulpx = ulp (100.0L); - if (ulps < (100.0L - ulpx) || ulps > (100.0L + ulpx)) + ulpx = ulp (LIT(100.0)); + if (ulps < (LIT(100.0) - ulpx) || ulps > (LIT(100.0) + ulpx)) { fprintf (stderr, "Value outside of 100 +/- 1ulp.\n"); exit (EXIT_FAILURE);