From patchwork Thu Feb 13 19:35:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 864836 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:1f8a:b0:38f:210b:807b with SMTP id hj10csp20596wrb; Thu, 13 Feb 2025 11:38:49 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUXb2ZS7cquJYR4TwmwoBMIyWgzxc9Mkr7UCllDplaE54j/bhJ9b3x2+DqJkQpeoLD/OUXuKg==@linaro.org X-Google-Smtp-Source: AGHT+IGmAxhO2iieY/HK7akMr/qPqoOeQDRYJbQeE2hO/2tBDajqSMQDEwHzJjuYBd7CpErfewNS X-Received: by 2002:a05:622a:1809:b0:471:96de:6663 with SMTP id d75a77b69052e-471c01df0e5mr67849211cf.16.1739475529321; Thu, 13 Feb 2025 11:38:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1739475529; cv=pass; d=google.com; s=arc-20240605; b=euWBC9TTqeX8s8/oj1JKlueoCY7xeuC8c9rt0lzvUmMNYPWCY1F0hX0rXQCluaNsny 9y5NoSM9pisXyIp14Y+A/BkRxnm8R/w64SSuEOe4qM8/F3ax1GQcC1ch7jkXpo9x+PLR XlpdKyLbBMK1/dbmgGMO4hw+CWpNcckd7kbM8NipdfLR18LMaxStjPUbOh1Jt+J84EmU RyTJF8VTqck18vTU8UwfVpQiVKgkedeGvaWd8II9h4MGCgniMzz8NNd4LqO6jugCb5fb T9/nyPhay9adjfMgJYj9OEK0jV1oeHNJmITyAI72n69VywcOKmwNEQYkc4ZHpmw9p+jO 8WuA== 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:dkim-filter; bh=Wg0DhENTiWLftCg3grX5CMzWJjH03CG4zy0OOOXterQ=; fh=ePm/olesskOIJSEHC0fDGlPq/ahiqJ2eRb/zEUaK+C4=; b=hZTmw15cLu+vDGPPWRO/0ncNH5lNhbmKARipRvepj+GCaoSz+rOZiSDp20DKCBVp+m uZGhO6rpFMBtYD/Fcp0cAMQ2ADyMgUeZkOLBOWrGTXhhuKz47Js6n4DU+dkgizlg1Bgo c72xeeD5W8bZW3aIr7FiRh6aEF6P5os3+V2iuexC8VUlnUnsOa/ROR43DwHPlfkw5J3t 7Tv4bUS/bpovWDTJPlGKAQLwdVq8JkLQeG+B/Y6pPdOcq0cdj/i/wY1EVHtjUyibO9Ko 1ImI18VWH08tS73nyBF+M/fzC29YFnW6SNbwTDnEuZKscNIkVmADA8EPCaz6duBhnPcJ V+Bw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hda0I+gl; 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-471c2b794fcsi17896481cf.630.2025.02.13.11.38.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2025 11:38:49 -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=hda0I+gl; 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 D1B873858C78 for ; Thu, 13 Feb 2025 19:38:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D1B873858C78 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=hda0I+gl X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oi1-x231.google.com (mail-oi1-x231.google.com [IPv6:2607:f8b0:4864:20::231]) by sourceware.org (Postfix) with ESMTPS id 712CC3858C31 for ; Thu, 13 Feb 2025 19:37:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 712CC3858C31 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 712CC3858C31 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::231 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1739475466; cv=none; b=XfSVAEkXvUPpAQ7D6RVFXKm2tR2KswaomyOw5aP6vsET+MexSeasGf7K/+hYC/RqEPsPS0ehUpCDjPGrgXFiIrgwK+c7DdkvYQeHkmN4ztuHRjE2pPtB2ALXvAWR+iwFRHzSwm5q5JPsnQUpYROeHp88RAvmInD8CN7WXRzqf7I= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1739475466; c=relaxed/simple; bh=LomAn/+hVkWoUce6l+j7dbFRCyzhuck8U3HReSf4HVg=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=sxMXl/9FTIHtzTmHOqtvcJK1LC40Kf3GwEkDdKaZHGgOYQ6fxLGswZi6CBivdTefxq4GOZB16kGg8Pnd82jDVgyL+RNhxWHgxeVgrTZXk2OFmra8WVj0JA67G34IS+z5s/pMhWGEkrbixXUx1v5OAyRVgvsM4JVocWkavjElNvc= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 712CC3858C31 Received: by mail-oi1-x231.google.com with SMTP id 5614622812f47-3f3ac0f24ddso778732b6e.0 for ; Thu, 13 Feb 2025 11:37:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739475465; x=1740080265; 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=Wg0DhENTiWLftCg3grX5CMzWJjH03CG4zy0OOOXterQ=; b=hda0I+glT7128PFkPHHuEwRRCMv25HvCpTHwVEbsp0+U0/GvZyYsLRR3002NmbW11G bVQuxYCYyoYg3uWgNRrtcft6IkrDevMUKdN9JMgwmlJ1lluTRpMK/yWFW1uF7NFWB6rM FegLAd4GXdyBZPSP/nUbS66sqtgO+JJJz3aerAjxBu537wlcrSnAk7slmXOCDIhtqWRx jg50EotlMOiOIEWbIrNIbKwfYwSv5iyCS/hCbuMLocr3KxwTyd0FkW/7jkhkKF4B6Svm 3lZyO+eSBsrBZdXumzNrKZGxLrmKzMxUN3+02iAKWMeDFTl6+pY5575UnVaZvGQ8ZpVq 6uJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739475465; x=1740080265; 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=Wg0DhENTiWLftCg3grX5CMzWJjH03CG4zy0OOOXterQ=; b=XYxKo758yDcTAY5P5GbOAihekm4A8XTURyFur5SOhV4pfNmF65KAjw9qwat89m75o5 c7DH/0WU/eHbO/QuyBYcn4tnDzD/8POevUkPpBbX2SdAi+tdWu3e1cP1a85z53tHWDiT gyL5oIt6dmab0lzjIVE0ptFDuGmxE/cses6i3ePRqC/rsKAeVNKL2EMhvM0xYxgUKT7L Fa45Np54gpgs8HK7n0/P9E0AwLlFTzQ5s8SV7aaOWE1Th7PTbhdXOgz1GPBgMyTEUMUh gVQ0V3R7/EPdgm9rFMnTEVprPy0VG/mwUuvh1fRGC6iAhPGydXwDFhqhn3wQonjR8fPu zQtg== X-Gm-Message-State: AOJu0YyFbY4YoWI3bsXxaYBLSmgL9YdRCuDmMyXFhSAqbP+Tj9OD31IL d/5MJayB1j6uI1J/XXDyT6mwT6jqbkqMMgxWspY+oQZSE+qgomGjYrS2MYzOq0yPof0cXL2511i 8 X-Gm-Gg: ASbGnctuMYA975bW9D5N3W0rK1xJmBtlN13+IILekStSPWYZiuGCY6VuL2zjFSy/5Ln eel78Ow1bsz9Fwqo9+6aJRwCl4o33mIP1GwqwO/VPQudgerXSrs25+0QjI+0Z8ZToVxUtCUCwhy XhFlHI7CPKcGAyaBpIy2BN8X6atAKKu1DbG5Yyslw7y+6mM390PhXt1Z7zAYQxyc48ltiE+q8Mi ROPaBz6/7G7SKokFuqvgGTeFHLC9LoqkqyPIjNYTvqifCWQcsa79OfBZbsAnV5PM6psAi/eXvvg PicgDLl+sYd2F5Q5XhDdWsDyttCy X-Received: by 2002:a05:6808:228f:b0:3eb:3dd6:81bc with SMTP id 5614622812f47-3f3d9285195mr2267813b6e.15.1739475465125; Thu, 13 Feb 2025 11:37:45 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c3:5d67:f7e1:d030:f4d6:f917]) by smtp.gmail.com with ESMTPSA id 5614622812f47-3f3daa1a4b8sm787005b6e.49.2025.02.13.11.37.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2025 11:37:44 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: "Andreas K . Huettel" , Paul Zimmermann , Alexei Sibidanov , DJ Delorie Subject: [PATCH v2 1/3] math: Consolidate cospif and sinpif internal tables Date: Thu, 13 Feb 2025 16:35:43 -0300 Message-ID: <20250213193737.3784065-2-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250213193737.3784065-1-adhemerval.zanella@linaro.org> References: <20250213193737.3784065-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 libm size improvement built with gcc-14, "--enable-stack-protector=strong --enable-bind-now=yes --enable-fortify-source=2": Before: text data bss dec hex filename 584500 844 12 585356 8ee8c aarch64-linux-gnu/math/libm.so 977341 1076 12 978429 eedfd x86_64-linux-gnu/math/libm.so 1205762 5608 368 1211738 127d5a powerpc64le-linux-gnu/math/libm.so After: text data bss dec hex filename 583444 844 12 584300 8ea6c aarch64-linux-gnu/math/libm.so 976349 1076 12 977437 eea1d x86_64-linux-gnu/math/libm.so 1204738 5608 368 1210714 12795a powerpc64le-linux-gnu/math/libm.so Reviewed-by: Andreas K. Huettel --- math/Makefile | 1 + sysdeps/ieee754/flt-32/s_cospif.c | 61 +---------------- sysdeps/ieee754/flt-32/s_sincospif_data.c | 80 +++++++++++++++++++++++ sysdeps/ieee754/flt-32/s_sincospif_data.h | 37 +++++++++++ sysdeps/ieee754/flt-32/s_sinpif.c | 60 +---------------- 5 files changed, 124 insertions(+), 115 deletions(-) create mode 100644 sysdeps/ieee754/flt-32/s_sincospif_data.c create mode 100644 sysdeps/ieee754/flt-32/s_sincospif_data.h diff --git a/math/Makefile b/math/Makefile index ffffcd54bb..999f0cc19c 100644 --- a/math/Makefile +++ b/math/Makefile @@ -370,6 +370,7 @@ type-float-routines := \ math_errf \ s_asincoshf_data \ s_sincosf_data \ + s_sincospif_data \ # type-float-routines # _Float128 support diff --git a/sysdeps/ieee754/flt-32/s_cospif.c b/sysdeps/ieee754/flt-32/s_cospif.c index d4c652f8c0..1e838037e1 100644 --- a/sysdeps/ieee754/flt-32/s_cospif.c +++ b/sysdeps/ieee754/flt-32/s_cospif.c @@ -28,67 +28,12 @@ SOFTWARE. #include #include #include +#include "s_sincospif_data.h" #include "math_config.h" float __cospif (float x) { - static const double sn[] = - { - 0x1.921fb54442d0fp-37, -0x1.4abbce6102b94p-112, 0x1.4669fa3c58463p-189 - }; - static const double cn[] = - { - -0x1.3bd3cc9be45cfp-74, 0x1.03c1f08088742p-150, -0x1.55d1e5eff55a5p-228 - }; - /* S[i] approximates sin(i*pi/2^6) */ - static const double S[] = - { - 0x0p+0, 0x1.91f65f10dd814p-5, 0x1.917a6bc29b42cp-4, - 0x1.2c8106e8e613ap-3, 0x1.8f8b83c69a60bp-3, 0x1.f19f97b215f1bp-3, - 0x1.294062ed59f06p-2, 0x1.58f9a75ab1fddp-2, 0x1.87de2a6aea963p-2, - 0x1.b5d1009e15ccp-2, 0x1.e2b5d3806f63bp-2, 0x1.073879922ffeep-1, - 0x1.1c73b39ae68c8p-1, 0x1.30ff7fce17035p-1, 0x1.44cf325091dd6p-1, - 0x1.57d69348cecap-1, 0x1.6a09e667f3bcdp-1, 0x1.7b5df226aafafp-1, - 0x1.8bc806b151741p-1, 0x1.9b3e047f38741p-1, 0x1.a9b66290ea1a3p-1, - 0x1.b728345196e3ep-1, 0x1.c38b2f180bdb1p-1, 0x1.ced7af43cc773p-1, - 0x1.d906bcf328d46p-1, 0x1.e212104f686e5p-1, 0x1.e9f4156c62ddap-1, - 0x1.f0a7efb9230d7p-1, 0x1.f6297cff75cbp-1, 0x1.fa7557f08a517p-1, - 0x1.fd88da3d12526p-1, 0x1.ff621e3796d7ep-1, 0x1p+0, - 0x1.ff621e3796d7ep-1, 0x1.fd88da3d12526p-1, 0x1.fa7557f08a517p-1, - 0x1.f6297cff75cbp-1, 0x1.f0a7efb9230d7p-1, 0x1.e9f4156c62ddap-1, - 0x1.e212104f686e5p-1, 0x1.d906bcf328d46p-1, 0x1.ced7af43cc773p-1, - 0x1.c38b2f180bdb1p-1, 0x1.b728345196e3ep-1, 0x1.a9b66290ea1a3p-1, - 0x1.9b3e047f38741p-1, 0x1.8bc806b151741p-1, 0x1.7b5df226aafafp-1, - 0x1.6a09e667f3bcdp-1, 0x1.57d69348cecap-1, 0x1.44cf325091dd6p-1, - 0x1.30ff7fce17035p-1, 0x1.1c73b39ae68c8p-1, 0x1.073879922ffeep-1, - 0x1.e2b5d3806f63bp-2, 0x1.b5d1009e15ccp-2, 0x1.87de2a6aea963p-2, - 0x1.58f9a75ab1fddp-2, 0x1.294062ed59f06p-2, 0x1.f19f97b215f1bp-3, - 0x1.8f8b83c69a60bp-3, 0x1.2c8106e8e613ap-3, 0x1.917a6bc29b42cp-4, - 0x1.91f65f10dd814p-5, 0x0p+0, -0x1.91f65f10dd814p-5, - -0x1.917a6bc29b42cp-4, -0x1.2c8106e8e613ap-3, -0x1.8f8b83c69a60bp-3, - -0x1.f19f97b215f1bp-3, -0x1.294062ed59f06p-2, -0x1.58f9a75ab1fddp-2, - -0x1.87de2a6aea963p-2, -0x1.b5d1009e15ccp-2, -0x1.e2b5d3806f63bp-2, - -0x1.073879922ffeep-1, -0x1.1c73b39ae68c8p-1, -0x1.30ff7fce17035p-1, - -0x1.44cf325091dd6p-1, -0x1.57d69348cecap-1, -0x1.6a09e667f3bcdp-1, - -0x1.7b5df226aafafp-1, -0x1.8bc806b151741p-1, -0x1.9b3e047f38741p-1, - -0x1.a9b66290ea1a3p-1, -0x1.b728345196e3ep-1, -0x1.c38b2f180bdb1p-1, - -0x1.ced7af43cc773p-1, -0x1.d906bcf328d46p-1, -0x1.e212104f686e5p-1, - -0x1.e9f4156c62ddap-1, -0x1.f0a7efb9230d7p-1, -0x1.f6297cff75cbp-1, - -0x1.fa7557f08a517p-1, -0x1.fd88da3d12526p-1, -0x1.ff621e3796d7ep-1, - -0x1p+0, -0x1.ff621e3796d7ep-1, -0x1.fd88da3d12526p-1, - -0x1.fa7557f08a517p-1, -0x1.f6297cff75cbp-1, -0x1.f0a7efb9230d7p-1, - -0x1.e9f4156c62ddap-1, -0x1.e212104f686e5p-1, -0x1.d906bcf328d46p-1, - -0x1.ced7af43cc773p-1, -0x1.c38b2f180bdb1p-1, -0x1.b728345196e3ep-1, - -0x1.a9b66290ea1a3p-1, -0x1.9b3e047f38741p-1, -0x1.8bc806b151741p-1, - -0x1.7b5df226aafafp-1, -0x1.6a09e667f3bcdp-1, -0x1.57d69348cecap-1, - -0x1.44cf325091dd6p-1, -0x1.30ff7fce17035p-1, -0x1.1c73b39ae68c8p-1, - -0x1.073879922ffeep-1, -0x1.e2b5d3806f63bp-2, -0x1.b5d1009e15ccp-2, - -0x1.87de2a6aea963p-2, -0x1.58f9a75ab1fddp-2, -0x1.294062ed59f06p-2, - -0x1.f19f97b215f1bp-3, -0x1.8f8b83c69a60bp-3, -0x1.2c8106e8e613ap-3, - -0x1.917a6bc29b42cp-4, -0x1.91f65f10dd814p-5 - }; - uint32_t ix = asuint (x); int32_t e = (ix >> 23) & 0xff; if (__glibc_unlikely (e == 0xff)) @@ -124,8 +69,8 @@ __cospif (float x) } double z = k; double z2 = z * z; - double fs = sn[0] + z2 * (sn[1] + z2 * sn[2]); - double fc = cn[0] + z2 * (cn[1] + z2 * cn[2]); + double fs = SN[0] + z2 * (SN[1] + z2 * SN[2]); + double fc = CN[0] + z2 * (CN[1] + z2 * CN[2]); uint32_t iq = m >> s; iq = (iq + 1) >> 1; uint32_t is = iq & 127, ic = (iq + 32) & 127; diff --git a/sysdeps/ieee754/flt-32/s_sincospif_data.c b/sysdeps/ieee754/flt-32/s_sincospif_data.c new file mode 100644 index 0000000000..7fa75e0176 --- /dev/null +++ b/sysdeps/ieee754/flt-32/s_sincospif_data.c @@ -0,0 +1,80 @@ +/* Common data for sinpif/cospif implementations. + +Copyright (c) 2022-2025 Alexei Sibidanov. + +The original version of this file was copied from the CORE-MATH +project (src/binary32/sinpi/sinpif.c, revision f786e13). + +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. + +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. +*/ + +const double __sincospi_sn[] = + { + 0x1.921fb54442d0fp-37, -0x1.4abbce6102b94p-112, 0x1.4669fa3c58463p-189 + }; +const double __sincospi_cn[] = + { + -0x1.3bd3cc9be45cfp-74, 0x1.03c1f08088742p-150, -0x1.55d1e5eff55a5p-228 + }; +const double __sincospi_S[] = + { + 0x0p+0, 0x1.91f65f10dd814p-5, 0x1.917a6bc29b42cp-4, + 0x1.2c8106e8e613ap-3, 0x1.8f8b83c69a60bp-3, 0x1.f19f97b215f1bp-3, + 0x1.294062ed59f06p-2, 0x1.58f9a75ab1fddp-2, 0x1.87de2a6aea963p-2, + 0x1.b5d1009e15ccp-2, 0x1.e2b5d3806f63bp-2, 0x1.073879922ffeep-1, + 0x1.1c73b39ae68c8p-1, 0x1.30ff7fce17035p-1, 0x1.44cf325091dd6p-1, + 0x1.57d69348cecap-1, 0x1.6a09e667f3bcdp-1, 0x1.7b5df226aafafp-1, + 0x1.8bc806b151741p-1, 0x1.9b3e047f38741p-1, 0x1.a9b66290ea1a3p-1, + 0x1.b728345196e3ep-1, 0x1.c38b2f180bdb1p-1, 0x1.ced7af43cc773p-1, + 0x1.d906bcf328d46p-1, 0x1.e212104f686e5p-1, 0x1.e9f4156c62ddap-1, + 0x1.f0a7efb9230d7p-1, 0x1.f6297cff75cbp-1, 0x1.fa7557f08a517p-1, + 0x1.fd88da3d12526p-1, 0x1.ff621e3796d7ep-1, 0x1p+0, + 0x1.ff621e3796d7ep-1, 0x1.fd88da3d12526p-1, 0x1.fa7557f08a517p-1, + 0x1.f6297cff75cbp-1, 0x1.f0a7efb9230d7p-1, 0x1.e9f4156c62ddap-1, + 0x1.e212104f686e5p-1, 0x1.d906bcf328d46p-1, 0x1.ced7af43cc773p-1, + 0x1.c38b2f180bdb1p-1, 0x1.b728345196e3ep-1, 0x1.a9b66290ea1a3p-1, + 0x1.9b3e047f38741p-1, 0x1.8bc806b151741p-1, 0x1.7b5df226aafafp-1, + 0x1.6a09e667f3bcdp-1, 0x1.57d69348cecap-1, 0x1.44cf325091dd6p-1, + 0x1.30ff7fce17035p-1, 0x1.1c73b39ae68c8p-1, 0x1.073879922ffeep-1, + 0x1.e2b5d3806f63bp-2, 0x1.b5d1009e15ccp-2, 0x1.87de2a6aea963p-2, + 0x1.58f9a75ab1fddp-2, 0x1.294062ed59f06p-2, 0x1.f19f97b215f1bp-3, + 0x1.8f8b83c69a60bp-3, 0x1.2c8106e8e613ap-3, 0x1.917a6bc29b42cp-4, + 0x1.91f65f10dd814p-5, 0x0p+0, -0x1.91f65f10dd814p-5, + -0x1.917a6bc29b42cp-4, -0x1.2c8106e8e613ap-3, -0x1.8f8b83c69a60bp-3, + -0x1.f19f97b215f1bp-3, -0x1.294062ed59f06p-2, -0x1.58f9a75ab1fddp-2, + -0x1.87de2a6aea963p-2, -0x1.b5d1009e15ccp-2, -0x1.e2b5d3806f63bp-2, + -0x1.073879922ffeep-1, -0x1.1c73b39ae68c8p-1, -0x1.30ff7fce17035p-1, + -0x1.44cf325091dd6p-1, -0x1.57d69348cecap-1, -0x1.6a09e667f3bcdp-1, + -0x1.7b5df226aafafp-1, -0x1.8bc806b151741p-1, -0x1.9b3e047f38741p-1, + -0x1.a9b66290ea1a3p-1, -0x1.b728345196e3ep-1, -0x1.c38b2f180bdb1p-1, + -0x1.ced7af43cc773p-1, -0x1.d906bcf328d46p-1, -0x1.e212104f686e5p-1, + -0x1.e9f4156c62ddap-1, -0x1.f0a7efb9230d7p-1, -0x1.f6297cff75cbp-1, + -0x1.fa7557f08a517p-1, -0x1.fd88da3d12526p-1, -0x1.ff621e3796d7ep-1, + -0x1p+0, -0x1.ff621e3796d7ep-1, -0x1.fd88da3d12526p-1, + -0x1.fa7557f08a517p-1, -0x1.f6297cff75cbp-1, -0x1.f0a7efb9230d7p-1, + -0x1.e9f4156c62ddap-1, -0x1.e212104f686e5p-1, -0x1.d906bcf328d46p-1, + -0x1.ced7af43cc773p-1, -0x1.c38b2f180bdb1p-1, -0x1.b728345196e3ep-1, + -0x1.a9b66290ea1a3p-1, -0x1.9b3e047f38741p-1, -0x1.8bc806b151741p-1, + -0x1.7b5df226aafafp-1, -0x1.6a09e667f3bcdp-1, -0x1.57d69348cecap-1, + -0x1.44cf325091dd6p-1, -0x1.30ff7fce17035p-1, -0x1.1c73b39ae68c8p-1, + -0x1.073879922ffeep-1, -0x1.e2b5d3806f63bp-2, -0x1.b5d1009e15ccp-2, + -0x1.87de2a6aea963p-2, -0x1.58f9a75ab1fddp-2, -0x1.294062ed59f06p-2, + -0x1.f19f97b215f1bp-3, -0x1.8f8b83c69a60bp-3, -0x1.2c8106e8e613ap-3, + -0x1.917a6bc29b42cp-4, -0x1.91f65f10dd814p-5 + }; diff --git a/sysdeps/ieee754/flt-32/s_sincospif_data.h b/sysdeps/ieee754/flt-32/s_sincospif_data.h new file mode 100644 index 0000000000..d09e238754 --- /dev/null +++ b/sysdeps/ieee754/flt-32/s_sincospif_data.h @@ -0,0 +1,37 @@ +/* Common data for sinpif/cospif implementations. + +Copyright (c) 2022-2025 Alexei Sibidanov. + +The original version of this file was copied from the CORE-MATH +project (src/binary32/sinpi/sinpif.c, revision f786e13). + +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. + +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. +*/ + +#ifndef _SINCOSPIF_H +#define _SINCOSPIF_H + +extern const double __sincospi_sn[] attribute_hidden; +#define SN __sincospi_sn +extern const double __sincospi_cn[] attribute_hidden; +#define CN __sincospi_cn +extern const double __sincospi_S[] attribute_hidden; +#define S __sincospi_S + +#endif diff --git a/sysdeps/ieee754/flt-32/s_sinpif.c b/sysdeps/ieee754/flt-32/s_sinpif.c index 772ea428e2..99a8bbbcf3 100644 --- a/sysdeps/ieee754/flt-32/s_sinpif.c +++ b/sysdeps/ieee754/flt-32/s_sinpif.c @@ -29,66 +29,12 @@ SOFTWARE. #include #include #include +#include "s_sincospif_data.h" #include "math_config.h" float __sinpif (float x) { - static const double sn[] = - { - 0x1.921fb54442d0fp-37, -0x1.4abbce6102b94p-112, 0x1.4669fa3c58463p-189 - }; - static const double cn[] = - { - -0x1.3bd3cc9be45cfp-74, 0x1.03c1f08088742p-150, -0x1.55d1e5eff55a5p-228 - }; - static const double S[] = - { - 0x0p+0, 0x1.91f65f10dd814p-5, 0x1.917a6bc29b42cp-4, - 0x1.2c8106e8e613ap-3, 0x1.8f8b83c69a60bp-3, 0x1.f19f97b215f1bp-3, - 0x1.294062ed59f06p-2, 0x1.58f9a75ab1fddp-2, 0x1.87de2a6aea963p-2, - 0x1.b5d1009e15ccp-2, 0x1.e2b5d3806f63bp-2, 0x1.073879922ffeep-1, - 0x1.1c73b39ae68c8p-1, 0x1.30ff7fce17035p-1, 0x1.44cf325091dd6p-1, - 0x1.57d69348cecap-1, 0x1.6a09e667f3bcdp-1, 0x1.7b5df226aafafp-1, - 0x1.8bc806b151741p-1, 0x1.9b3e047f38741p-1, 0x1.a9b66290ea1a3p-1, - 0x1.b728345196e3ep-1, 0x1.c38b2f180bdb1p-1, 0x1.ced7af43cc773p-1, - 0x1.d906bcf328d46p-1, 0x1.e212104f686e5p-1, 0x1.e9f4156c62ddap-1, - 0x1.f0a7efb9230d7p-1, 0x1.f6297cff75cbp-1, 0x1.fa7557f08a517p-1, - 0x1.fd88da3d12526p-1, 0x1.ff621e3796d7ep-1, 0x1p+0, - 0x1.ff621e3796d7ep-1, 0x1.fd88da3d12526p-1, 0x1.fa7557f08a517p-1, - 0x1.f6297cff75cbp-1, 0x1.f0a7efb9230d7p-1, 0x1.e9f4156c62ddap-1, - 0x1.e212104f686e5p-1, 0x1.d906bcf328d46p-1, 0x1.ced7af43cc773p-1, - 0x1.c38b2f180bdb1p-1, 0x1.b728345196e3ep-1, 0x1.a9b66290ea1a3p-1, - 0x1.9b3e047f38741p-1, 0x1.8bc806b151741p-1, 0x1.7b5df226aafafp-1, - 0x1.6a09e667f3bcdp-1, 0x1.57d69348cecap-1, 0x1.44cf325091dd6p-1, - 0x1.30ff7fce17035p-1, 0x1.1c73b39ae68c8p-1, 0x1.073879922ffeep-1, - 0x1.e2b5d3806f63bp-2, 0x1.b5d1009e15ccp-2, 0x1.87de2a6aea963p-2, - 0x1.58f9a75ab1fddp-2, 0x1.294062ed59f06p-2, 0x1.f19f97b215f1bp-3, - 0x1.8f8b83c69a60bp-3, 0x1.2c8106e8e613ap-3, 0x1.917a6bc29b42cp-4, - 0x1.91f65f10dd814p-5, 0x0p+0, -0x1.91f65f10dd814p-5, - -0x1.917a6bc29b42cp-4, -0x1.2c8106e8e613ap-3, -0x1.8f8b83c69a60bp-3, - -0x1.f19f97b215f1bp-3, -0x1.294062ed59f06p-2, -0x1.58f9a75ab1fddp-2, - -0x1.87de2a6aea963p-2, -0x1.b5d1009e15ccp-2, -0x1.e2b5d3806f63bp-2, - -0x1.073879922ffeep-1, -0x1.1c73b39ae68c8p-1, -0x1.30ff7fce17035p-1, - -0x1.44cf325091dd6p-1, -0x1.57d69348cecap-1, -0x1.6a09e667f3bcdp-1, - -0x1.7b5df226aafafp-1, -0x1.8bc806b151741p-1, -0x1.9b3e047f38741p-1, - -0x1.a9b66290ea1a3p-1, -0x1.b728345196e3ep-1, -0x1.c38b2f180bdb1p-1, - -0x1.ced7af43cc773p-1, -0x1.d906bcf328d46p-1, -0x1.e212104f686e5p-1, - -0x1.e9f4156c62ddap-1, -0x1.f0a7efb9230d7p-1, -0x1.f6297cff75cbp-1, - -0x1.fa7557f08a517p-1, -0x1.fd88da3d12526p-1, -0x1.ff621e3796d7ep-1, - -0x1p+0, -0x1.ff621e3796d7ep-1, -0x1.fd88da3d12526p-1, - -0x1.fa7557f08a517p-1, -0x1.f6297cff75cbp-1, -0x1.f0a7efb9230d7p-1, - -0x1.e9f4156c62ddap-1, -0x1.e212104f686e5p-1, -0x1.d906bcf328d46p-1, - -0x1.ced7af43cc773p-1, -0x1.c38b2f180bdb1p-1, -0x1.b728345196e3ep-1, - -0x1.a9b66290ea1a3p-1, -0x1.9b3e047f38741p-1, -0x1.8bc806b151741p-1, - -0x1.7b5df226aafafp-1, -0x1.6a09e667f3bcdp-1, -0x1.57d69348cecap-1, - -0x1.44cf325091dd6p-1, -0x1.30ff7fce17035p-1, -0x1.1c73b39ae68c8p-1, - -0x1.073879922ffeep-1, -0x1.e2b5d3806f63bp-2, -0x1.b5d1009e15ccp-2, - -0x1.87de2a6aea963p-2, -0x1.58f9a75ab1fddp-2, -0x1.294062ed59f06p-2, - -0x1.f19f97b215f1bp-3, -0x1.8f8b83c69a60bp-3, -0x1.2c8106e8e613ap-3, - -0x1.917a6bc29b42cp-4, -0x1.91f65f10dd814p-5 - }; - uint32_t ix = asuint (x); int32_t e = (ix >> 23) & 0xff; if (__glibc_unlikely (e == 0xff)) @@ -122,8 +68,8 @@ __sinpif (float x) int32_t k = m << (31 - s); double z = k, z2 = z * z; - double fs = sn[0] + z2 * (sn[1] + z2 * sn[2]); - double fc = cn[0] + z2 * (cn[1] + z2 * cn[2]); + double fs = SN[0] + z2 * (SN[1] + z2 * SN[2]); + double fc = CN[0] + z2 * (CN[1] + z2 * CN[2]); uint32_t iq = m >> s; iq = (iq + 1) >> 1; uint32_t is = iq & 127, ic = (iq + 32) & 127; From patchwork Thu Feb 13 19:35:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 864835 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:1f8a:b0:38f:210b:807b with SMTP id hj10csp20477wrb; Thu, 13 Feb 2025 11:38:30 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXTbxmKpEgCOUw/H9+cUN2wQ75bSVhQT2F1aqiHmczge8NxCAOZJO6cLkZshWTOpJQXITN4KA==@linaro.org X-Google-Smtp-Source: AGHT+IHKqTZOEU7BoJl/66QRqmjnsS6ioK+d2h4/+jtBWFps4WlyWqN9Qie5JK2f+l3eqV4DXkNQ X-Received: by 2002:a05:622a:2308:b0:471:b544:e6fc with SMTP id d75a77b69052e-471c0484b82mr69965361cf.26.1739475510742; Thu, 13 Feb 2025 11:38:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1739475510; cv=pass; d=google.com; s=arc-20240605; b=Y0Nr3Tr3dqyxBkaOGtiTc5GOm7uzI4ix/yV6KCEyUTUeRoYPPyFt5i8C8SPJETUOKa DaxG7uBC0JCsv2XkfZVmXE/Zui+21XIVDm8qALNEO7LpTpG+VgctaHmtAfJBM/87Yd7H 4tR5P+TjmgGOJMv28VuU/u8uySYA05N5PuEo6evlP5MGVsYqRq1N2k8rpdiNvQIQ92Yj istBFCwtAhCUaKD37Nk1qMVl9q84R3qMwFgkqjwe0b+X9/EIGUHRewoxpcfyvBV6ya6k JpMlm3v6xF0+S4jFpPbMjEPzm9gSzqNc087CdubyuX+C5UHilGjoe6W0rsL3SDYfbzIb MawQ== 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:dkim-filter; bh=mjmeuLc0nLPJtZDGv185YsA8PChza0o1CgDXAHmbivg=; fh=ePm/olesskOIJSEHC0fDGlPq/ahiqJ2eRb/zEUaK+C4=; b=F+q63Em6HG5v5B7xEzGwF6gztT47vW0X1WyRKF28o7ixh5GvaiJ1++Bk1eUAd2w3Bc T6oS7LZKr+TfYMWZoAPkhOzpwbQgaA1Rsr2qnJOBxOh2HvJ/mwM5i45TQSSonFqTHyp2 8nYQ+L98GXCfwXfAVJ/Y8V6DKsQs1GODOR9uJkXSjpNBGR9xVOa3JR7T+dSZsy0MfEFp ztU9LmGcP/Fp5BWXFAZ1xts927ailsjxNJf33R3lqgM7NpXvhZvNco6rIDqEG+u7GSAo 838wVSYBVp5nNQvKFDxwBNbJBle9uG4E1MSRqg5tB1RuAExXy1qW7/PMelPOBYVCDF4i 2VZQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=r2QGdd59; 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 d75a77b69052e-471c29f01c4si18398121cf.65.2025.02.13.11.38.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2025 11:38:30 -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=r2QGdd59; 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 4E0E23858C32 for ; Thu, 13 Feb 2025 19:38:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4E0E23858C32 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=r2QGdd59 X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) by sourceware.org (Postfix) with ESMTPS id BE6BA3858C33 for ; Thu, 13 Feb 2025 19:37:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BE6BA3858C33 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 BE6BA3858C33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::22c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1739475468; cv=none; b=jDdVFqZdXqJaNzq0G02sPQyP/h4M8hgx+wsHeF/OJAoKJ946rxD4cLelkSRHTgGMrrrI0r11pd5qfxNKWFWUg0yDWfNHVJQwpf6yUepZMutCBb3ifxCstg6HzfcS6rRgY1uoFsgRC1oWke6q0990Ae6YqlZbrAOfgvLYr0xpDcg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1739475468; c=relaxed/simple; bh=PcIErYXMIb2sjT3at2yZ+86iuN4uhdBenhXs9B/qxWQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=PvtOdJRFQ9AKoshMddwe1MrGpTtTAsVFe2cjxEuDFH9GsE6DE+0NTVrCv55Cew7IMwQtUAjOkXF5alzlmAWwBIek93712MBNcllZh5k+bHVM42wtWS11m6ZE3yNCFUwom3gHmHrsxi7cQN4R7hZ98mM7IJuwJbvsUA7HDzV1xG8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BE6BA3858C33 Received: by mail-oi1-x22c.google.com with SMTP id 5614622812f47-3f1c94936c5so683118b6e.1 for ; Thu, 13 Feb 2025 11:37:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739475467; x=1740080267; 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=mjmeuLc0nLPJtZDGv185YsA8PChza0o1CgDXAHmbivg=; b=r2QGdd59+dVLugUmbYYYl5FFsw4vvzJ/5hh/8wJDv1IRXMvZD/9YW/l7+39rDXWyDe EuE9a4gpQyWtb84N8iAfnrOXNWEafCcSdzMyd06fsFEfgQ6T8wNI+L+6AV5Gap1IhmWM g8qAt3bbN3PtciCih/KQbYt7WJfJFrQBi7Z1OSgY2r10+cu0xNlX3wyOnhho2PrxBV21 XzBYqUtgxWD14DbThO0Y7D6k0yurMH5XfUUAYrYMhwthlQcskGEy2yuS0koT2yqA8IRA elSoB1RNPi7M0JmQkpHZCNp2o4h4e4vI+DTkzHj9+qdnxNhnY7Rn25ObSUlq8VfiPf1W jDDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739475467; x=1740080267; 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=mjmeuLc0nLPJtZDGv185YsA8PChza0o1CgDXAHmbivg=; b=vhdunWMaOwaQpOdWnCF+sR9nUEWS+oWJbqGavlIGtSnz1iWra7tf7oFN9tU7tU78Un Hd3abvQjEMjrGGNG2F/6dVvHDmoEkcCI6MYxTpJSmBpIQBu/lU/rAaH4vZKZHNH/tWmy uKeuOSM4SF3gaIVqQnXMqo+ak9aStJvUF8Ld0G9zQxyFdNhuLCwmKl0B9MiHeCjgICSp F5tZlkPeyowcWuHOQgAhPrqHu7AHhXojh8BRR91lV71esXCSsf/YyAt9fPaRVp73b1if o7RuBF8x4CLqREPHXw2s7y0R6tQ/85Xey4tuOROSFhxrLASZIMRVTw+ThNTu5xkgxLA4 +UYQ== X-Gm-Message-State: AOJu0YzYaESkAV832XG7y15xLVot3KKuP8BxcWElVgM/sSAeGQroI/Tq o+WOIdhjxuzw2rOBmmbO9VAE34zkPGThN7IQ3WtiNbzhmLFCwfRlY5V5A9H3qFUUQPDo6Ee6wkm 8 X-Gm-Gg: ASbGnctxMZ+Ym42SZyehJjTNetF+4g4OwsMScjdh7kLDAKIfjQviLpCqoViyOHafqNp cTI3gP+bcnh9v/m0qoZ0706QHEQOp41hUmv8ltXtk/dlWw5VyNlwN/C7y5oyujotURBme9F1Yeo bsS1h5yQTHJHwLqozB/U5ue3FGIQqLFNIXw3CbaMwQA2fB04EN/23xuCls+5leeaNz/igIzYO7m U3pi3A3ASGeWmltvDjp9etNklbgZLrwUIVZe0urHbJhgbkhB9f0H+3xC2N/jJXS6tT3w8jYQ2KS asi19Sau4AWABvGk1LjrCFdFPfVw X-Received: by 2002:a05:6808:2023:b0:3f3:ab5e:82fc with SMTP id 5614622812f47-3f3d9271fcbmr2844937b6e.10.1739475467463; Thu, 13 Feb 2025 11:37:47 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c3:5d67:f7e1:d030:f4d6:f917]) by smtp.gmail.com with ESMTPSA id 5614622812f47-3f3daa1a4b8sm787005b6e.49.2025.02.13.11.37.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2025 11:37:46 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: "Andreas K . Huettel" , Paul Zimmermann , Alexei Sibidanov , DJ Delorie Subject: [PATCH v2 2/3] math: Consolidate acospif and asinpif internal tables Date: Thu, 13 Feb 2025 16:35:44 -0300 Message-ID: <20250213193737.3784065-3-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250213193737.3784065-1-adhemerval.zanella@linaro.org> References: <20250213193737.3784065-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 libm size improvement built with gcc-14, "--enable-stack-protector=strong --enable-bind-now=yes --enable-fortify-source=2": Before: text data bss dec hex filename 583444 844 12 584300 8ea6c aarch64-linux-gnu/math/libm.so 976349 1076 12 977437 eea1d x86_64-linux-gnu/math/libm.so 1204738 5608 368 1210714 12795a powerpc64le-linux-gnu/math/libm.so After: 582292 844 12 583148 8e5ec aarch64-linux-gnu/math/libm.so 975133 1076 12 976221 ee55d x86_64-linux-gnu/math/libm.so 1203586 5608 368 1209562 1274da powerpc64le-linux-gnu/math/libm.so Reviewed-by: Andreas K. Huettel --- math/Makefile | 1 + sysdeps/ieee754/flt-32/s_acospif.c | 53 +------------- sysdeps/ieee754/flt-32/s_asincospif_data.c | 81 ++++++++++++++++++++++ sysdeps/ieee754/flt-32/s_asincospif_data.h | 34 +++++++++ sysdeps/ieee754/flt-32/s_asinpif.c | 55 +-------------- 5 files changed, 120 insertions(+), 104 deletions(-) create mode 100644 sysdeps/ieee754/flt-32/s_asincospif_data.c create mode 100644 sysdeps/ieee754/flt-32/s_asincospif_data.h diff --git a/math/Makefile b/math/Makefile index 999f0cc19c..43e0e365eb 100644 --- a/math/Makefile +++ b/math/Makefile @@ -369,6 +369,7 @@ type-float-routines := \ e_sincoshf_data \ math_errf \ s_asincoshf_data \ + s_asincospif_data \ s_sincosf_data \ s_sincospif_data \ # type-float-routines diff --git a/sysdeps/ieee754/flt-32/s_acospif.c b/sysdeps/ieee754/flt-32/s_acospif.c index 03d63a74c8..caf65d42f3 100644 --- a/sysdeps/ieee754/flt-32/s_acospif.c +++ b/sysdeps/ieee754/flt-32/s_acospif.c @@ -29,6 +29,7 @@ SOFTWARE. #include #include #include "math_config.h" +#include "s_asincospif_data.h" float __acospif (float x) @@ -52,57 +53,7 @@ __acospif (float x) int i = 0; if (__glibc_likely (s < 32)) i = ((t & (~0u >> 9)) | 1 << 23) >> s; - static const double ch[][8] = { - { 0x1.45f306dc9c882p-2, 0x1.b2995e7b7dc2fp-5, 0x1.8723a1cf50c7ep-6, - 0x1.d1a4591d16a29p-7, 0x1.3ce3aa68ddaeep-7, 0x1.d3182ab0cc1bfp-8, - 0x1.62b379a8b88e3p-8, 0x1.6811411fcfec2p-8 }, - { 0x1.ffffffffd3cd9p-2, -0x1.17cc1b3355fd5p-4, 0x1.d067a1e8d5a99p-6, - -0x1.08e16fb09314ap-6, 0x1.5eed43d42dcb2p-7, -0x1.f58baca7acc71p-8, - 0x1.5dab64e2dcf15p-8, -0x1.59270e30797acp-9 }, - { 0x1.fffffff7c4622p-2, -0x1.17cc149ded3a2p-4, 0x1.d0654d4cb2c1ap-6, - -0x1.08c3ba713d33ap-6, 0x1.5d2053481079cp-7, -0x1.e485ebc545e7ep-8, - 0x1.303baca167dddp-8, -0x1.dee8d16d06b38p-10 }, - { 0x1.ffffffa749848p-2, -0x1.17cbe7155935p-4, 0x1.d05a312269adfp-6, - -0x1.0862b3ee617d7p-6, 0x1.5920708db2a73p-7, -0x1.cb0463b3862c3p-8, - 0x1.02b82478f95d7p-8, -0x1.52a7b8579e729p-10 }, - { 0x1.fffffe1f92bb5p-2, -0x1.17cb3e74c64e3p-4, 0x1.d03af67311cbfp-6, - -0x1.079441cbfc7ap-6, 0x1.52b4287805a61p-7, -0x1.ac3286d604a98p-8, - 0x1.b2f1210d9701bp-9, -0x1.e740ddc25afd6p-11 }, - { 0x1.fffff92beb6e2p-2, -0x1.17c986fe9518bp-4, 0x1.cff98167c9a5ep-6, - -0x1.0638b591eae52p-6, 0x1.4a0803828959ep-7, -0x1.8adeca229f11dp-8, - 0x1.6b9a7ba05dfcep-9, -0x1.640521a43b2dp-11 }, - { 0x1.ffffeccee5bfcp-2, -0x1.17c5f1753f5eap-4, 0x1.cf874e4fe258fp-6, - -0x1.043e6cf77b256p-6, 0x1.3f7db42227d92p-7, -0x1.691a6fa2a2882p-8, - 0x1.2f6543162bc61p-9, -0x1.07d5da05822b6p-11 }, - { 0x1.ffffd2f64431dp-2, -0x1.17bf8208c10c1p-4, 0x1.ced7487cdb124p-6, - -0x1.01a0d30932905p-6, 0x1.3388f99b254dap-7, -0x1.4844e245c65bdp-8, - 0x1.fa777150197c6p-10, -0x1.8c1ecf16a05c8p-12 }, - { 0x1.ffffa36d1712ep-2, -0x1.17b523971bd4ep-4, 0x1.cddee26de2deep-6, - -0x1.fccb00abaaabcp-7, 0x1.269afc3622342p-7, -0x1.2933152686752p-8, - 0x1.a76d4956cc9a3p-10, -0x1.2ce7d6dc651cep-12 }, - { 0x1.ffff5402ab3a1p-2, -0x1.17a5ba85da77ap-4, 0x1.cc96894e05c02p-6, - -0x1.f532143cb832ep-7, 0x1.19180b660ff09p-7, -0x1.0c57417a78b3cp-8, - 0x1.62e26cbd7bb1ep-10, -0x1.ce28d33fe1df3p-13 }, - { 0x1.fffed8d639751p-2, -0x1.1790349f3ae76p-4, 0x1.caf9a4fd1b398p-6, - -0x1.ec986b111342ep-7, 0x1.0b53c3ad4baa4p-7, -0x1.e3c2282eeace4p-9, - 0x1.2a55369f55bbep-10, -0x1.667fe48c396e8p-13 }, - { 0x1.fffe24b714161p-2, -0x1.177394fbcb719p-4, 0x1.c90652d920ebdp-6, - -0x1.e3239197bddf1p-7, 0x1.fb2188525b025p-8, -0x1.b3aadd451afc7p-9, - 0x1.f74020f31fdabp-11, -0x1.18b0cb246768dp-13 }, - { 0x1.fffd298bec9e2p-2, -0x1.174efbfd34648p-4, 0x1.c6bcfe48ea92bp-6, - -0x1.d8f9f2a16157cp-7, 0x1.e0044f56c8864p-8, -0x1.883e2347fe76cp-9, - 0x1.a9f0e3c1b7af5p-11, -0x1.bb5acc0e60825p-14 }, - { 0x1.fffbd8b784c4dp-2, -0x1.1721abdd3722ep-4, 0x1.c41fee756d4bp-6, - -0x1.ce40bccf8065fp-7, 0x1.c59b684b70ef9p-8, -0x1.6133d027996b3p-9, - 0x1.69cad01106397p-11, -0x1.60f8e45494156p-14 }, - { 0x1.fffa23749cf88p-2, -0x1.16eb0a8285c06p-4, 0x1.c132d762e1b0dp-6, - -0x1.c31a959398f4ep-7, 0x1.ac1c5b46bc8ap-8, -0x1.3e34f1abe51dcp-9, - 0x1.346738737c0b9p-11, -0x1.1b227a3f5c75p-14 }, - { 0x1.fff7fb25bb407p-2, -0x1.16aaa14d7564p-4, 0x1.bdfa75fca5ff2p-6, - -0x1.b7a6e260d079cp-7, 0x1.93ab06911033cp-8, -0x1.1ee5560967fd5p-9, - 0x1.07d31060838bfp-11, -0x1.c96f33a283115p-15 }, - }; - const double *c = ch[i]; + const double *c = CH[i]; double z2 = z * z; double z4 = z2 * z2; if (__glibc_unlikely (i == 0)) diff --git a/sysdeps/ieee754/flt-32/s_asincospif_data.c b/sysdeps/ieee754/flt-32/s_asincospif_data.c new file mode 100644 index 0000000000..5bd67e949c --- /dev/null +++ b/sysdeps/ieee754/flt-32/s_asincospif_data.c @@ -0,0 +1,81 @@ +/* Common data for asinpif/acospif implementations. + +Copyright (c) 2022-2025 Alexei Sibidanov. + +The original version of this file was copied from the CORE-MATH +project (file src/binary32/asinpi/asinpif.c, revision 6ee58266). + +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. + +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. + +*/ + +#include "s_asincospif_data.h" + +const double __asincospif_ch[][8] = + { + { 0x1.45f306dc9c882p-2, 0x1.b2995e7b7dc2fp-5, 0x1.8723a1cf50c7ep-6, + 0x1.d1a4591d16a29p-7, 0x1.3ce3aa68ddaeep-7, 0x1.d3182ab0cc1bfp-8, + 0x1.62b379a8b88e3p-8, 0x1.6811411fcfec2p-8 }, + { 0x1.ffffffffd3cdap-2, -0x1.17cc1b3355fddp-4, 0x1.d067a1e8d5a99p-6, + -0x1.08e16fb09314ap-6, 0x1.5eed43d42dcb2p-7, -0x1.f58baca7acc71p-8, + 0x1.5dab64e2dcf15p-8, -0x1.59270e30797acp-9 }, + { 0x1.fffffff7c4617p-2, -0x1.17cc149ded3a2p-4, 0x1.d0654d4cb2c1ap-6, + -0x1.08c3ba713d33ap-6, 0x1.5d2053481079cp-7, -0x1.e485ebc545e7ep-8, + 0x1.303baca167dddp-8, -0x1.dee8d16d06b38p-10 }, + { 0x1.ffffffa749848p-2, -0x1.17cbe7155935p-4, 0x1.d05a312269adfp-6, + -0x1.0862b3ee617d7p-6, 0x1.5920708db2a73p-7, -0x1.cb0463b3862c3p-8, + 0x1.02b82478f95d7p-8, -0x1.52a7b8579e729p-10 }, + { 0x1.fffffe1f92bb5p-2, -0x1.17cb3e74c64e3p-4, 0x1.d03af67311cbfp-6, + -0x1.079441cbfc7ap-6, 0x1.52b4287805a61p-7, -0x1.ac3286d604a98p-8, + 0x1.b2f1210d9701bp-9, -0x1.e740ddc25afd6p-11 }, + { 0x1.fffff92beb6e2p-2, -0x1.17c986fe9518bp-4, 0x1.cff98167c9a5ep-6, + -0x1.0638b591eae52p-6, 0x1.4a0803828959ep-7, -0x1.8adeca229f11dp-8, + 0x1.6b9a7ba05dfcep-9, -0x1.640521a43b2dp-11 }, + { 0x1.ffffeccee5bfcp-2, -0x1.17c5f1753f5eap-4, 0x1.cf874e4fe258fp-6, + -0x1.043e6cf77b256p-6, 0x1.3f7db42227d92p-7, -0x1.691a6fa2a2882p-8, + 0x1.2f6543162bc61p-9, -0x1.07d5da05822b6p-11 }, + { 0x1.ffffd2f64431dp-2, -0x1.17bf8208c10c1p-4, 0x1.ced7487cdb124p-6, + -0x1.01a0d30932905p-6, 0x1.3388f99b254dap-7, -0x1.4844e245c65bdp-8, + 0x1.fa777150197c6p-10, -0x1.8c1ecf16a05c8p-12 }, + { 0x1.ffffa36d1712ep-2, -0x1.17b523971bd4ep-4, 0x1.cddee26de2deep-6, + -0x1.fccb00abaaabcp-7, 0x1.269afc3622342p-7, -0x1.2933152686752p-8, + 0x1.a76d4956cc9a3p-10, -0x1.2ce7d6dc651cep-12 }, + { 0x1.ffff5402ab3a1p-2, -0x1.17a5ba85da77ap-4, 0x1.cc96894e05c02p-6, + -0x1.f532143cb832ep-7, 0x1.19180b660ff09p-7, -0x1.0c57417a78b3cp-8, + 0x1.62e26cbd7bb1ep-10, -0x1.ce28d33fe1df3p-13 }, + { 0x1.fffed8d639751p-2, -0x1.1790349f3ae76p-4, 0x1.caf9a4fd1b398p-6, + -0x1.ec986b111342ep-7, 0x1.0b53c3ad4baa4p-7, -0x1.e3c2282eeace4p-9, + 0x1.2a55369f55bbep-10, -0x1.667fe48c396e8p-13 }, + { 0x1.fffe24b714161p-2, -0x1.177394fbcb719p-4, 0x1.c90652d920ebdp-6, + -0x1.e3239197bddf1p-7, 0x1.fb2188525b025p-8, -0x1.b3aadd451afc7p-9, + 0x1.f74020f31fdabp-11, -0x1.18b0cb246768dp-13 }, + { 0x1.fffd298bec9e2p-2, -0x1.174efbfd34648p-4, 0x1.c6bcfe48ea92bp-6, + -0x1.d8f9f2a16157cp-7, 0x1.e0044f56c8864p-8, -0x1.883e2347fe76cp-9, + 0x1.a9f0e3c1b7af5p-11, -0x1.bb5acc0e60825p-14 }, + { 0x1.fffbd8b784c4dp-2, -0x1.1721abdd3722ep-4, 0x1.c41fee756d4bp-6, + -0x1.ce40bccf8065fp-7, 0x1.c59b684b70ef9p-8, -0x1.6133d027996b3p-9, + 0x1.69cad01106397p-11, -0x1.60f8e45494156p-14 }, + { 0x1.fffa23749cf88p-2, -0x1.16eb0a8285c06p-4, 0x1.c132d762e1b0dp-6, + -0x1.c31a959398f4ep-7, 0x1.ac1c5b46bc8ap-8, -0x1.3e34f1abe51dcp-9, + 0x1.346738737c0b9p-11, -0x1.1b227a3f5c75p-14 }, + { 0x1.fff7fb25bb407p-2, -0x1.16aaa14d7564p-4, 0x1.bdfa75fca5ff2p-6, + -0x1.b7a6e260d079cp-7, 0x1.93ab06911033cp-8, -0x1.1ee5560967fd5p-9, + 0x1.07d31060838bfp-11, -0x1.c96f33a283115p-15 + } +}; diff --git a/sysdeps/ieee754/flt-32/s_asincospif_data.h b/sysdeps/ieee754/flt-32/s_asincospif_data.h new file mode 100644 index 0000000000..d733f864d2 --- /dev/null +++ b/sysdeps/ieee754/flt-32/s_asincospif_data.h @@ -0,0 +1,34 @@ +/* Common data for asinpif/acospif implementations. + +Copyright (c) 2022-2025 Alexei Sibidanov. + +The original version of this file was copied from the CORE-MATH +project (file src/binary32/asinpi/asinpif.c, revision 6ee58266). + +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. + +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. + +*/ + +#ifndef _S_ASINCOSPIF_H +#define _S_ASINCOSPIF_H + +extern const double __asincospif_ch[][8] attribute_hidden; +#define CH __asincospif_ch + +#endif diff --git a/sysdeps/ieee754/flt-32/s_asinpif.c b/sysdeps/ieee754/flt-32/s_asinpif.c index 5e97a3481a..f9e93533d4 100644 --- a/sysdeps/ieee754/flt-32/s_asinpif.c +++ b/sysdeps/ieee754/flt-32/s_asinpif.c @@ -30,6 +30,7 @@ SOFTWARE. #include #include #include "math_config.h" +#include "s_asincospif_data.h" float __asinpif (float x) @@ -52,59 +53,7 @@ __asinpif (float x) /* s<32 corresponds to |x| >= 2^-12 */ if (__glibc_likely (s < 32)) i = ((t & (~0u >> 9)) | 1 << 23) >> s; - static const double ch[][8] = - { - { 0x1.45f306dc9c882p-2, 0x1.b2995e7b7dc2fp-5, 0x1.8723a1cf50c7ep-6, - 0x1.d1a4591d16a29p-7, 0x1.3ce3aa68ddaeep-7, 0x1.d3182ab0cc1bfp-8, - 0x1.62b379a8b88e3p-8, 0x1.6811411fcfec2p-8 }, - { 0x1.ffffffffd3cdap-2, -0x1.17cc1b3355fddp-4, 0x1.d067a1e8d5a99p-6, - -0x1.08e16fb09314ap-6, 0x1.5eed43d42dcb2p-7, -0x1.f58baca7acc71p-8, - 0x1.5dab64e2dcf15p-8, -0x1.59270e30797acp-9 }, - { 0x1.fffffff7c4617p-2, -0x1.17cc149ded3a2p-4, 0x1.d0654d4cb2c1ap-6, - -0x1.08c3ba713d33ap-6, 0x1.5d2053481079cp-7, -0x1.e485ebc545e7ep-8, - 0x1.303baca167dddp-8, -0x1.dee8d16d06b38p-10 }, - { 0x1.ffffffa749848p-2, -0x1.17cbe7155935p-4, 0x1.d05a312269adfp-6, - -0x1.0862b3ee617d7p-6, 0x1.5920708db2a73p-7, -0x1.cb0463b3862c3p-8, - 0x1.02b82478f95d7p-8, -0x1.52a7b8579e729p-10 }, - { 0x1.fffffe1f92bb5p-2, -0x1.17cb3e74c64e3p-4, 0x1.d03af67311cbfp-6, - -0x1.079441cbfc7ap-6, 0x1.52b4287805a61p-7, -0x1.ac3286d604a98p-8, - 0x1.b2f1210d9701bp-9, -0x1.e740ddc25afd6p-11 }, - { 0x1.fffff92beb6e2p-2, -0x1.17c986fe9518bp-4, 0x1.cff98167c9a5ep-6, - -0x1.0638b591eae52p-6, 0x1.4a0803828959ep-7, -0x1.8adeca229f11dp-8, - 0x1.6b9a7ba05dfcep-9, -0x1.640521a43b2dp-11 }, - { 0x1.ffffeccee5bfcp-2, -0x1.17c5f1753f5eap-4, 0x1.cf874e4fe258fp-6, - -0x1.043e6cf77b256p-6, 0x1.3f7db42227d92p-7, -0x1.691a6fa2a2882p-8, - 0x1.2f6543162bc61p-9, -0x1.07d5da05822b6p-11 }, - { 0x1.ffffd2f64431dp-2, -0x1.17bf8208c10c1p-4, 0x1.ced7487cdb124p-6, - -0x1.01a0d30932905p-6, 0x1.3388f99b254dap-7, -0x1.4844e245c65bdp-8, - 0x1.fa777150197c6p-10, -0x1.8c1ecf16a05c8p-12 }, - { 0x1.ffffa36d1712ep-2, -0x1.17b523971bd4ep-4, 0x1.cddee26de2deep-6, - -0x1.fccb00abaaabcp-7, 0x1.269afc3622342p-7, -0x1.2933152686752p-8, - 0x1.a76d4956cc9a3p-10, -0x1.2ce7d6dc651cep-12 }, - { 0x1.ffff5402ab3a1p-2, -0x1.17a5ba85da77ap-4, 0x1.cc96894e05c02p-6, - -0x1.f532143cb832ep-7, 0x1.19180b660ff09p-7, -0x1.0c57417a78b3cp-8, - 0x1.62e26cbd7bb1ep-10, -0x1.ce28d33fe1df3p-13 }, - { 0x1.fffed8d639751p-2, -0x1.1790349f3ae76p-4, 0x1.caf9a4fd1b398p-6, - -0x1.ec986b111342ep-7, 0x1.0b53c3ad4baa4p-7, -0x1.e3c2282eeace4p-9, - 0x1.2a55369f55bbep-10, -0x1.667fe48c396e8p-13 }, - { 0x1.fffe24b714161p-2, -0x1.177394fbcb719p-4, 0x1.c90652d920ebdp-6, - -0x1.e3239197bddf1p-7, 0x1.fb2188525b025p-8, -0x1.b3aadd451afc7p-9, - 0x1.f74020f31fdabp-11, -0x1.18b0cb246768dp-13 }, - { 0x1.fffd298bec9e2p-2, -0x1.174efbfd34648p-4, 0x1.c6bcfe48ea92bp-6, - -0x1.d8f9f2a16157cp-7, 0x1.e0044f56c8864p-8, -0x1.883e2347fe76cp-9, - 0x1.a9f0e3c1b7af5p-11, -0x1.bb5acc0e60825p-14 }, - { 0x1.fffbd8b784c4dp-2, -0x1.1721abdd3722ep-4, 0x1.c41fee756d4bp-6, - -0x1.ce40bccf8065fp-7, 0x1.c59b684b70ef9p-8, -0x1.6133d027996b3p-9, - 0x1.69cad01106397p-11, -0x1.60f8e45494156p-14 }, - { 0x1.fffa23749cf88p-2, -0x1.16eb0a8285c06p-4, 0x1.c132d762e1b0dp-6, - -0x1.c31a959398f4ep-7, 0x1.ac1c5b46bc8ap-8, -0x1.3e34f1abe51dcp-9, - 0x1.346738737c0b9p-11, -0x1.1b227a3f5c75p-14 }, - { 0x1.fff7fb25bb407p-2, -0x1.16aaa14d7564p-4, 0x1.bdfa75fca5ff2p-6, - -0x1.b7a6e260d079cp-7, 0x1.93ab06911033cp-8, -0x1.1ee5560967fd5p-9, - 0x1.07d31060838bfp-11, -0x1.c96f33a283115p-15 - } - }; - const double *c = ch[i]; + const double *c = CH[i]; double z2 = z * z; double z4 = z2 * z2; if (__glibc_unlikely (i == 0)) /* |x| < 2^-4 */ From patchwork Thu Feb 13 19:35:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 864837 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:1f8a:b0:38f:210b:807b with SMTP id hj10csp21769wrb; Thu, 13 Feb 2025 11:42:30 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUUO65Y01srA2VXSYYMEJffoW5SCnY1XZZpR1KDVoZVW1RczWeX+2Z+sPjK1VkiieyE0dv5qg==@linaro.org X-Google-Smtp-Source: AGHT+IGhNX9GSqvPhY7fLqiZbKGbNQlunvQyoGpO4m5jKlu8XvRnr4tXbgXCIg9u0mEExGA4gBVj X-Received: by 2002:a05:620a:4884:b0:7c0:8175:3651 with SMTP id af79cd13be357-7c08175375dmr232816485a.43.1739475750368; Thu, 13 Feb 2025 11:42:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1739475750; cv=pass; d=google.com; s=arc-20240605; b=i4hAfFexeYbcRg7Mh1ofmidILO3iMJxxSSut5nP9JSyNINAgXkBKL3nUHLvJ4L9H9C y8DBJ8koC8y4QROp/c8djFTnreSjReTHRIz2W3pPcFHUPR9Esn76gzPvwsmMSFxrInqK TjBx7RWf8pseIAGk9A+yTWuNclZca6ObXv4s14EIPLsJxZb2NPLR5CDo4kMIst4B5+5m Umeo4v9HbPgT/b+2qAUK+l6EZ78n36MVOStLoiEpsczbR/FyUX+p8iilA//v+kYT5zwM vNjHE4xREJw71BIFvolJqJEX2HnmwyVm+LUIMLk8S4PmIVxtNMNJccf27USqqJvUmHcH 8uVw== 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:dkim-filter; bh=xKgBr9gVvks5ndCD4MpeatQgQnB7PXAtH5E3+pc5X4M=; fh=ePm/olesskOIJSEHC0fDGlPq/ahiqJ2eRb/zEUaK+C4=; b=Xp7Ball1SyXzdk5MxncNZwWyh8mKIB3WQAWYFBsqchlltH90E4UJqb+5bTWTMJRQiN Kj6BneOBiRVpjqPlQcXgEOUqxuNtjLamu7h2Uv1fxoS13IaBZGc/YNz3SUlHbzEzvDdT Q5mGTbI93WoMCQdaqLjUeck0hW0KJcRHeGf/VEJ1tULWcpjthyQSlEbniKmcP9DXbe/Y nRmcep6pWZlEWkL1HKoZvqsrhXWVSKALgxfpYhXMV3LVa4dGo0Ga4vcUhD+lyTE9PZj4 NVm/+/fRzSP7mgL5jDSjXSHo9Z/bTiFIoJnkXMPLVynOThBc1hIrRASzVS4F+W+vJEZd rpmQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Up7ubuWw; 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 af79cd13be357-7c07c81d543si177841385a.145.2025.02.13.11.42.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2025 11:42:30 -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=Up7ubuWw; 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 B66FE3858C2B for ; Thu, 13 Feb 2025 19:42:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B66FE3858C2B 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=Up7ubuWw X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oi1-x236.google.com (mail-oi1-x236.google.com [IPv6:2607:f8b0:4864:20::236]) by sourceware.org (Postfix) with ESMTPS id 409713858C41 for ; Thu, 13 Feb 2025 19:37:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 409713858C41 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 409713858C41 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::236 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1739475471; cv=none; b=H2WXrLeY0ChCzj23sN11n039zGaZJzQNdgQUWT7MbBT1EEP8yAv6K9JrCQ/fB+oYsTMF1FcRM3GSjMKR0BG8cCKTSLL4dzPXV9bmmo6O26jzxuBksoKJtVGQCcrHXw6xYSTLwJqw9iZ2QiggbHJe1J5OqH2t9WftnLok03Ug/mw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1739475471; c=relaxed/simple; bh=cuyPHaNeGyQcFWekNbhU58227PgAyMVrZq8GQXvg7Is=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=i4kQkm0Hq3K21ulkqv2Dp/FqgT3JRLaOfPp1CT6miZ4N3Io7UPfoLuQDDDEm/WquWOIS/JafbYdeRslWoB2EXrEcZTV/uaDkqUbVvhx2NJ0+8IVLUwhZCl1bcn/zse3TaIfx/1KoBdmj56uUIiDmUYM+l48Jlc+ZUD0MwdhoKeQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 409713858C41 Received: by mail-oi1-x236.google.com with SMTP id 5614622812f47-3f3a97b3e26so764790b6e.2 for ; Thu, 13 Feb 2025 11:37:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739475470; x=1740080270; 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=xKgBr9gVvks5ndCD4MpeatQgQnB7PXAtH5E3+pc5X4M=; b=Up7ubuWwC4XxYcjZ1Jvl9JDH7CLBAytPj1tmwujdj6p6x8oV3mtPZUjb+cTZOgSYRA YoeLXKce9hljxN9LLfdJ+V/zJ2qmryaWZUzNSw6cYaMCNVxvJKmRMZMPa3fX0ga+2rp6 gBRZ2395cEdhnxgQsobUqeSBPyJ3KLUHikBxjiF7nOnJpTrL9UQiEBsYdZql4nua2HpK MvsaXI4D5KF2KbYKgYorWY7mZcEqoQqeFYJ1oVJDJHFyprpwuSx1MGMYj39XOEkGbL7E o+E7T3dgbyxvivwe1pn8N14VLD2yWnnjx2n5xJ4RpxmYcDkKSpO94PyAzwNioq9YbPRi jDiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739475470; x=1740080270; 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=xKgBr9gVvks5ndCD4MpeatQgQnB7PXAtH5E3+pc5X4M=; b=AsXvcARFs9a46I4FfnXNheTO3rCik1JqdnkbK626vr1/UOj+TEhAb+XONkPgEzBYkW LTJ5QlBLBx2266wTWwz6z1SnlygK58t5qti82d1/f9d9+GZXO4Rb5jca8ILGyNauWh0y swpGytySCwbtlpOvGgEU5/cGYD3Pw2KP7IcqJJGSFrFL3txJ05o6qHkG/fZdaD6r4aoE EmiOjvcoaGybV7yRiEI8TTz7a7GZmhAk7ZQjtfXrCrjXkxw9WKydmIjGBuF5G/EiTfLX g90CYRUuzwoWOkPA2WVgQF2e/1At9lfTA99qO43cbET7bZyL1JMkKpv5ViDueAuohYTh ftHw== X-Gm-Message-State: AOJu0YzR3UZPKEutungYsiTo4WMnxRrQ0ovbchK2nILnQrF/F8vCRLBC rUsmZaTkf9KuR4aBzTJEeJTuJgP/uoedEwwEuhw1ocUbWPQyXD0oeo7kZr0DDxURldyJdSXBmQt D X-Gm-Gg: ASbGncvAJC6EkKdla8ttlYJans7XWbExwzr4S071G/nGDvEZRJCdMgTgTXCPU51byJP qnFlZIH2+tNaQnhHVIeE+rjnDP3xaMWTLyRFW/anthzG26Up9trNzvPm7L6HPYv6rI8+amz2Dkl A4msegGrjtBOx40LYOyuCXDDyzRP+QytAwAz05vR4F9FyvVsSsqJuYfJ9tjFpX2I0vKauDL4IUT 562I2itoEPlDzIg4TCvtzN5PIFdFDguCPElbNTpWvvA/ACuxT1YjRwYgCBDETSWQVjlTEH4poRg 7+GnE19Sam2RKUDsgzeFW0BjJ0pR X-Received: by 2002:a05:6808:3090:b0:3f3:b38f:30a4 with SMTP id 5614622812f47-3f3cd728920mr5438829b6e.29.1739475470047; Thu, 13 Feb 2025 11:37:50 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c3:5d67:f7e1:d030:f4d6:f917]) by smtp.gmail.com with ESMTPSA id 5614622812f47-3f3daa1a4b8sm787005b6e.49.2025.02.13.11.37.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2025 11:37:49 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: "Andreas K . Huettel" , Paul Zimmermann , Alexei Sibidanov , DJ Delorie Subject: [PATCH v2 3/3] math: Consolidate acosf and asinf internal tables Date: Thu, 13 Feb 2025 16:35:45 -0300 Message-ID: <20250213193737.3784065-4-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250213193737.3784065-1-adhemerval.zanella@linaro.org> References: <20250213193737.3784065-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 libm size improvement built with gcc-14, "--enable-stack-protector=strong --enable-bind-now=yes --enable-fortify-source=2": Before: 582292 844 12 583148 8e5ec aarch64-linux-gnu/math/libm.so 975133 1076 12 976221 ee55d x86_64-linux-gnu/math/libm.so 1203586 5608 368 1209562 1274da powerpc64le-linux-gnu/math/libm.so After: 581972 844 12 582828 8e4ac aarch64-linux-gnu/math/libm.so 974941 1076 12 976029 ee49d x86_64-linux-gnu/math/libm.so 1203394 5608 368 1209370 12741a powerpc64le-linux-gnu/math/libm.so Reviewed-by: Andreas K. Huettel --- math/Makefile | 1 + sysdeps/ieee754/flt-32/e_acosf.c | 19 ++--------- sysdeps/ieee754/flt-32/e_asinf.c | 19 ++--------- sysdeps/ieee754/flt-32/s_asincosf_data.c | 43 ++++++++++++++++++++++++ sysdeps/ieee754/flt-32/s_asincosf_data.h | 35 +++++++++++++++++++ 5 files changed, 85 insertions(+), 32 deletions(-) create mode 100644 sysdeps/ieee754/flt-32/s_asincosf_data.c create mode 100644 sysdeps/ieee754/flt-32/s_asincosf_data.h diff --git a/math/Makefile b/math/Makefile index 43e0e365eb..6dab60095b 100644 --- a/math/Makefile +++ b/math/Makefile @@ -368,6 +368,7 @@ type-float-routines := \ e_powf_log2_data \ e_sincoshf_data \ math_errf \ + s_asincosf_data \ s_asincoshf_data \ s_asincospif_data \ s_sincosf_data \ diff --git a/sysdeps/ieee754/flt-32/e_acosf.c b/sysdeps/ieee754/flt-32/e_acosf.c index a5a4de4fc2..820e929864 100644 --- a/sysdeps/ieee754/flt-32/e_acosf.c +++ b/sysdeps/ieee754/flt-32/e_acosf.c @@ -30,6 +30,7 @@ SOFTWARE. #include #include #include "math_config.h" +#include "s_asincosf_data.h" static __attribute__ ((noinline)) float as_special (float x) @@ -110,33 +111,19 @@ __ieee754_acosf (float x) /* accurate path */ if (ax < (0x7eu << 24)) { - static const double c[] = - { - 0x1.555555555529cp-3, 0x1.333333337e0ddp-4, 0x1.6db6db3b4465ep-5, - 0x1.f1c72e13ac306p-6, 0x1.6e89cebe06bc4p-6, 0x1.1c6dcf5289094p-6, - 0x1.c6dbbcc7c6315p-7, 0x1.8f8dc2615e996p-7, 0x1.a5833b7bf15e8p-8, - 0x1.43f44ace1665cp-6, -0x1.0fb17df881c73p-6, 0x1.07520c026b2d6p-5 - }; if (t == 0x328885a3u) return 0x1.921fb6p+0f + 0x1p-25; if (t == 0x39826222u) return 0x1.920f6ap+0f + 0x1p-25; double x2 = xs * xs; - r = (pi2 - xs) - (xs * x2) * poly12 (x2, c); + r = (pi2 - xs) - (xs * x2) * poly12 (x2, C0); } else { - static const double c[] = - { - 0x1.6a09e667f3bcbp+0, 0x1.e2b7dddff2db9p-4, 0x1.b27247ab42dbcp-6, - 0x1.02995cc4e0744p-7, 0x1.5ffb0276ec8eap-9, 0x1.033885a928decp-10, - 0x1.911f2be23f8c7p-12, 0x1.4c3c55d2437fdp-13, 0x1.af477e1d7b461p-15, - 0x1.abd6bdff67dcbp-15, -0x1.1717e86d0fa28p-16, 0x1.6ff526de46023p-16 - }; double bx = fabs (xs); double z = 1.0 - bx; double s = copysign (sqrt (z), xs); - r = o[t >> 31] + s * poly12 (z, c); + r = o[t >> 31] + s * poly12 (z, C1); } return r; } diff --git a/sysdeps/ieee754/flt-32/e_asinf.c b/sysdeps/ieee754/flt-32/e_asinf.c index 944bf6f5ce..c6972d2122 100644 --- a/sysdeps/ieee754/flt-32/e_asinf.c +++ b/sysdeps/ieee754/flt-32/e_asinf.c @@ -28,6 +28,7 @@ SOFTWARE. #include #include #include "math_config.h" +#include "s_asincosf_data.h" static __attribute__ ((noinline)) float as_special (float x) @@ -95,16 +96,9 @@ __ieee754_asinf (float x) } if (ax < (0x7eu << 24)) { - static const double c[] = - { - 0x1.555555555529cp-3, 0x1.333333337e0ddp-4, 0x1.6db6db3b4465ep-5, - 0x1.f1c72e13ac306p-6, 0x1.6e89cebe06bc4p-6, 0x1.1c6dcf5289094p-6, - 0x1.c6dbbcc7c6315p-7, 0x1.8f8dc2615e996p-7, 0x1.a5833b7bf15e8p-8, - 0x1.43f44ace1665cp-6, -0x1.0fb17df881c73p-6, 0x1.07520c026b2d6p-5 - }; double z = xs; double z2 = z * z; - double c0 = poly12 (z2, c); + double c0 = poly12 (z2, C0); r = z + (z * z2) * c0; } else @@ -116,14 +110,7 @@ __ieee754_asinf (float x) double bx = fabs (xs); double z = 1.0 - bx; double s = sqrt (z); - static const double c[] = - { - 0x1.6a09e667f3bcbp+0, 0x1.e2b7dddff2db9p-4, 0x1.b27247ab42dbcp-6, - 0x1.02995cc4e0744p-7, 0x1.5ffb0276ec8eap-9, 0x1.033885a928decp-10, - 0x1.911f2be23f8c7p-12, 0x1.4c3c55d2437fdp-13, 0x1.af477e1d7b461p-15, - 0x1.abd6bdff67dcbp-15, -0x1.1717e86d0fa28p-16, 0x1.6ff526de46023p-16 - }; - r = pi2 - s * poly12 (z, c); + r = pi2 - s * poly12 (z, C1); r = copysign (r, xs); } return r; diff --git a/sysdeps/ieee754/flt-32/s_asincosf_data.c b/sysdeps/ieee754/flt-32/s_asincosf_data.c new file mode 100644 index 0000000000..0399ecc975 --- /dev/null +++ b/sysdeps/ieee754/flt-32/s_asincosf_data.c @@ -0,0 +1,43 @@ +/* Common data for asinf/acosf implementations. + +Copyright (c) 2023-2024 Alexei Sibidanov. + +The original version of this file was copied from the CORE-MATH +project (file src/binary32/asin/asinf.c, revision bc385c2). + +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. + +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. +*/ + +#include "s_asincosf_data.h" + +const double __asincosf_c0[] = + { + 0x1.555555555529cp-3, 0x1.333333337e0ddp-4, 0x1.6db6db3b4465ep-5, + 0x1.f1c72e13ac306p-6, 0x1.6e89cebe06bc4p-6, 0x1.1c6dcf5289094p-6, + 0x1.c6dbbcc7c6315p-7, 0x1.8f8dc2615e996p-7, 0x1.a5833b7bf15e8p-8, + 0x1.43f44ace1665cp-6, -0x1.0fb17df881c73p-6, 0x1.07520c026b2d6p-5 + }; + +const double __asincosf_c1[] = + { + 0x1.6a09e667f3bcbp+0, 0x1.e2b7dddff2db9p-4, 0x1.b27247ab42dbcp-6, + 0x1.02995cc4e0744p-7, 0x1.5ffb0276ec8eap-9, 0x1.033885a928decp-10, + 0x1.911f2be23f8c7p-12, 0x1.4c3c55d2437fdp-13, 0x1.af477e1d7b461p-15, + 0x1.abd6bdff67dcbp-15, -0x1.1717e86d0fa28p-16, 0x1.6ff526de46023p-16 + }; diff --git a/sysdeps/ieee754/flt-32/s_asincosf_data.h b/sysdeps/ieee754/flt-32/s_asincosf_data.h new file mode 100644 index 0000000000..c3f9ed5a27 --- /dev/null +++ b/sysdeps/ieee754/flt-32/s_asincosf_data.h @@ -0,0 +1,35 @@ +/* Common data for asinf/acosf implementations. + +Copyright (c) 2023-2024 Alexei Sibidanov. + +The original version of this file was copied from the CORE-MATH +project (file src/binary32/asin/asinf.c, revision bc385c2). + +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. + +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. +*/ + +#ifndef _S_ASINCOSF_DATA_H +#define _S_ASINCOSF_DATA_H + +extern const double __asincosf_c0[] attribute_hidden; +#define C0 __asincosf_c0 +extern const double __asincosf_c1[] attribute_hidden; +#define C1 __asincosf_c1 + +#endif