From patchwork Fri Nov 29 13:17:44 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: 846124 Delivered-To: patch@linaro.org Received: by 2002:adf:f2c4:0:b0:382:43a8:7b94 with SMTP id d4csp857273wrp; Fri, 29 Nov 2024 05:25:33 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUaxQ5oA/Si3/5ye+SRGmOMDmgB2ZnS9FW3nnzsN7u0XUuLHiCjOdeoR5vNk8AjEz6+1CTX4A==@linaro.org X-Google-Smtp-Source: AGHT+IEEpzzlgj1Q3eu0/kT0zGTOpTwcpMdbFGh7pHyD7nyqZT+Hwoz3WA9mMPBLmg4Xq81PlAvF X-Received: by 2002:a05:622a:1809:b0:466:9a81:22a8 with SMTP id d75a77b69052e-466b3554a9amr179923711cf.10.1732886733683; Fri, 29 Nov 2024 05:25:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1732886733; cv=pass; d=google.com; s=arc-20240605; b=XyzRlbTshVvHH+mQ1ZjQjt6GSyVJMVxeLEhDELJq53NHpBOwEq06k2+/PcMTOU8gaS b/H3nETkeb4uVbHpPM9KfJ8xQG9NF6sPx0djsmnAe41kHy9GCCUeNZEDvczdmNeGAMDq 9EOxdSY8UTUPxMtCGmvjeceglxge0zwDBlOorGzCryuuo+8sHMTbLM9hwgDm3k4h4F+J 2X2JQ6yy+oQHc9n7YTskRZ51hUuTgPF2DwVgCRW0EI9AXGTJrU+zte5LNCkP9hl6dRyW hxDKu06Ypeun89x2NdGasc49f1CVftMNqYLyTt6QhaCrbOd2lzU0l/pNz+GDu90rt8+P rUpg== 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:dkim-filter:arc-filter:dmarc-filter :delivered-to; bh=/myq/tIVx4sIKkefcqC2ZLvXrRbv8dcMxJKXWVEU8vA=; fh=sFucH9KQW8Y8eMoQXaNIgycLDa7roysdjTHpHLIprh4=; b=iVCE0eOhzWcFLd8ehWxZa5SkRLM187u1OxtskDStwoQPzlTUnkOKwdFy/sUo//D4I+ 1qjbS2L132YnxbgSyymvAhoTW0nBF3UOzbVnBsj4ZTdjw8PAROlKN6VJL9VKx3EB3tUk sOgp+WQpTbNA3RIFVkqUML/Q7nmKIeg1eIpJXyALwKltMzzeTO6rrA1JyOSkO+RMa5/R ozgbDX4JUSAaNo4Zig0gM+BLhLMVawKaPcFlXBPolQbQjd8FekYYekVHC4nn99KSC2na EU7f9QCEhwCbI55kEjYbkdR7C+A4L/3G3tJENle4rmvLJ0DU/LMokiTof6YANIfWWImc QeVg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=u1sTrAeH; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c 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. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id d75a77b69052e-466c4055562si41911221cf.70.2024.11.29.05.25.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Nov 2024 05:25:33 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=u1sTrAeH; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c 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 1CCAD3858CD1 for ; Fri, 29 Nov 2024 13:25:33 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by sourceware.org (Postfix) with ESMTPS id 8F2AF3858C54 for ; Fri, 29 Nov 2024 13:21:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8F2AF3858C54 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 8F2AF3858C54 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::641 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1732886495; cv=none; b=mMGnqE+JIxpczFo8ROkui1jnqJ69Y8PcGUAK982hus79lv7qcbRpPk6AEHhc44wdhxTya3IR1SqzZWsX/JWqgDb6SRqUSniMONFEf2RjhHn3SJPP0u8v1/H3kOu8Txrt8eR+X/NIyjRpTCQxJQKCjrn0AYJDpDUQK8gHIuaTdxs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1732886495; c=relaxed/simple; bh=/uckr1REA6s9eqiOzXyK0iZy/xr+sPCfohJhJTKjyAw=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=BoZyybG79+rne0nPgyEgBEkUuIfC6j+opueG8xqVJ3IWRXd16DTmmWfJzhG0XdDQVdn6C3Ct3UfAafA/21CCyYXZnMt4mHJ2ciqr4oSRZfihpgfOSr7WBDNLcK5Athoqc1YtxfhHihNbz2/DXsm/6PQuD1t3ysGAEjU6R4AaUXQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8F2AF3858C54 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=u1sTrAeH Received: by mail-pl1-x641.google.com with SMTP id d9443c01a7336-215348d1977so9970275ad.3 for ; Fri, 29 Nov 2024 05:21:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732886494; x=1733491294; 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=/myq/tIVx4sIKkefcqC2ZLvXrRbv8dcMxJKXWVEU8vA=; b=u1sTrAeHG+eVCrPZFjWBjMbCK/kPtgo0FcjYgSS59UC6hmuEZImObqwRg9cfDPsWD4 j1Onhh1veR5Yx8vGrwsJ6nZFGp++ceJiYGN9fgj3ana2x9CzHgG3oKX/dZQt2vU0kwBP yxeb1t/VNaxum/UMqH02Yv4gBM+HKGCR9nUYcqJ+Uy30M+FWZMw/7WlLDE/N7VapVvbK OQiuD4BvhOZLN381ApG0VxFlq3dznPesd0OY+ssKDMsnEbG3EvY+hN9W+OFd26iBnqhq MrJ97MO6q269bhWpobRW/r6BWtOyZhBdgs9ke+7eA1TtVyRk/LQ323d/5mSySUmI/qcM ce2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732886494; x=1733491294; 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=/myq/tIVx4sIKkefcqC2ZLvXrRbv8dcMxJKXWVEU8vA=; b=IrBcz/TmUWbv55Oc7SsRVkYRY8QtXtb3q+j6/rdxVtVtoaHtNmRIulMf6QMCQ+5v7t OmQBfBloO9B7xw0vXtICpyGJdDqJWdR+Ofgq74u8UZbtCxcy7i2ZBCkxFkdg4W1UI3s3 ZL4AgfUqB8keFVv0iXSDC5WoAg1WpiuhfD2PwOki8UYaFUpqljhsv64TQK1fJhxM3X7X CMacD/nicCSiz9WoZylqyX3jjtxunE711cKR9Gb2JyKyPBU+vD6jzf7XE54FoNx2nvbV wQ2MTcNkQqZlemJItiF91DSe+l6htU9ZrBkRJruvPYR7M3Csvm2P2Dv5sZcXilL94HKb IvdA== X-Gm-Message-State: AOJu0YwY8dyJGLemxoUZTThmOlMu/b2jyEQcWb6YVwcowJELN6FCk7gr mXDiNak5dDSfRhPk0/5elV48iKB29+0THZFI0cWVTYya5wkdgLTRM6iSkbLSsSqpmxYziTSQ22R euE+nYUL5 X-Gm-Gg: ASbGnctEs6UeoXaCvYCy9bRH2ws3Y13Y4xs0rcXFVDfE3BvmszwtwZW0HDTyMxMSA2J eSfz2Qnynj34yL02u8XHpS/Z5Km8RbvjLaOSCuc69Eg9rjGEls+BFkeg0rxKt0LsvsHZ//DJR6Q C5D/5ch33K5GRHibImTietDdeMeVNo1bWnLe7vbNK2GKhs/v+2jjH5j7bsJq1zUh+C6r+JHcalx wKv0oT9zSWkI5SdsaqRjfEi8qLiWVLWPuH0VYIaTu9W4F+sXfTs4J9s2LxXK1A= X-Received: by 2002:a17:902:e881:b0:20c:c086:4998 with SMTP id d9443c01a7336-21501f622a5mr97139225ad.55.1732886493783; Fri, 29 Nov 2024 05:21:33 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c1:68c8:3143:6603:ad16:715e]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2153d5f66d5sm14472255ad.201.2024.11.29.05.21.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Nov 2024 05:21:33 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: DJ Delorie , Alexei Sibidanov , Paul Zimmermann Subject: [PATCH 20/23] math: Use atanhf from CORE-MATH Date: Fri, 29 Nov 2024 10:17:44 -0300 Message-ID: <20241129132032.476978-21-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241129132032.476978-1-adhemerval.zanella@linaro.org> References: <20241129132032.476978-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 CORE-MATH implementation is correctly rounded (for any rounding mode) and shows slight better performance to the generic atanhf. The code was adapted to glibc style and to use the definition of math_config.h (to handle errno, overflow, and underflow). Benchtest on x64_64 (Ryzen 9 5900X, gcc 14.2.1), aarch64 (Neoverse-N1, gcc 13.3.1), and powerpc (POWER10, gcc 13.2.1): Latency master patched improvement x86_64 59.4930 45.8568 22.92% x86_64v2 59.5705 45.5804 23.48% x86_64v3 53.1838 37.7155 29.08% i686 169.354 133.5940 21.12% aarch64 (Neoverse) 26.0781 16.9829 34.88% power10 15.6591 10.7623 31.27% reciprocal-throughput master patched improvement x86_64 23.5903 18.5766 21.25% x86_64v2 22.6489 18.2683 19.34% x86_64v3 19.0401 13.9474 26.75% i686 97.6034 107.3260 -9.96% aarch64 (Neoverse) 15.3664 9.57846 37.67% power10 6.8877 4.6242 32.86% Signed-off-by: Alexei Sibidanov Signed-off-by: Paul Zimmermann Signed-off-by: Adhemerval Zanella --- SHARED-FILES | 4 + sysdeps/aarch64/libm-test-ulps | 4 - sysdeps/alpha/fpu/libm-test-ulps | 4 - sysdeps/arc/fpu/libm-test-ulps | 4 - sysdeps/arc/nofpu/libm-test-ulps | 1 - sysdeps/arm/libm-test-ulps | 4 - sysdeps/csky/fpu/libm-test-ulps | 4 - sysdeps/csky/nofpu/libm-test-ulps | 4 - sysdeps/hppa/fpu/libm-test-ulps | 4 - sysdeps/i386/fpu/e_atanhf.S | 110 --------- sysdeps/i386/fpu/libm-test-ulps | 3 - .../i386/i686/fpu/multiarch/libm-test-ulps | 3 - sysdeps/ieee754/flt-32/e_atanhf.c | 210 +++++++++++++----- sysdeps/loongarch/lp64/libm-test-ulps | 4 - sysdeps/m68k/coldfire/fpu/libm-test-ulps | 1 - sysdeps/microblaze/libm-test-ulps | 1 - sysdeps/mips/mips32/libm-test-ulps | 4 - sysdeps/mips/mips64/libm-test-ulps | 4 - sysdeps/or1k/fpu/libm-test-ulps | 4 - sysdeps/or1k/nofpu/libm-test-ulps | 4 - sysdeps/powerpc/fpu/libm-test-ulps | 4 - sysdeps/powerpc/nofpu/libm-test-ulps | 4 - sysdeps/riscv/nofpu/libm-test-ulps | 4 - sysdeps/riscv/rvd/libm-test-ulps | 4 - sysdeps/s390/fpu/libm-test-ulps | 4 - sysdeps/sh/libm-test-ulps | 2 - sysdeps/sparc/fpu/libm-test-ulps | 4 - sysdeps/x86_64/fpu/libm-test-ulps | 4 - 28 files changed, 159 insertions(+), 252 deletions(-) delete mode 100644 sysdeps/i386/fpu/e_atanhf.S diff --git a/SHARED-FILES b/SHARED-FILES index 99f8554393..d32c837b46 100644 --- a/SHARED-FILES +++ b/SHARED-FILES @@ -318,3 +318,7 @@ sysdeps/ieee754/flt-32/e_atan2f.c: (src/binary32/atan2/atan2f.c in CORE-MATH) - The code was adapted to use glibc code style and internal functions to handle errno, overflow, and underflow. +sysdeps/ieee754/flt-32/e_atanhf.c: + (src/binary32/atanh/atanhf.c in CORE-MATH) + - The code was adapted to use glibc code style and internal + functions to handle errno, overflow, and underflow. diff --git a/sysdeps/aarch64/libm-test-ulps b/sysdeps/aarch64/libm-test-ulps index f48a4d2e76..0c686221d2 100644 --- a/sysdeps/aarch64/libm-test-ulps +++ b/sysdeps/aarch64/libm-test-ulps @@ -146,7 +146,6 @@ ldouble: 2 Function: "atanh": double: 2 -float: 2 ldouble: 4 Function: "atanh_advsimd": @@ -155,7 +154,6 @@ float: 1 Function: "atanh_downward": double: 3 -float: 3 ldouble: 4 Function: "atanh_sve": @@ -164,12 +162,10 @@ float: 1 Function: "atanh_towardzero": double: 2 -float: 2 ldouble: 2 Function: "atanh_upward": double: 3 -float: 3 ldouble: 4 Function: "cabs": diff --git a/sysdeps/alpha/fpu/libm-test-ulps b/sysdeps/alpha/fpu/libm-test-ulps index 860da75a86..e108b2543c 100644 --- a/sysdeps/alpha/fpu/libm-test-ulps +++ b/sysdeps/alpha/fpu/libm-test-ulps @@ -98,22 +98,18 @@ ldouble: 2 Function: "atanh": double: 2 -float: 2 ldouble: 4 Function: "atanh_downward": double: 3 -float: 3 ldouble: 4 Function: "atanh_towardzero": double: 2 -float: 2 ldouble: 2 Function: "atanh_upward": double: 3 -float: 3 ldouble: 4 Function: "cabs": diff --git a/sysdeps/arc/fpu/libm-test-ulps b/sysdeps/arc/fpu/libm-test-ulps index 7b5208e2f8..a0d6e89b49 100644 --- a/sysdeps/arc/fpu/libm-test-ulps +++ b/sysdeps/arc/fpu/libm-test-ulps @@ -75,19 +75,15 @@ double: 2 Function: "atanh": double: 2 -float: 2 Function: "atanh_downward": double: 3 -float: 3 Function: "atanh_towardzero": double: 2 -float: 2 Function: "atanh_upward": double: 3 -float: 3 Function: "cabs": double: 1 diff --git a/sysdeps/arc/nofpu/libm-test-ulps b/sysdeps/arc/nofpu/libm-test-ulps index a46825b0c1..1a6b37a728 100644 --- a/sysdeps/arc/nofpu/libm-test-ulps +++ b/sysdeps/arc/nofpu/libm-test-ulps @@ -20,7 +20,6 @@ Function: "atan2": Function: "atanh": double: 2 -float: 2 Function: "cabs": double: 1 diff --git a/sysdeps/arm/libm-test-ulps b/sysdeps/arm/libm-test-ulps index 5c1046b9f5..ea2f3a22b0 100644 --- a/sysdeps/arm/libm-test-ulps +++ b/sysdeps/arm/libm-test-ulps @@ -74,19 +74,15 @@ double: 1 Function: "atanh": double: 2 -float: 2 Function: "atanh_downward": double: 3 -float: 3 Function: "atanh_towardzero": double: 2 -float: 2 Function: "atanh_upward": double: 3 -float: 3 Function: "cabs": double: 1 diff --git a/sysdeps/csky/fpu/libm-test-ulps b/sysdeps/csky/fpu/libm-test-ulps index 0a18d51742..f8ab682f84 100644 --- a/sysdeps/csky/fpu/libm-test-ulps +++ b/sysdeps/csky/fpu/libm-test-ulps @@ -71,19 +71,15 @@ double: 1 Function: "atanh": double: 2 -float: 2 Function: "atanh_downward": double: 3 -float: 3 Function: "atanh_towardzero": double: 2 -float: 2 Function: "atanh_upward": double: 3 -float: 3 Function: "cabs": double: 1 diff --git a/sysdeps/csky/nofpu/libm-test-ulps b/sysdeps/csky/nofpu/libm-test-ulps index 55be0213ec..f8b888ea9d 100644 --- a/sysdeps/csky/nofpu/libm-test-ulps +++ b/sysdeps/csky/nofpu/libm-test-ulps @@ -71,19 +71,15 @@ double: 1 Function: "atanh": double: 2 -float: 2 Function: "atanh_downward": double: 3 -float: 3 Function: "atanh_towardzero": double: 2 -float: 2 Function: "atanh_upward": double: 3 -float: 3 Function: "cabs": double: 1 diff --git a/sysdeps/hppa/fpu/libm-test-ulps b/sysdeps/hppa/fpu/libm-test-ulps index c92f46cc15..c8d4423ae0 100644 --- a/sysdeps/hppa/fpu/libm-test-ulps +++ b/sysdeps/hppa/fpu/libm-test-ulps @@ -74,19 +74,15 @@ double: 1 Function: "atanh": double: 2 -float: 2 Function: "atanh_downward": double: 3 -float: 3 Function: "atanh_towardzero": double: 2 -float: 2 Function: "atanh_upward": double: 3 -float: 3 Function: "cabs": double: 1 diff --git a/sysdeps/i386/fpu/e_atanhf.S b/sysdeps/i386/fpu/e_atanhf.S deleted file mode 100644 index c94dc7ba51..0000000000 --- a/sysdeps/i386/fpu/e_atanhf.S +++ /dev/null @@ -1,110 +0,0 @@ -/* ix87 specific implementation of arctanh function. - Copyright (C) 1996-2024 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include - - .section .rodata - - .align ALIGNARG(4) - .type half,@object -half: .double 0.5 - ASM_SIZE_DIRECTIVE(half) - .type one,@object -one: .double 1.0 - ASM_SIZE_DIRECTIVE(one) - .type limit,@object -limit: .double 0.29 - ASM_SIZE_DIRECTIVE(limit) - .align ALIGNARG(4) - .type ln2_2,@object -ln2_2: .quad 0xb17217f7d1cf79ac /* 0.3465735902799726547086160 */ - .short 0x3ffd - ASM_SIZE_DIRECTIVE(ln2_2) - -DEFINE_FLT_MIN - -#ifdef PIC -#define MO(op) op##@GOTOFF(%edx) -#else -#define MO(op) op -#endif - - .text -ENTRY(__ieee754_atanhf) - movl 4(%esp), %ecx - - movl %ecx, %eax - andl $0x7fffffff, %eax - cmpl $0x7f800000, %eax - ja 5f - -#ifdef PIC - LOAD_PIC_REG (dx) -#endif - - andl $0x80000000, %ecx // ECX == 0 iff X >= 0 - - fldt MO(ln2_2) // 0.5*ln2 - xorl %ecx, 4(%esp) - flds 4(%esp) // |x| : 0.5*ln2 - fcoml MO(half) // |x| : 0.5*ln2 - fld %st(0) // |x| : |x| : 0.5*ln2 - fnstsw // |x| : |x| : 0.5*ln2 - sahf - jae 2f - fadd %st, %st(1) // |x| : 2*|x| : 0.5*ln2 - fld %st // |x| : |x| : 2*|x| : 0.5*ln2 - fsubrl MO(one) // 1-|x| : |x| : 2*|x| : 0.5*ln2 - fxch // |x| : 1-|x| : 2*|x| : 0.5*ln2 - fmul %st(2) // 2*|x|^2 : 1-|x| : 2*|x| : 0.5*ln2 - fdivp // (2*|x|^2)/(1-|x|) : 2*|x| : 0.5*ln2 - faddp // 2*|x|+(2*|x|^2)/(1-|x|) : 0.5*ln2 - fcoml MO(limit) // 2*|x|+(2*|x|^2)/(1-|x|) : 0.5*ln2 - fnstsw // 2*|x|+(2*|x|^2)/(1-|x|) : 0.5*ln2 - sahf - jae 4f - fyl2xp1 // 0.5*ln2*ld(1+2*|x|+(2*|x|^2)/(1-|x|)) - FLT_CHECK_FORCE_UFLOW_NONNEG - jecxz 3f - fchs // 0.5*ln2*ld(1+2*x+(2*x^2)/(1-x)) -3: ret - - .align ALIGNARG(4) -4: faddl MO(one) // 1+2*|x|+(2*|x|^2)/(1-|x|) : 0.5*ln2 - fyl2x // 0.5*ln2*ld(1+2*|x|+(2*|x|^2)/(1-|x|)) - jecxz 3f - fchs // 0.5*ln2*ld(1+2*x+(2*x^2)/(1-x)) -3: ret - - .align ALIGNARG(4) -2: faddl MO(one) // 1+|x| : |x| : 0.5*ln2 - fxch // |x| : 1+|x| : 0.5*ln2 - fsubrl MO(one) // 1-|x| : 1+|x| : 0.5*ln2 - fdivrp // (1+|x|)/(1-|x|) : 0.5*ln2 - fyl2x // 0.5*ln2*ld((1+|x|)/(1-|x|)) - jecxz 3f - fchs // 0.5*ln2*ld((1+x)/(1-x)) -3: ret - - // x == NaN -5: flds 4(%esp) - ret -END(__ieee754_atanhf) -libm_alias_finite (__ieee754_atanhf, __atanhf) diff --git a/sysdeps/i386/fpu/libm-test-ulps b/sysdeps/i386/fpu/libm-test-ulps index b1f5b5f900..f0cc6594af 100644 --- a/sysdeps/i386/fpu/libm-test-ulps +++ b/sysdeps/i386/fpu/libm-test-ulps @@ -126,19 +126,16 @@ ldouble: 3 Function: "atanh_downward": double: 1 -float: 1 float128: 4 ldouble: 4 Function: "atanh_towardzero": double: 1 -float: 1 float128: 2 ldouble: 3 Function: "atanh_upward": double: 1 -float: 1 float128: 4 ldouble: 5 diff --git a/sysdeps/i386/i686/fpu/multiarch/libm-test-ulps b/sysdeps/i386/i686/fpu/multiarch/libm-test-ulps index b651fd4fbf..8a56f383a9 100644 --- a/sysdeps/i386/i686/fpu/multiarch/libm-test-ulps +++ b/sysdeps/i386/i686/fpu/multiarch/libm-test-ulps @@ -126,19 +126,16 @@ ldouble: 3 Function: "atanh_downward": double: 1 -float: 1 float128: 4 ldouble: 4 Function: "atanh_towardzero": double: 1 -float: 1 float128: 2 ldouble: 3 Function: "atanh_upward": double: 1 -float: 1 float128: 4 ldouble: 5 diff --git a/sysdeps/ieee754/flt-32/e_atanhf.c b/sysdeps/ieee754/flt-32/e_atanhf.c index d36eb15160..f6de5281ca 100644 --- a/sysdeps/ieee754/flt-32/e_atanhf.c +++ b/sysdeps/ieee754/flt-32/e_atanhf.c @@ -1,76 +1,176 @@ -/* Copyright (C) 2011-2024 Free Software Foundation, Inc. - This file is part of the GNU C Library. +/* Correctly-rounded inverse hyperbolic tangent function for binary32 value. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. +Copyright (c) 2023-2024 Alexei Sibidanov. - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. +The original version of this file was copied from the CORE-MATH +project (file src/binary32/acosh/acoshf.c, revision bc385c2). - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -/* __ieee754_atanh(x) - Method : - 1.Reduced x to positive by atanh(-x) = -atanh(x) - 2.For x>=0.5 - 1 2x x - atanh(x) = --- * log(1 + -------) = 0.5 * log1p(2 * --------) - 2 1 - x 1 - x +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ - For x<0.5 - atanh(x) = 0.5*log1p(2x+2x*x/(1-x)) - - Special cases: - atanh(x) is NaN if |x| > 1 with signal; - atanh(NaN) is that NaN with no signal; - atanh(+-1) is +-INF with signal. - - */ - -#include -#include #include -#include -#include -#include +#include #include +#include "math_config.h" -static const float huge = 1e30; +static __attribute__((noinline)) float +as_special (float x) +{ + uint32_t ix = asuint (x); + uint32_t ax = ix << 1; + if (ax == 0x7f000000u) /* +-1 */ + return __math_divzerof (ix >> 31); + if (ax > 0xff000000u) + return x + x; /* nan */ + return __math_invalidf (x); +} float __ieee754_atanhf (float x) { - float xa = fabsf (x); - float t; - if (isless (xa, 0.5f)) + /* Calculate atanh(x) using the difference of two logarithms -- atanh(x) = + (ln(1+x) - ln(1-x))/2 */ + static const double tr[] = + { + 0x1.fc07f02p-1, 0x1.f44659ep-1, 0x1.ecc07b3p-1, 0x1.e573ac9p-1, + 0x1.de5d6e4p-1, 0x1.d77b655p-1, 0x1.d0cb58fp-1, 0x1.ca4b305p-1, + 0x1.c3f8f02p-1, 0x1.bdd2b8ap-1, 0x1.b7d6c3ep-1, 0x1.b20364p-1, + 0x1.ac5701bp-1, 0x1.a6d01a7p-1, 0x1.a16d3f9p-1, 0x1.9c2d14fp-1, + 0x1.970e4f8p-1, 0x1.920fb4ap-1, 0x1.8d3018dp-1, 0x1.886e5f1p-1, + 0x1.83c977bp-1, 0x1.7f405fdp-1, 0x1.7ad2209p-1, 0x1.767dce4p-1, + 0x1.724287fp-1, 0x1.6e1f76bp-1, 0x1.6a13cd1p-1, 0x1.661ec6ap-1, + 0x1.623fa77p-1, 0x1.5e75bb9p-1, 0x1.5ac056bp-1, 0x1.571ed3cp-1, + 0x1.5390949p-1, 0x1.5015015p-1, 0x1.4cab887p-1, 0x1.49539e4p-1, + 0x1.460cbc8p-1, 0x1.42d6626p-1, 0x1.3fb014p-1, 0x1.3c995a4p-1, + 0x1.3991c2cp-1, 0x1.3698df4p-1, 0x1.33ae45bp-1, 0x1.30d1901p-1, + 0x1.2e025cp-1, 0x1.2b404adp-1, 0x1.288b013p-1, 0x1.25e2271p-1, + 0x1.2345679p-1, 0x1.20b470cp-1, 0x1.1e2ef3bp-1, 0x1.1bb4a4p-1, + 0x1.1945381p-1, 0x1.16e0689p-1, 0x1.1485f0ep-1, 0x1.12358e7p-1, + 0x1.0fef011p-1, 0x1.0db20a9p-1, 0x1.0b7e6ecp-1, 0x1.0953f39p-1, + 0x1.073260ap-1, 0x1.05197f8p-1, 0x1.03091b5p-1, 0x1.010101p-1 + }; + static const double tl[] = + { + 0x1.fe02a69106789p-9, 0x1.7b91b1155b11bp-7, 0x1.39e87ba1ebd6p-6, + 0x1.b42dd713971bfp-6, 0x1.16536ee637ae1p-5, 0x1.51b073c96183fp-5, + 0x1.8c345da019b21p-5, 0x1.c5e5492abc743p-5, 0x1.fec912fbbeabbp-5, + 0x1.1b72ad33f67ap-4, 0x1.371fc1f6e8f74p-4, 0x1.526e5e5a1b438p-4, + 0x1.6d60fe601d21dp-4, 0x1.87fa06438c911p-4, 0x1.a23bc223ab563p-4, + 0x1.bc28673a58cd6p-4, 0x1.d5c216b8fbb91p-4, 0x1.ef0adcaec5936p-4, + 0x1.040259530d041p-3, 0x1.1058bf8d24ad5p-3, 0x1.1c898c09d99fbp-3, + 0x1.2895a13e286a3p-3, 0x1.347dd9a447d55p-3, 0x1.404308716a7e4p-3, + 0x1.4be5f963b78a1p-3, 0x1.5767718015a6cp-3, 0x1.62c82f3a5c795p-3, + 0x1.6e08eab13a1e4p-3, 0x1.792a55fe147a2p-3, 0x1.842d1d9928b17p-3, + 0x1.8f11e873a62c7p-3, 0x1.99d958207e08bp-3, 0x1.a484090c1bb0ap-3, + 0x1.af129324b786bp-3, 0x1.b9858970710fbp-3, 0x1.c3dd7a6ddad4dp-3, + 0x1.ce1af0b65f3ebp-3, 0x1.d83e725022f3ep-3, 0x1.e2488197c6c26p-3, + 0x1.ec399d3d68ccp-3, 0x1.f6123fac028acp-3, 0x1.ffd2e07e7f498p-3, + 0x1.04bdf9e3b26d2p-2, 0x1.0986f4fa93521p-2, 0x1.0e4498651cc8cp-2, + 0x1.12f719595efbcp-2, 0x1.179eabb0a99a1p-2, 0x1.1c3b81e933c25p-2, + 0x1.20cdcd0e0ab6ep-2, 0x1.2555bcf50f7cbp-2, 0x1.29d37ff34b08bp-2, + 0x1.2e47437640268p-2, 0x1.32b1338401d71p-2, 0x1.37117b5c147b6p-2, + 0x1.3b6844a13fc23p-2, 0x1.3fb5b857f6f42p-2, 0x1.43f9fe2f7ce67p-2, + 0x1.48353d11488dfp-2, 0x1.4c679b014ee3ap-2, 0x1.50913cc03686bp-2, + 0x1.54b2468259498p-2, 0x1.58cadb57d7989p-2, 0x1.5cdb1dcaa1765p-2, + 0x1.60e32f46788d9p-2 + }; + static const double ln2n[] = + { + 0x1.62e42fedb2a44p-2, 0x1.62e42feeab21ap-1, 0x1.0a2b23f33e789p+0, + 0x1.62e42fef27604p+0, 0x1.bb9d3beb1048p+0, 0x1.0a2b23f37c97ep+1, + 0x1.3687a9f1710bcp+1, 0x1.62e42fef657fap+1, 0x1.8f40b5ed59f38p+1, + 0x1.bb9d3beb4e676p+1, 0x1.e7f9c1e942db4p+1, 0x1.0a2b23f39ba79p+2, + 0x1.205966f295e18p+2, 0x1.3687a9f1901b7p+2, 0x1.4cb5ecf08a556p+2, + 0x1.62e42fef848f5p+2, 0x1.791272ee7ec93p+2, 0x1.8f40b5ed79032p+2, + 0x1.a56ef8ec733d1p+2, 0x1.bb9d3beb6d77p+2, 0x1.d1cb7eea67b0fp+2, + 0x1.e7f9c1e961eaep+2, 0x1.fe2804e85c24dp+2, 0x1.0a2b23f3ab2f6p+3 + }; + static const double b[] = { - if (__glibc_unlikely (xa < 0x1.0p-28f)) + 0x1.fffffffce5a6ap-2, -0x1.0001f81ec0ab8p-2, 0x1.555a0f53d79a5p-3 + }; + static const double s[] = { 1, -1 }; + + uint32_t ux = asuint (x); + uint32_t ax = ux << 1; + if (__glibc_unlikely (ax < 0x7a300000u || ax >= 0x7f000000u)) + { + if (__glibc_unlikely (ax >= 0x7f000000u)) + return as_special (x); + if (__glibc_unlikely (ax < 0x73713744u)) { - math_force_eval (huge + x); - math_check_force_underflow (x); - return x; + if (ax == 0) + return x; /* x = +-0 */ + return fmaf (x, 0x1p-25f, x); /* |x| < 0.000352112(0x1.713744p-12) */ + } + else + { /* |x| < 0x1.3p-5 */ + static const double c[] = + { + 0x1.5555555555527p-2, 0x1.9999999ba4ee8p-3, + 0x1.24922c280990ap-3, 0x1.c8236aae809c6p-4 + }; + double z = x; + double z2 = z * z; + double z4 = z2 * z2; + double r = c[0] + z2 * c[1] + z4 * (c[2] + z2 * c[3]); + return z + (z * z2) * r; } - - t = xa + xa; - t = 0.5f * __log1pf (t + t * xa / (1.0f - xa)); } - else if (__glibc_likely (isless (xa, 1.0f))) - t = 0.5f * __log1pf ((xa + xa) / (1.0f - xa)); - else + double sgn = s[ux >> 31]; + unsigned int e = ax >> 24; + unsigned int md = ((ux << 8) | 1 << 31) >> (126 - e); + unsigned int mn = -md; + int nz = __builtin_clz (mn) + 1; + mn <<= nz; + unsigned jn = mn >> 26, jd = md >> 26; + double tn = asdouble (((int64_t) mn << 20) | (INT64_C(1023) << 52)); + double td = asdouble (((int64_t) md << 20) | (INT64_C(1023) << 52)); + double zn = tn * tr[jn] - 1; + double zd = td * tr[jd] - 1; + double zn2 = zn * zn; + double zd2 = zd * zd; + double rn = ((tl[jn] - ln2n[nz - 1]) + zn * b[0]) + zn2 * (b[1] + zn * b[2]); + double rd = (tl[jd] + zd * b[0]) + zd2 * (b[1] + zd * b[2]); + double r = sgn * (rd - rn); + float ub = r; + float lb = r + sgn * 0.226e-9; + if (__glibc_unlikely (ub != lb)) { - if (isgreater (xa, 1.0f)) - return (x - x) / (x - x); - - return x / 0.0f; + static const double c[] = + { + 0x1p-1, -0x1.000000000001bp-2, 0x1.55555555555bap-3, + -0x1.fffffff26d72ep-4, 0x1.99999989035p-4, -0x1.555c39cb9ee8p-4, + 0x1.24992d8b014a1p-4 + }; + double zn4 = zn2 * zn2, zd4 = zd2 * zd2; + double fn = zn * (((c[0] + zn * c[1]) + zn2 * (c[2] + zn * c[3])) + + zn4 * ((c[4] + zn * c[5]) + zn2 * c[6])); + fn += 0x1.0ca86c3898dp-50 * nz; + fn += tl[jn]; + double en = nz * 0x1.62e42fefa3ap-2; + double fd = zd * (((c[0] + zd * c[1]) + zd2 * (c[2] + zd * c[3])) + + zd4 * ((c[4] + zd * c[5]) + zd2 * c[6])); + fd += tl[jd]; + r = fd - fn + en; + ub = sgn * r; } - - return copysignf (t, x); + return ub; } libm_alias_finite (__ieee754_atanhf, __atanhf) diff --git a/sysdeps/loongarch/lp64/libm-test-ulps b/sysdeps/loongarch/lp64/libm-test-ulps index 2b726c95a9..08a3d63393 100644 --- a/sysdeps/loongarch/lp64/libm-test-ulps +++ b/sysdeps/loongarch/lp64/libm-test-ulps @@ -98,22 +98,18 @@ ldouble: 2 Function: "atanh": double: 2 -float: 2 ldouble: 4 Function: "atanh_downward": double: 3 -float: 3 ldouble: 4 Function: "atanh_towardzero": double: 2 -float: 2 ldouble: 2 Function: "atanh_upward": double: 3 -float: 3 ldouble: 4 Function: "cabs": diff --git a/sysdeps/m68k/coldfire/fpu/libm-test-ulps b/sysdeps/m68k/coldfire/fpu/libm-test-ulps index 989015ff9a..998088f295 100644 --- a/sysdeps/m68k/coldfire/fpu/libm-test-ulps +++ b/sysdeps/m68k/coldfire/fpu/libm-test-ulps @@ -4,7 +4,6 @@ Function: "atan2": Function: "atanh": -float: 1 Function: Imaginary part of "cacosh": float: 1 diff --git a/sysdeps/microblaze/libm-test-ulps b/sysdeps/microblaze/libm-test-ulps index 30eb8f1a0c..a6fa8376e1 100644 --- a/sysdeps/microblaze/libm-test-ulps +++ b/sysdeps/microblaze/libm-test-ulps @@ -17,7 +17,6 @@ Function: "atan2": Function: "atanh": double: 2 -float: 2 Function: "cabs": double: 1 diff --git a/sysdeps/mips/mips32/libm-test-ulps b/sysdeps/mips/mips32/libm-test-ulps index 6b0bf0e003..2487ffe183 100644 --- a/sysdeps/mips/mips32/libm-test-ulps +++ b/sysdeps/mips/mips32/libm-test-ulps @@ -74,19 +74,15 @@ double: 1 Function: "atanh": double: 2 -float: 2 Function: "atanh_downward": double: 3 -float: 3 Function: "atanh_towardzero": double: 2 -float: 2 Function: "atanh_upward": double: 3 -float: 3 Function: "cabs": double: 1 diff --git a/sysdeps/mips/mips64/libm-test-ulps b/sysdeps/mips/mips64/libm-test-ulps index 1ed68bb36d..0ce7c06b2b 100644 --- a/sysdeps/mips/mips64/libm-test-ulps +++ b/sysdeps/mips/mips64/libm-test-ulps @@ -98,22 +98,18 @@ ldouble: 2 Function: "atanh": double: 2 -float: 2 ldouble: 4 Function: "atanh_downward": double: 3 -float: 3 ldouble: 4 Function: "atanh_towardzero": double: 2 -float: 2 ldouble: 2 Function: "atanh_upward": double: 3 -float: 3 ldouble: 4 Function: "cabs": diff --git a/sysdeps/or1k/fpu/libm-test-ulps b/sysdeps/or1k/fpu/libm-test-ulps index 56485715bd..c673d62a62 100644 --- a/sysdeps/or1k/fpu/libm-test-ulps +++ b/sysdeps/or1k/fpu/libm-test-ulps @@ -74,19 +74,15 @@ double: 1 Function: "atanh": double: 2 -float: 2 Function: "atanh_downward": double: 3 -float: 3 Function: "atanh_towardzero": double: 2 -float: 2 Function: "atanh_upward": double: 3 -float: 3 Function: "cabs": double: 1 diff --git a/sysdeps/or1k/nofpu/libm-test-ulps b/sysdeps/or1k/nofpu/libm-test-ulps index 7ece256112..8e4801fe24 100644 --- a/sysdeps/or1k/nofpu/libm-test-ulps +++ b/sysdeps/or1k/nofpu/libm-test-ulps @@ -74,19 +74,15 @@ double: 1 Function: "atanh": double: 2 -float: 2 Function: "atanh_downward": double: 3 -float: 3 Function: "atanh_towardzero": double: 2 -float: 2 Function: "atanh_upward": double: 3 -float: 3 Function: "cabs": double: 1 diff --git a/sysdeps/powerpc/fpu/libm-test-ulps b/sysdeps/powerpc/fpu/libm-test-ulps index 95e4d049ac..e394159703 100644 --- a/sysdeps/powerpc/fpu/libm-test-ulps +++ b/sysdeps/powerpc/fpu/libm-test-ulps @@ -126,25 +126,21 @@ ldouble: 2 Function: "atanh": double: 2 -float: 2 float128: 4 ldouble: 2 Function: "atanh_downward": double: 3 -float: 3 float128: 4 ldouble: 3 Function: "atanh_towardzero": double: 2 -float: 2 float128: 2 ldouble: 4 Function: "atanh_upward": double: 3 -float: 3 float128: 4 ldouble: 4 diff --git a/sysdeps/powerpc/nofpu/libm-test-ulps b/sysdeps/powerpc/nofpu/libm-test-ulps index 5d6a34115e..deec711353 100644 --- a/sysdeps/powerpc/nofpu/libm-test-ulps +++ b/sysdeps/powerpc/nofpu/libm-test-ulps @@ -102,22 +102,18 @@ ldouble: 2 Function: "atanh": double: 2 -float: 2 ldouble: 2 Function: "atanh_downward": double: 3 -float: 3 ldouble: 3 Function: "atanh_towardzero": double: 2 -float: 2 ldouble: 4 Function: "atanh_upward": double: 3 -float: 3 ldouble: 4 Function: "cabs": diff --git a/sysdeps/riscv/nofpu/libm-test-ulps b/sysdeps/riscv/nofpu/libm-test-ulps index ff1e792986..3a551201e7 100644 --- a/sysdeps/riscv/nofpu/libm-test-ulps +++ b/sysdeps/riscv/nofpu/libm-test-ulps @@ -98,22 +98,18 @@ ldouble: 2 Function: "atanh": double: 2 -float: 2 ldouble: 4 Function: "atanh_downward": double: 3 -float: 3 ldouble: 4 Function: "atanh_towardzero": double: 2 -float: 2 ldouble: 2 Function: "atanh_upward": double: 3 -float: 3 ldouble: 4 Function: "cabs": diff --git a/sysdeps/riscv/rvd/libm-test-ulps b/sysdeps/riscv/rvd/libm-test-ulps index 1a4577cd5c..2f89c82811 100644 --- a/sysdeps/riscv/rvd/libm-test-ulps +++ b/sysdeps/riscv/rvd/libm-test-ulps @@ -98,22 +98,18 @@ ldouble: 2 Function: "atanh": double: 2 -float: 2 ldouble: 4 Function: "atanh_downward": double: 3 -float: 3 ldouble: 4 Function: "atanh_towardzero": double: 2 -float: 2 ldouble: 2 Function: "atanh_upward": double: 3 -float: 3 ldouble: 4 Function: "cabs": diff --git a/sysdeps/s390/fpu/libm-test-ulps b/sysdeps/s390/fpu/libm-test-ulps index 4ff845bc0a..54a42a8c51 100644 --- a/sysdeps/s390/fpu/libm-test-ulps +++ b/sysdeps/s390/fpu/libm-test-ulps @@ -98,22 +98,18 @@ ldouble: 2 Function: "atanh": double: 2 -float: 2 ldouble: 4 Function: "atanh_downward": double: 3 -float: 3 ldouble: 4 Function: "atanh_towardzero": double: 2 -float: 2 ldouble: 2 Function: "atanh_upward": double: 3 -float: 3 ldouble: 4 Function: "cabs": diff --git a/sysdeps/sh/libm-test-ulps b/sysdeps/sh/libm-test-ulps index d87533a5cc..3694110fc1 100644 --- a/sysdeps/sh/libm-test-ulps +++ b/sysdeps/sh/libm-test-ulps @@ -35,11 +35,9 @@ double: 1 Function: "atanh": double: 2 -float: 2 Function: "atanh_towardzero": double: 2 -float: 2 Function: "cabs": double: 1 diff --git a/sysdeps/sparc/fpu/libm-test-ulps b/sysdeps/sparc/fpu/libm-test-ulps index 01e9cd360a..56a7a04480 100644 --- a/sysdeps/sparc/fpu/libm-test-ulps +++ b/sysdeps/sparc/fpu/libm-test-ulps @@ -98,22 +98,18 @@ ldouble: 2 Function: "atanh": double: 2 -float: 2 ldouble: 4 Function: "atanh_downward": double: 3 -float: 3 ldouble: 4 Function: "atanh_towardzero": double: 2 -float: 2 ldouble: 2 Function: "atanh_upward": double: 3 -float: 3 ldouble: 4 Function: "cabs": diff --git a/sysdeps/x86_64/fpu/libm-test-ulps b/sysdeps/x86_64/fpu/libm-test-ulps index 2a4b3bcfc6..74192a4c77 100644 --- a/sysdeps/x86_64/fpu/libm-test-ulps +++ b/sysdeps/x86_64/fpu/libm-test-ulps @@ -239,25 +239,21 @@ float: 1 Function: "atanh": double: 2 -float: 2 float128: 4 ldouble: 3 Function: "atanh_downward": double: 3 -float: 3 float128: 4 ldouble: 5 Function: "atanh_towardzero": double: 2 -float: 2 float128: 2 ldouble: 4 Function: "atanh_upward": double: 3 -float: 3 float128: 4 ldouble: 5