From patchwork Wed Dec 4 16:37:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 847299 Delivered-To: patch@linaro.org Received: by 2002:a5d:434d:0:b0:385:e875:8a9e with SMTP id u13csp424052wrr; Wed, 4 Dec 2024 08:45:14 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWqDzOixG2ViNk4VN/LmUH4KfN8Jm+uY2cCdZdb9oN6ceT6T5C92RuxfBb4K5a6M88k7rL5Ag==@linaro.org X-Google-Smtp-Source: AGHT+IG0ZrTmPX42sk4MJ4fe2OPHl/F1bXQllVhSWr5qbsHADHegAhHwmdXn8mSLj2T0bF50ryUf X-Received: by 2002:a05:6122:32d2:b0:50d:3ec1:154b with SMTP id 71dfb90a1353d-515bf2a444dmr10735522e0c.3.1733330712167; Wed, 04 Dec 2024 08:45:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1733330712; cv=pass; d=google.com; s=arc-20240605; b=UNJUfTkzayONKFW5rctmXmfLSTEApA5JXa9YIZD/nmnS4jxEltdujTkU9RFiaVffAE M8LgoIz1MyTaGMhR/mIf6astNVpsk9oSYW5r2lYthUvnZjmkA/8o291l2wtptSbAsYjb XIv/ufH3zwDCZicnXUSVGgF7XtGUYOJ5tcfJKaza5r85qo0GzPoH7FQeFL2iRogyjDb+ eVK28TlsRfkAGJvuIM4qGmsjtIiys0v3uUtVJloaFBMFdVWnj1krMOo5vpY4zZ4okcjf 77TIS8yerjFKBIjRYYkJ2j0NFN9wG8/VWVzVzSZIgqVlZT5Rw64i57LqQ3UAVffuzB3U TZlw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:arc-filter:dmarc-filter:delivered-to :dkim-filter; bh=mgmZFwsck4ceL/UY4BIegEAwcpMJpqfR0g6cQNtwP9k=; fh=CmGDM+TcKDkWttUBbuoeyeCWXo3i0fQaJViLknsVw4o=; b=EbZVLTVK/acqu03gXaa4PQGyhx10+0ziMyQzPiW291H6yDVFmkGw9CpanL1ep5LB/5 Vewjp0T965QR5KyXO0TFs2OQzE5tyTO2A4fzDV++WPsRaIlBCtqhozq4s/rWpk8SjFIh CsPhQVZW5R4ukykaRlDXO0VAWFrAvh5nV2ezMoJfXvaXTQPy2zwJlzVnKrTz2BtF0fAW jY//JJEC4uQcxTbYEW1UgEX+p4P49PkCk5ICNqQ6KFHM6CIRJUiHR5b8dn1CbW4iMmsX Snp/qDpez+rwrtwunymV7wRS4PClwUo6GBhNmdbFaDyUR+lHc5qfRLTNmYktTTymBI2S JYSQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=C6zarNSr; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id 71dfb90a1353d-515d60c4af1si657347e0c.175.2024.12.04.08.45.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Dec 2024 08:45:12 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=C6zarNSr; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AE0A33858C48 for ; Wed, 4 Dec 2024 16:45:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AE0A33858C48 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=C6zarNSr X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by sourceware.org (Postfix) with ESMTPS id BF2C63858C51 for ; Wed, 4 Dec 2024 16:40:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BF2C63858C51 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org BF2C63858C51 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::635 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1733330451; cv=none; b=bpPsb6rIP/VsGkCZRKkyAMUpvZqS7smDaOLqybfjAPvNcQ7VNEL/GrtBpw19FYGdtQhZ/F8OvvG2D4vuEwuqasgDt0hp3qEX52POUbgT6K7yyFk8K2WP0bPXWkpWX1cGdyult0HHclKk3OcbEnzE4XO9TXEL/DYw+93kDMUVUx0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1733330451; c=relaxed/simple; bh=9LEQLKk77Ku5R1lAu+ZhPMl+XwU4/TlrKIf4FaOvAU4=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Gs7TXL3XCDXL2pOcP0gAO7B+m3p2KIa8QaEo5HZMhHcD7xyk/RjQRLTW+kYzr/3Pxf1spyPBkz6BfbnUoNaJFDd3kUxPvq6lCb6uqQ3YK8ztXGB+753IWxLjWXZwotyTFV+KOY0G1FR5rpvz1vY7QWv8qc+XUNgy7QN/7HWgW2s= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-215909152c5so37606505ad.3 for ; Wed, 04 Dec 2024 08:40:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733330420; x=1733935220; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mgmZFwsck4ceL/UY4BIegEAwcpMJpqfR0g6cQNtwP9k=; b=C6zarNSr5e0KqJBZlqz8+So05FqMowHBtf6vxlovH5JvEsvL1jAtLmVMMIn3ieBk10 OlMGr+V/MxPcQBp5S0NxTbRR1UHe9KeepkabiMWFDUcttnh2ypKcczs+PIXENHeAIXIO zljKplqZfT1igFIwU+102L4PYGLKvMZG6igO+M/61sbWxhct+c+rPSqyNMWFrWTpd0cQ p87ugBSnhXluYqC0ak+VjGLhHIM3esFhq/76n93UPw6YuOlvmtlaqLNGP3+fs7OdpfB+ bcC/uXbS99PCkv/otmEeVSHzmxnMjRtdVVZvVRX00tZ9a51Y0rYikNEoO92ybGqyERmK /8qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733330420; x=1733935220; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mgmZFwsck4ceL/UY4BIegEAwcpMJpqfR0g6cQNtwP9k=; b=aZnaIwHMYBRKQ5OtMkdYfelJYmW3JcXH/TOt8uLKq3RTtDHRiWBYWRgpJPk4g0KvA3 X0J1X8eyJ9YPN2RzsjAAEWNmAGJ5R0g493mefecHyssOGhCv+ud2tXp85zVtBpo/BjwJ BHJOeKf3U2BuVisTsdLgmZWrjugNsBOwS5Qtj61hGtcbN/NYwCL75XSHAMJVHcgPFSaO L4elswo+OAWK3ojmPOMKhTi1LSw0lvnSY/TQ2kDNrRtqhcH5d831ta7Ds6A8t6XRJBtr ttRg14xTJYvHABYOElzmO09RPKWBVSeWZr2gNYLanBRMOZFJdsXRn9bxJSAe4drTb5MR TB+Q== X-Gm-Message-State: AOJu0Yz1I2mSBgzobDwbpEtJN+2I/O0QHQEDgQBLwj26e4QGRRZvHLni BMh91pyGMuMAAIEmem4vCXqeBPr9LUI48kWwcao0tTfmHAw0apv3hn1EqONYuyrJmUME2omNBR9 F X-Gm-Gg: ASbGncvTFJAY7EYT3ipODFzZT4S6ZS73c8o4c424pSMCUrBFch2x1h5Jy7n3f6efHs+ bHPvXqE54EYK37cPkMe7tTwsuXvpb2fyrg4BRP/24Wzzx1q7cHTf5QSrtENT1m7GG0nXcCfzl4S xPKCmuLueye4asX/HkPwtrRQAG9O9DmyPD/YzXxBI8cV98RZX0MYLaffJF/EwUP9HefKZ2/k15V Q8so5GGosa8fKNvtGdrVk54rGuO82tHkAXbRFrOibtPpWgBjupG0WWR+9uF0Q== X-Received: by 2002:a17:902:d4c2:b0:215:b468:1a48 with SMTP id d9443c01a7336-215bd2001f9mr94665555ad.26.1733330420438; Wed, 04 Dec 2024 08:40:20 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c2:2d1:40a3:b587:af7c:a5cd]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21521967714sm114029225ad.140.2024.12.04.08.40.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Dec 2024 08:40:20 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: DJ Delorie , Joseph Myers Subject: [PATCH v2 13/25] math: Fix the expected atanf (inf) results Date: Wed, 4 Dec 2024 13:37:48 -0300 Message-ID: <20241204163949.1408676-14-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241204163949.1408676-1-adhemerval.zanella@linaro.org> References: <20241204163949.1408676-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patch=linaro.org@sourceware.org The M_PI_2 (lit_pi_2_d) constant is not the expected value for atanf on non-default rounding modes. Instead use the autogenerated value. --- math/auto-libm-test-in | 2 ++ math/auto-libm-test-out-atan | 50 ++++++++++++++++++++++++++++++++++++ math/libm-test-atan.inc | 2 -- 3 files changed, 52 insertions(+), 2 deletions(-) diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in index b570e88e78..83f125b313 100644 --- a/math/auto-libm-test-in +++ b/math/auto-libm-test-in @@ -394,6 +394,8 @@ asinh -min_subnorm asinh max asinh -max +atan inf +atan -inf atan 0 atan -0 atan max diff --git a/math/auto-libm-test-out-atan b/math/auto-libm-test-out-atan index 334894a90a..cc41d61239 100644 --- a/math/auto-libm-test-out-atan +++ b/math/auto-libm-test-out-atan @@ -1,3 +1,53 @@ +atan inf += atan downward binary32 plus_infty : 0x1.921fb4p+0 : inexact-ok += atan tonearest binary32 plus_infty : 0x1.921fb6p+0 : inexact-ok += atan towardzero binary32 plus_infty : 0x1.921fb4p+0 : inexact-ok += atan upward binary32 plus_infty : 0x1.921fb6p+0 : inexact-ok += atan downward binary64 plus_infty : 0x1.921fb54442d18p+0 : inexact-ok += atan tonearest binary64 plus_infty : 0x1.921fb54442d18p+0 : inexact-ok += atan towardzero binary64 plus_infty : 0x1.921fb54442d18p+0 : inexact-ok += atan upward binary64 plus_infty : 0x1.921fb54442d19p+0 : inexact-ok += atan downward intel96 plus_infty : 0x1.921fb54442d18468p+0 : inexact-ok += atan tonearest intel96 plus_infty : 0x1.921fb54442d1846ap+0 : inexact-ok += atan towardzero intel96 plus_infty : 0x1.921fb54442d18468p+0 : inexact-ok += atan upward intel96 plus_infty : 0x1.921fb54442d1846ap+0 : inexact-ok += atan downward m68k96 plus_infty : 0x1.921fb54442d18468p+0 : inexact-ok += atan tonearest m68k96 plus_infty : 0x1.921fb54442d1846ap+0 : inexact-ok += atan towardzero m68k96 plus_infty : 0x1.921fb54442d18468p+0 : inexact-ok += atan upward m68k96 plus_infty : 0x1.921fb54442d1846ap+0 : inexact-ok += atan downward binary128 plus_infty : 0x1.921fb54442d18469898cc51701b8p+0 : inexact-ok += atan tonearest binary128 plus_infty : 0x1.921fb54442d18469898cc51701b8p+0 : inexact-ok += atan towardzero binary128 plus_infty : 0x1.921fb54442d18469898cc51701b8p+0 : inexact-ok += atan upward binary128 plus_infty : 0x1.921fb54442d18469898cc51701b9p+0 : inexact-ok += atan downward ibm128 plus_infty : 0x1.921fb54442d18469898cc517018p+0 : inexact-ok += atan tonearest ibm128 plus_infty : 0x1.921fb54442d18469898cc517018p+0 : inexact-ok += atan towardzero ibm128 plus_infty : 0x1.921fb54442d18469898cc517018p+0 : inexact-ok += atan upward ibm128 plus_infty : 0x1.921fb54442d18469898cc51702p+0 : inexact-ok +atan -inf += atan downward binary32 minus_infty : -0x1.921fb6p+0 : inexact-ok += atan tonearest binary32 minus_infty : -0x1.921fb6p+0 : inexact-ok += atan towardzero binary32 minus_infty : -0x1.921fb4p+0 : inexact-ok += atan upward binary32 minus_infty : -0x1.921fb4p+0 : inexact-ok += atan downward binary64 minus_infty : -0x1.921fb54442d19p+0 : inexact-ok += atan tonearest binary64 minus_infty : -0x1.921fb54442d18p+0 : inexact-ok += atan towardzero binary64 minus_infty : -0x1.921fb54442d18p+0 : inexact-ok += atan upward binary64 minus_infty : -0x1.921fb54442d18p+0 : inexact-ok += atan downward intel96 minus_infty : -0x1.921fb54442d1846ap+0 : inexact-ok += atan tonearest intel96 minus_infty : -0x1.921fb54442d1846ap+0 : inexact-ok += atan towardzero intel96 minus_infty : -0x1.921fb54442d18468p+0 : inexact-ok += atan upward intel96 minus_infty : -0x1.921fb54442d18468p+0 : inexact-ok += atan downward m68k96 minus_infty : -0x1.921fb54442d1846ap+0 : inexact-ok += atan tonearest m68k96 minus_infty : -0x1.921fb54442d1846ap+0 : inexact-ok += atan towardzero m68k96 minus_infty : -0x1.921fb54442d18468p+0 : inexact-ok += atan upward m68k96 minus_infty : -0x1.921fb54442d18468p+0 : inexact-ok += atan downward binary128 minus_infty : -0x1.921fb54442d18469898cc51701b9p+0 : inexact-ok += atan tonearest binary128 minus_infty : -0x1.921fb54442d18469898cc51701b8p+0 : inexact-ok += atan towardzero binary128 minus_infty : -0x1.921fb54442d18469898cc51701b8p+0 : inexact-ok += atan upward binary128 minus_infty : -0x1.921fb54442d18469898cc51701b8p+0 : inexact-ok += atan downward ibm128 minus_infty : -0x1.921fb54442d18469898cc51702p+0 : inexact-ok += atan tonearest ibm128 minus_infty : -0x1.921fb54442d18469898cc517018p+0 : inexact-ok += atan towardzero ibm128 minus_infty : -0x1.921fb54442d18469898cc517018p+0 : inexact-ok += atan upward ibm128 minus_infty : -0x1.921fb54442d18469898cc517018p+0 : inexact-ok atan 0 = atan downward binary32 0x0p+0 : 0x0p+0 : inexact-ok = atan tonearest binary32 0x0p+0 : 0x0p+0 : inexact-ok diff --git a/math/libm-test-atan.inc b/math/libm-test-atan.inc index 3581d3b5ee..19e441556b 100644 --- a/math/libm-test-atan.inc +++ b/math/libm-test-atan.inc @@ -20,8 +20,6 @@ static const struct test_f_f_data atan_test_data[] = { - TEST_f_f (atan, plus_infty, lit_pi_2_d, ERRNO_UNCHANGED), - TEST_f_f (atan, minus_infty, -lit_pi_2_d, ERRNO_UNCHANGED), TEST_f_f (atan, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), TEST_f_f (atan, -qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), TEST_f_f (atan, snan_value, qnan_value, INVALID_EXCEPTION),