From patchwork Mon Dec 20 23:18:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 49129 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 62D3E385843E for ; Mon, 20 Dec 2021 23:19:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 62D3E385843E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1640042366; bh=Bp+y1VOuNOk5oYc/nfls1+xu9fKg6Coyo5f7+taO4Lg=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=Df8IxbXrGoINrJNW6xeBWBMZHpmx6ErctALAC4TeWCp15Pk/UYSZJ40Bh9teyYfDY zn3xvjKipDbpqQRZlDTHZno768ZexoZTSVMZCxVquXG0Ey4kWRTodP+KR5758h+JE1 vysNGe3UJY74yzqhbAwtOtwsldyF/KL3uE5ZEaa8= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by sourceware.org (Postfix) with ESMTPS id 7D69D3858008 for ; Mon, 20 Dec 2021 23:18:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7D69D3858008 Received: by mail-pj1-x1036.google.com with SMTP id lr15-20020a17090b4b8f00b001b19671cbebso1413127pjb.1 for ; Mon, 20 Dec 2021 15:18:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Bp+y1VOuNOk5oYc/nfls1+xu9fKg6Coyo5f7+taO4Lg=; b=313z9ilHRVn8/hJMrjTY+yar4PG3lfOeLEr29UKPRmepDmYOo4t9Qw9YerQDhVLf+p ZDPbzqFczz1olGCIF3QFTY0+FkJv1+l1hzAGaoN3Z4YwlMB2s1D+yfgtN32/cFYQqPqv KYi6DGfN/EPtJc1qPIQpboNLA0Pc+YOuD6Cm5N5xSbFzmOmg6XRpeJpVlQuEhwJ2ojSm S2P7patD9K8Z6Lsby7cp/fCM+t8UYavb2X1rPQpA72wFs7TSLR/r9s//+XgJU60APXwU 0LPuJuKviv6kkPJW5QCUC7csOXQh/t+koHcvvJx9LXGhT4DWY9A7BKav1EwHUIC00rym oaAA== X-Gm-Message-State: AOAM533mVScKdij8Pf4Qy5PB5qngPmrHGwextFT4O7+iLUZ9pGE0kJHV FzVXK/jj+s4362G6z25kb0YAkq6BIBo= X-Google-Smtp-Source: ABdhPJxX6BRDdy4ZyOY8+rjRvoqTSJqQcmHI/kQkbIuP5CQbnYbqbU0d+IYiqe46f1wPr0T/FcNNGg== X-Received: by 2002:a17:90b:1b52:: with SMTP id nv18mr591608pjb.43.1640042298588; Mon, 20 Dec 2021 15:18:18 -0800 (PST) Received: from gnu-tgl-3.localdomain ([172.58.35.133]) by smtp.gmail.com with ESMTPSA id on2sm434271pjb.19.2021.12.20.15.18.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Dec 2021 15:18:18 -0800 (PST) Received: from gnu-tgl-3.. (localhost [IPv6:::1]) by gnu-tgl-3.localdomain (Postfix) with ESMTP id 1D43DC0722; Mon, 20 Dec 2021 15:18:17 -0800 (PST) To: libc-alpha@sourceware.org Subject: [PATCH 2/2] math: Add X_TLOSSf [BZ #28713] Date: Mon, 20 Dec 2021 15:18:17 -0800 Message-Id: <20211220231817.4051571-2-hjl.tools@gmail.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211220231817.4051571-1-hjl.tools@gmail.com> References: <20211220231817.4051571-1-hjl.tools@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-3029.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: "H.J. Lu via Libc-alpha" From: "H.J. Lu" Reply-To: "H.J. Lu" Cc: Joseph Myers Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" Change X_TLOSS to the hexadecimal notation and add X_TLOSSf to define the float verion of X_TLOSS to fix FAIL: math/test-float-j0 FAIL: math/test-float-jn FAIL: math/test-float-y0 FAIL: math/test-float-y1 FAIL: math/test-float-yn FAIL: math/test-float32-j0 FAIL: math/test-float32-jn FAIL: math/test-float32-y0 FAIL: math/test-float32-y1 FAIL: math/test-float32-yn when compiling with GCC 12. --- math/math-svid-compat.h | 3 ++- math/w_j0f_compat.c | 4 ++-- math/w_j1f_compat.c | 2 +- math/w_jnf_compat.c | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/math/math-svid-compat.h b/math/math-svid-compat.h index 5c18cb1b03..61d22ce461 100644 --- a/math/math-svid-compat.h +++ b/math/math-svid-compat.h @@ -48,7 +48,8 @@ struct exception extern int matherr (struct exception *__exc); extern int __matherr (struct exception *__exc); -#define X_TLOSS 1.41484755040568800000e+16 +#define X_TLOSS 0x1.921fb54442d180000000p+53 +#define X_TLOSSf 0x1.921fb6p+53 /* Types of exceptions in the `type' field. */ #define DOMAIN 1 diff --git a/math/w_j0f_compat.c b/math/w_j0f_compat.c index d375f3bfb0..7e8be846cb 100644 --- a/math/w_j0f_compat.c +++ b/math/w_j0f_compat.c @@ -27,7 +27,7 @@ float __j0f (float x) { - if (__builtin_expect (isgreater (fabsf (x), (float) X_TLOSS), 0) + if (__builtin_expect (isgreater (fabsf (x), X_TLOSSf), 0) && _LIB_VERSION != _IEEE_ && _LIB_VERSION != _POSIX_) /* j0(|x|>X_TLOSS) */ return __kernel_standard_f (x, x, 134); @@ -42,7 +42,7 @@ float __y0f (float x) { if (__builtin_expect (islessequal (x, 0.0f) - || isgreater (x, (float) X_TLOSS), 0) + || isgreater (x, X_TLOSSf), 0) && _LIB_VERSION != _IEEE_) { if (x < 0.0f) diff --git a/math/w_j1f_compat.c b/math/w_j1f_compat.c index 81e56b771e..471dd93fdd 100644 --- a/math/w_j1f_compat.c +++ b/math/w_j1f_compat.c @@ -42,7 +42,7 @@ float __y1f (float x) { if (__builtin_expect (islessequal (x, 0.0f) - || isgreater (x, (float) X_TLOSS), 0) + || isgreater (x, X_TLOSSf), 0) && _LIB_VERSION != _IEEE_) { if (x < 0.0f) diff --git a/math/w_jnf_compat.c b/math/w_jnf_compat.c index 296e631566..80af01385a 100644 --- a/math/w_jnf_compat.c +++ b/math/w_jnf_compat.c @@ -27,7 +27,7 @@ float __jnf (int n, float x) { - if (__builtin_expect (isgreater (fabsf (x), (float) X_TLOSS), 0) + if (__builtin_expect (isgreater (fabsf (x), X_TLOSSf), 0) && _LIB_VERSION != _IEEE_ && _LIB_VERSION != _POSIX_) /* jn(n,|x|>X_TLOSS) */ return __kernel_standard_f (n, x, 138); @@ -42,7 +42,7 @@ float __ynf (int n, float x) { if (__builtin_expect (islessequal (x, 0.0f) - || isgreater (x, (float) X_TLOSS), 0) + || isgreater (x, X_TLOSSf), 0) && _LIB_VERSION != _IEEE_) { if (x < 0.0f)