From patchwork Tue Sep 26 13:22:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wilco Dijkstra X-Patchwork-Id: 818641 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-84960-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="LwMkFLyj"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3y1hSv4lcxz9tXn for ; Tue, 26 Sep 2017 23:22:23 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id :content-type:content-transfer-encoding:mime-version; q=dns; s= default; b=oxXL671iHMl1YSqbZudaL9POxPjJNSkQin0bpms5fdgBqGLcxlsxf 9eX5WW2v1fE+zIxSfSv/mhRocIikc7nd9O7wavx23rq/xFn+UzbCmMO3M/W2wEMI gTH5RC4V1uiNd2ypejGaieUk2NI4VBw0SdFHQjh4AShW6pCjx/s0B8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id :content-type:content-transfer-encoding:mime-version; s=default; bh=UGsixz474uD7sRd2XyQSeg5AOsI=; b=LwMkFLyjDiLjjC5AcdppvbsEFKcp A5PT9VQQG8XHSv8ee2EkaqY6dyUmKQmpfnYiVPBab28Zcuzo9Cg6sRDCT1ALb10y yv4d4g7bgq1CcMN76hHTG8M/fAMyGQIBoPsXfdAW4MTNXfONk0U96xNgwmYlZA09 TsnfM0EjzT6Zn6U= Received: (qmail 60061 invoked by alias); 26 Sep 2017 13:22:17 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 60048 invoked by uid 89); 26 Sep 2017 13:22:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LOTSOFHASH, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:4052 X-HELO: EUR03-VE1-obe.outbound.protection.outlook.com From: Wilco Dijkstra To: "libc-alpha@sourceware.org" CC: nd Subject: [PATCH 1/3] Cleanup __ieee754_sqrt(f/l) Date: Tue, 26 Sep 2017 13:22:10 +0000 Message-ID: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Wilco.Dijkstra@arm.com; x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB6PR0801MB2053; 6:Q0uKedh6+sQ+4fPWAgSGdAn7nf5QiOv59EfcOSym4lmTxS7WRfsSPCyuPeYqm1zZeepWfwirUi0gaQiaO0tEJz5Jkw7E5R50CTtW6LFDVq7IYXoVCgO4Bi5ldLjYAJFbOtwYECJ4Mt5HZgyni5MtTc+qScBBEVbVjPSdIAL8XNKtJsLIe8/jMEG77s6Lzu7dw+rbEJ7Qx14NJOQwCCa11Z6t+f+HLHOkVymzB/zWvDYyEa0iCZXPC7vWJ12qnTYAACcKcpTMZezHREbBX+ScNWRohg8elmJDD2/Hkj2uz4UFrZ6DWQ5YKK+ThLITs6OYONrPHuTznZiw3DLnIJvwpA==; 5:/ToSJKz7HB28LvoWG1qsKhROfaqg0mVJZLcfDRIIU93FyCJjLXBQOO1XbUEsy4VHTwoMT9IPB4dIxaADQLjRlXmFVJKiYu9IRSrw4q7p14ixqW/zsLqybbqZ4HeBmyDgOhdM7kvSktxl4gmNoigH7Q==; 24:fJTRq6NrNnqKxE5fBcZxtvsfa6uV+UmyeOU7GVddhG3zVtzZw1D/Jk9ja3ElMAn2TEGnwakdcORIlg9YGlGcHzC0reguW4X1D3EFLeCK4WU=; 7:dzztTpvgSxgQtQnDfTcmLK81/xt2H+2rYuWRjPurhEvWmZ4iJuxXVUCqpq38GOvLRcRtZIMqu6FRPU/OY/L9vGuscpAJ3z9sf1Cq5rtjK+oLbm/M42qtSkU1P9xsEiXYk3b+jpTWXq5gGeYKK08g8Rv6lu4i5lOgNYVqED0JEPe4gaZNVwt4+XH6ENZs3Fx3kbA2XjEE/Kj0wURJTfbHmukx3zWBYVma500A+zUHcLk= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: f69ba911-eb98-4587-b3ee-08d504e197c8 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(48565401081)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:DB6PR0801MB2053; x-ms-traffictypediagnostic: DB6PR0801MB2053: nodisclaimer: True x-exchange-antispam-report-test: UriScan:(250305191791016)(180628864354917)(22074186197030); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(10201501046)(3002001)(93006095)(93001095)(100000703101)(100105400095)(6055026)(6041248)(20161123558100)(20161123555025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DB6PR0801MB2053; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DB6PR0801MB2053; x-forefront-prvs: 0442E569BC x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(346002)(39860400002)(377424004)(54534003)(199003)(189002)(6116002)(55016002)(2501003)(316002)(575784001)(72206003)(99286003)(74316002)(50986999)(54356999)(68736007)(25786009)(8936002)(2900100001)(5250100002)(81166006)(8676002)(305945005)(97736004)(106356001)(7736002)(101416001)(81156014)(33656002)(3660700001)(2351001)(66066001)(478600001)(86362001)(105586002)(2906002)(3280700002)(6436002)(6506006)(5640700003)(189998001)(9686003)(53936002)(14454004)(6916009)(5660300001)(7696004)(4326008)(102836003)(3846002)(6306002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR0801MB2053; H:DB6PR0801MB2053.eurprd08.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Sep 2017 13:22:10.2208 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0801MB2053 This patch series cleans up the many uses of __ieee754_sqrt(f/l) in GLIBC. The goal is to enable GCC to do the inlining, and if this fails call the __ieee754_sqrt function. This is done by internally declaring sqrt with asm redirects. The compat symbols and sqrt wrappers need to disable the redirect. This means targets are no longer forced to add a special inline for sqrt. All math functions (but not math tests) are built with -fno-math-errno which means GCC will inline sqrt as a single instruction. ChangeLog: 2017-09-25 Wilco Dijkstra * include/math.h (sqrt): Declare with asm redirect. (sqrtf): Likewise. (sqrtl): Likewise. * math/Makefile: Add -fno-math-errno, but build tests with -fmath-errno. * math/w_sqrt_compat.c: Define NO_SQRT_REDIRECT. * math/w_sqrt_template.c: Likewise. * math/w_sqrtf_compat.c: Likewise. * math/w_sqrtl_compat.c: Likewise. diff --git a/include/math.h b/include/math.h index fe3ed1378d19faf572b48347b41501d9ec0925b5..e176b090caa9f07c226aff0f9c6c5bf34740f2ec 100644 --- a/include/math.h +++ b/include/math.h @@ -55,5 +55,15 @@ libm_hidden_proto (__expf128) libm_hidden_proto (__expm1f128) # endif +# ifndef NO_SQRT_REDIRECT +/* Declare sqrt for use within GLIBC. Sqrt will typically inline into a + single instruction. Use an asm to avoid use of PLTs if it doesn't. */ +float sqrtf (float) asm ("__ieee754_sqrtf"); +double sqrt (double) asm ("__ieee754_sqrt"); +# ifndef __NO_LONG_DOUBLE_MATH +long double sqrtl (long double) asm ("__ieee754_sqrtl"); +# endif +# endif + #endif #endif diff --git a/math/Makefile b/math/Makefile index 04586156f8050222b2aedcebc30dab7153a1b6b1..ad65dd7677dd3c6a91fb2f393e5ca43769f3ddec 100644 --- a/math/Makefile +++ b/math/Makefile @@ -500,6 +500,12 @@ endef object-suffixes-left := $(types) include $(o-iterator) +define o-iterator-doit +$(objpfx)$(o).o: CFLAGS += -fmath-errno +endef +object-suffixes-left := $(tests) $(tests-internal) +include $(o-iterator) + # Run the math programs to automatically generate ULPs files. .PHONY: regen-ulps @@ -547,6 +553,8 @@ include $(o-iterator) # only the fdlibm code. math-CPPFLAGS += -D__NO_MATH_INLINES -D__LIBC_INTERNAL_MATH_INLINES +config-extra-cflags += -fno-math-errno + ifneq ($(long-double-fcts),yes) # The `double' and `long double' types are the same on this machine. # We won't compile the `long double' code at all. Tell the `double' code diff --git a/math/w_sqrt_compat.c b/math/w_sqrt_compat.c index 3280d2fbb86af2aeaf6e686fd38579b209c901aa..fe068af9597ffb0f15b32cd454b4c34ba8bc060e 100644 --- a/math/w_sqrt_compat.c +++ b/math/w_sqrt_compat.c @@ -16,6 +16,7 @@ License along with the GNU C Library; if not, see . */ +#define NO_SQRT_REDIRECT #include #include #include diff --git a/math/w_sqrt_template.c b/math/w_sqrt_template.c index 5fae302382d10e9b05df2665c9cb05126cd62f02..235c263e60c85422e41bca7c817148b66030438f 100644 --- a/math/w_sqrt_template.c +++ b/math/w_sqrt_template.c @@ -21,6 +21,7 @@ for each floating-point type. */ #if __USE_WRAPPER_TEMPLATE +#define NO_SQRT_REDIRECT # include # include # include diff --git a/math/w_sqrtf_compat.c b/math/w_sqrtf_compat.c index 6c8c7e3857c7dacf52de6b575a2386095688b5dc..880be0936d9a20f9aa75cf2d66000f0c621f090f 100644 --- a/math/w_sqrtf_compat.c +++ b/math/w_sqrtf_compat.c @@ -16,6 +16,7 @@ License along with the GNU C Library; if not, see . */ +#define NO_SQRT_REDIRECT #include #include #include diff --git a/math/w_sqrtl_compat.c b/math/w_sqrtl_compat.c index 0590f6d155fee27d41bfd42c1dbdf19c381ba1c8..bff77fd31bf2c62394e0d54e6b2e7bc9296226d6 100644 --- a/math/w_sqrtl_compat.c +++ b/math/w_sqrtl_compat.c @@ -16,6 +16,7 @@ License along with the GNU C Library; if not, see . */ +#define NO_SQRT_REDIRECT #include #include #include From patchwork Tue Sep 26 13:23:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wilco Dijkstra X-Patchwork-Id: 818642 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-84961-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="EZDA4kgA"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3y1hWg51dPz9tXH for ; Tue, 26 Sep 2017 23:24:47 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id :content-type:content-transfer-encoding:mime-version; q=dns; s= default; b=jRRi4r7p85OZv/7h+ROW3PFxEOPgALP7W8rHHXYQbEg5hnqlVJeFx ty7y7r9+2CTRFALodZJEpjprTRuX2WYq5wt5vVjHlZzSv2WklJiHGeEOB1aMQpx/ kaZAh3ymMu6zJ6gQJ3fm3KMikVsjAwYKsQ14Ykn2qp1Ig28sECbXKU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id :content-type:content-transfer-encoding:mime-version; s=default; bh=kC0xBpe2TuL3X9WiWIOy+8P5jYk=; b=EZDA4kgAStW8sIc2poQ617na+RsI N8TTwkjI0YRiU5iQcOIIQzWzX3RtZ59gcNXPZ+9mORhWJtts8g+C6bURUXNqBfjI EFXWrXPojuJD6WQ2F56ENBRP+DVlVrbxBK5YjThN1rmLgcs1UBpNPC+tG7ISpgWr s4MlEEx61aZafwM= Received: (qmail 77803 invoked by alias); 26 Sep 2017 13:24:37 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 72669 invoked by uid 89); 26 Sep 2017 13:24:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LOTSOFHASH, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 spammy=shi, tone, slo, ps2 X-HELO: EUR03-VE1-obe.outbound.protection.outlook.com From: Wilco Dijkstra To: "libc-alpha@sourceware.org" CC: nd Subject: [PATCH 2/3] Cleanup __ieee754_sqrt(f/l) Date: Tue, 26 Sep 2017 13:23:58 +0000 Message-ID: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Wilco.Dijkstra@arm.com; x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB6PR0801MB2053; 6:i+23m26/82LkajccynSrO7QiLcKViCt6sJTyqhzOsTqFQOUad7RmLgA7UtPiEizLcWUrLZ+0q7GgxRL67gLAidzNiu7cA4zPtHHekgvW5Nwcf98RH25/jM7HkDHRgZnQureGzR6p9DXfjXn4ZNDmInki5D8wootFmPmeBYvXN9pCcYHz2ITRYGWwU2ACDrHAuDnQwo/sKtd1/epTP9fccPo0pDiy7Auet0gkqxkWjzcF3OLf9MYtl2atvdgyQvUwjRYDTtQgunCI18WkzvD6RWugLidqaS05G/aCCmBKH8Vgf4lyW2lLQosinrLN14xL8K3JC7nIPT0Obeue9IMw6w==; 5:ohj+PMjw1bSOA3KCzqGVXAACW+HRomawY2QvpVIfwFD3bWEfYjDU2OYD7b9+K6hHNarUeTiqYPI2ukP36zCvhIOXW37pL3fSGEXLt47uMIbu1fU/MsXuoMGGdB/r3MZbUBnchpIz+aYSDhp2ZWjAmg==; 24:v9uCrMh6qSWRxqFxpxwk63lo452gvl1bODrnWpmBOTfjd5mCXKqkJ+HKtdQwvkTUlyg4l97REYtIHC2Uoew2y+pFyQqS6cDZE2rjuKXQGU0=; 7:DSescLHy/1Dbw6O8b+LPKFfNSpJfq1uDfGoS3nucl+BwyhGHfQXpTgpUDwsskUw6iQ6XwEmL4Ix16qj/I6TnqvwFS3rNu29mgMMwS/skW5aCdxj27buItc6rrlDHoUQQLGZGa1yroFnwJB71u90bYRBWo+OHJk7G9FpNg+rGFKaTskJOKdT6qTiF+ZO+5c6axg2vrQSZf2m7mE6lPf+RKrbTNpi7hjNaVSiCgn23kAU= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: 28a3bee1-24d5-4374-1d54-08d504e1d840 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(48565401081)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:DB6PR0801MB2053; x-ms-traffictypediagnostic: DB6PR0801MB2053: nodisclaimer: True x-exchange-antispam-report-test: UriScan:(180628864354917); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(10201501046)(3002001)(93006095)(93001095)(100000703101)(100105400095)(6055026)(6041248)(20161123558100)(20161123555025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DB6PR0801MB2053; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DB6PR0801MB2053; x-forefront-prvs: 0442E569BC x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(346002)(39860400002)(377424004)(54534003)(199003)(189002)(6116002)(55016002)(2501003)(316002)(575784001)(72206003)(99286003)(74316002)(50986999)(54356999)(68736007)(25786009)(8936002)(2900100001)(5250100002)(81166006)(8676002)(305945005)(97736004)(106356001)(7736002)(101416001)(81156014)(33656002)(3660700001)(2351001)(66066001)(478600001)(86362001)(105586002)(2906002)(3280700002)(6436002)(6506006)(5640700003)(189998001)(53946003)(9686003)(53936002)(14454004)(16200700003)(6916009)(5660300001)(7696004)(4326008)(102836003)(3846002)(11771545001)(559001)(569006); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR0801MB2053; H:DB6PR0801MB2053.eurprd08.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Sep 2017 13:23:58.3620 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0801MB2053 Rename all calls to __ieee754_sqrt(f/l) to sqrt(f/l) to enable inlining by GCC. ChangeLog: 2017-09-25 Wilco Dijkstra * math/w_sqrt_compat.c (__sqrt): Call __builtin_sqrt. * math/w_sqrtf_compat.c (__sqrtf): Call __builtin_sqrtf. * sysdeps/aarch64/fpu/e_sqrt.c (__ieee754_sqrt): Call __builtin_sqrt. * sysdeps/aarch64/fpu/e_sqrtf.c (__ieee754_sqrtf): Call __builtin_sqrtf. * sysdeps/ieee754/dbl-64/e_acosh.c (__ieee754_acosh): Use sqrt. * sysdeps/ieee754/dbl-64/e_gamma_r.c (gamma_positive): Likewise. * sysdeps/ieee754/dbl-64/e_hypot.c (__ieee754_hypot): Likewise. * sysdeps/ieee754/dbl-64/e_j0.c (__ieee754_j0): Likewise. * sysdeps/ieee754/dbl-64/e_j1.c (__ieee754_j1): Likewise. * sysdeps/ieee754/dbl-64/e_jn.c (__ieee754_jn): Likewise. * sysdeps/ieee754/dbl-64/halfulp.c (__halfulp): Likewise. * sysdeps/ieee754/dbl-64/s_asinh.c (__asinh): Likewise. * sysdeps/ieee754/dbl-64/wordsize-64/e_acosh.c (__ieee754_acosh): Likewise. * sysdeps/ieee754/flt-32/e_acosf.c (__ieee754_acosf): Likewise. * sysdeps/ieee754/flt-32/e_acoshf.c (__ieee754_acoshf): Likewise. * sysdeps/ieee754/flt-32/e_asinf.c (__ieee754_asinf): Likewise. * sysdeps/ieee754/flt-32/e_gammaf_r.c (gammaf_positive): Likewise. * sysdeps/ieee754/flt-32/e_hypotf.c (__ieee754_hypotf): Likewise. * sysdeps/ieee754/flt-32/e_j0f.c (__ieee754_j0f): Likewise. * sysdeps/ieee754/flt-32/e_j1f.c (__ieee754_j1f): Likewise. * sysdeps/ieee754/flt-32/e_powf.c (__ieee754_powf): Likewise. * sysdeps/ieee754/flt-32/s_asinhf.c (__asinhf): Likewise. * sysdeps/ieee754/ldbl-128/e_acoshl.c (__ieee754_acoshl): Use sqrtl. * sysdeps/ieee754/ldbl-128/e_acosl.c (__ieee754_acosl): Likewise. * sysdeps/ieee754/ldbl-128/e_asinl.c (__ieee754_asinl): Likewise. * sysdeps/ieee754/ldbl-128/e_gammal_r.c (gammal_positive): Likewise. * sysdeps/ieee754/ldbl-128/e_hypotl.c (__ieee754_hypotl): Likewise. * sysdeps/ieee754/ldbl-128/e_j0l.c (__ieee754_j0l): Likewise. * sysdeps/ieee754/ldbl-128/e_j1l.c (__ieee754_j1l): Likewise. * sysdeps/ieee754/ldbl-128/e_jnl.c (__ieee754_jnl): Likewise. * sysdeps/ieee754/ldbl-128/e_powl.c (__ieee754_powl): Likewise. * sysdeps/ieee754/ldbl-128/s_asinhl.c (__ieee754_asinhl): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_acoshl.c (__ieee754_acoshl): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_acosl.c (__ieee754_acosl): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_asinl.c (__ieee754_asinl): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c (gammal_positive): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_hypotl.c (__ieee754_hypotl): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_j0l.c (__ieee754_j0l): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_j1l.c (__ieee754_j1l): Likewise * sysdeps/ieee754/ldbl-128ibm/e_jnl.c (__ieee754_jnl): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_powl.c (__ieee754_powl): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_asinhl.c (__ieee754_asinhl): Likewise. * sysdeps/ieee754/ldbl-96/e_acoshl.c (__ieee754_acoshl): Use sqrtl. * sysdeps/ieee754/ldbl-96/e_asinl.c (__ieee754_asinl): Likewise. * sysdeps/ieee754/ldbl-96/e_gammal_r.c (gammal_positive): Likewise. * sysdeps/ieee754/ldbl-96/e_hypotl.c (__ieee754_hypotl): Likewise. * sysdeps/ieee754/ldbl-96/e_j0l.c (__ieee754_j0l): Likewise. * sysdeps/ieee754/ldbl-96/e_j1l.c (__ieee754_j1l): Likewise. * sysdeps/ieee754/ldbl-96/e_jnl.c (__ieee754_jnl): Likewise. * sysdeps/ieee754/ldbl-96/s_asinhl.c (__ieee754_asinhl): Likewise. * sysdeps/m68k/m680x0/fpu/e_pow.c (__ieee754_pow): Likewise. * sysdeps/powerpc/fpu/e_hypot.c (__ieee754_hypot): Likewise. * sysdeps/powerpc/fpu/e_hypotf.c (__ieee754_hypotf): Likewise. diff --git a/sysdeps/aarch64/fpu/e_sqrt.c b/sysdeps/aarch64/fpu/e_sqrt.c index f984d877b64eea72e23b8c099c41923bf60911f7..b80ac272611ebf8d4959f366ea7e5e8207ddbe22 100644 --- a/sysdeps/aarch64/fpu/e_sqrt.c +++ b/sysdeps/aarch64/fpu/e_sqrt.c @@ -21,8 +21,6 @@ double __ieee754_sqrt (double d) { - double res; - asm ("fsqrt %d0, %d1" : "=w" (res) : "w" (d)); - return res; + return __builtin_sqrt (d); } strong_alias (__ieee754_sqrt, __sqrt_finite) diff --git a/sysdeps/aarch64/fpu/e_sqrtf.c b/sysdeps/aarch64/fpu/e_sqrtf.c index 67707ef83374fdb2b330d0c9b0cfb8770036a98b..73804542c812f28de96ce68a6fe64f44284856eb 100644 --- a/sysdeps/aarch64/fpu/e_sqrtf.c +++ b/sysdeps/aarch64/fpu/e_sqrtf.c @@ -21,8 +21,6 @@ float __ieee754_sqrtf (float s) { - float res; - asm ("fsqrt %s0, %s1" : "=w" (res) : "w" (s)); - return res; + return __builtin_sqrtf (s); } strong_alias (__ieee754_sqrtf, __sqrtf_finite) diff --git a/sysdeps/ieee754/dbl-64/e_acosh.c b/sysdeps/ieee754/dbl-64/e_acosh.c index 51916f221aa3a4babecef05f93d7bc158e9f78cd..fe0c375f00428db93abd5db02be3b3be6940bda5 100644 --- a/sysdeps/ieee754/dbl-64/e_acosh.c +++ b/sysdeps/ieee754/dbl-64/e_acosh.c @@ -58,12 +58,12 @@ __ieee754_acosh (double x) else if (hx > 0x40000000) /* 2**28 > x > 2 */ { t = x * x; - return __ieee754_log (2.0 * x - one / (x + __ieee754_sqrt (t - one))); + return __ieee754_log (2.0 * x - one / (x + sqrt (t - one))); } else /* 1 0x48000000) - z = (invsqrtpi * cc) / __ieee754_sqrt (x); + z = (invsqrtpi * cc) / sqrt (x); else { u = pzero (x); v = qzero (x); - z = invsqrtpi * (u * cc - v * ss) / __ieee754_sqrt (x); + z = invsqrtpi * (u * cc - v * ss) / sqrt (x); } return z; } @@ -200,11 +200,11 @@ __ieee754_y0 (double x) ss = z / cc; } if (ix > 0x48000000) - z = (invsqrtpi * ss) / __ieee754_sqrt (x); + z = (invsqrtpi * ss) / sqrt (x); else { u = pzero (x); v = qzero (x); - z = invsqrtpi * (u * ss + v * cc) / __ieee754_sqrt (x); + z = invsqrtpi * (u * ss + v * cc) / sqrt (x); } return z; } diff --git a/sysdeps/ieee754/dbl-64/e_j1.c b/sysdeps/ieee754/dbl-64/e_j1.c index eb446fd102d91f9ab98f9ed979569e7ede7e876e..b528998b32cde8eacb86c2c79ef5150579450f85 100644 --- a/sysdeps/ieee754/dbl-64/e_j1.c +++ b/sysdeps/ieee754/dbl-64/e_j1.c @@ -112,11 +112,11 @@ __ieee754_j1 (double x) * y1(x) = 1/sqrt(pi) * (P(1,x)*ss + Q(1,x)*cc) / sqrt(x) */ if (ix > 0x48000000) - z = (invsqrtpi * cc) / __ieee754_sqrt (y); + z = (invsqrtpi * cc) / sqrt (y); else { u = pone (y); v = qone (y); - z = invsqrtpi * (u * cc - v * ss) / __ieee754_sqrt (y); + z = invsqrtpi * (u * cc - v * ss) / sqrt (y); } if (hx < 0) return -z; @@ -203,11 +203,11 @@ __ieee754_y1 (double x) * to compute the worse one. */ if (ix > 0x48000000) - z = (invsqrtpi * ss) / __ieee754_sqrt (x); + z = (invsqrtpi * ss) / sqrt (x); else { u = pone (x); v = qone (x); - z = invsqrtpi * (u * ss + v * cc) / __ieee754_sqrt (x); + z = invsqrtpi * (u * ss + v * cc) / sqrt (x); } return z; } diff --git a/sysdeps/ieee754/dbl-64/e_jn.c b/sysdeps/ieee754/dbl-64/e_jn.c index 3ac91df2b0795855c1f7f38d8812fdd6fb00c561..d829ff7c102812cd7cb78772ff947c7504bb261c 100644 --- a/sysdeps/ieee754/dbl-64/e_jn.c +++ b/sysdeps/ieee754/dbl-64/e_jn.c @@ -107,7 +107,7 @@ __ieee754_jn (int n, double x) case 2: temp = -c - s; break; case 3: temp = c - s; break; } - b = invsqrtpi * temp / __ieee754_sqrt (x); + b = invsqrtpi * temp / sqrt (x); } else { @@ -314,7 +314,7 @@ __ieee754_yn (int n, double x) case 2: temp = -s + c; break; case 3: temp = s + c; break; } - b = invsqrtpi * temp / __ieee754_sqrt (x); + b = invsqrtpi * temp / sqrt (x); } else { diff --git a/sysdeps/ieee754/dbl-64/halfulp.c b/sysdeps/ieee754/dbl-64/halfulp.c index d5f8a010e280bbaf383f80a2b50f04184f58c08f..64ba3474ae5ca42e09fbd71e156b0a03bfdd7a2e 100644 --- a/sysdeps/ieee754/dbl-64/halfulp.c +++ b/sysdeps/ieee754/dbl-64/halfulp.c @@ -113,7 +113,7 @@ __halfulp (double x, double y) /* now treat x */ while (k > 0) { - z = __ieee754_sqrt (x); + z = sqrt (x); EMULV (z, z, u, uu, j1, j2, j3, j4, j5); if (((u - x) + uu) != 0) break; diff --git a/sysdeps/ieee754/dbl-64/s_asinh.c b/sysdeps/ieee754/dbl-64/s_asinh.c index 9193301b5ebbcdd283ab814e9ff930f2a3d35f2f..593f588bee7717a14fab725a70ef311894d7cc92 100644 --- a/sysdeps/ieee754/dbl-64/s_asinh.c +++ b/sysdeps/ieee754/dbl-64/s_asinh.c @@ -54,13 +54,13 @@ __asinh (double x) double xa = fabs (x); if (ix > 0x40000000) /* 2**28 > |x| > 2.0 */ { - w = __ieee754_log (2.0 * xa + one / (__ieee754_sqrt (xa * xa + one) + + w = __ieee754_log (2.0 * xa + one / (sqrt (xa * xa + one) + xa)); } else /* 2.0 > |x| > 2**-28 */ { double t = xa * xa; - w = __log1p (xa + t / (one + __ieee754_sqrt (one + t))); + w = __log1p (xa + t / (one + sqrt (one + t))); } } return __copysign (w, x); diff --git a/sysdeps/ieee754/dbl-64/wordsize-64/e_acosh.c b/sysdeps/ieee754/dbl-64/wordsize-64/e_acosh.c index ccccdaf106d0bf5dc90c32fa5c5f873e3893bf42..0af05a02221f8a86cc91265b1edda70b59b7bb30 100644 --- a/sysdeps/ieee754/dbl-64/wordsize-64/e_acosh.c +++ b/sysdeps/ieee754/dbl-64/wordsize-64/e_acosh.c @@ -51,13 +51,13 @@ __ieee754_acosh (double x) /* 2**28 > x > 2 */ double t = x * x; - return __ieee754_log (2.0 * x - one / (x + __ieee754_sqrt (t - one))); + return __ieee754_log (2.0 * x - one / (x + sqrt (t - one))); } else if (__glibc_likely (hx > INT64_C (0x3ff0000000000000))) { /* 1 0.5 */ int32_t idf; z = (one-x)*(float)0.5; - s = __ieee754_sqrtf(z); + s = sqrtf(z); df = s; GET_FLOAT_WORD(idf,df); SET_FLOAT_WORD(df,idf&0xfffff000); diff --git a/sysdeps/ieee754/flt-32/e_acoshf.c b/sysdeps/ieee754/flt-32/e_acoshf.c index aabfb85df7d490ac1a8951b99246cd54e9460d27..49e64f3c43f0e5e37232dbcf8a38e7ab0c357453 100644 --- a/sysdeps/ieee754/flt-32/e_acoshf.c +++ b/sysdeps/ieee754/flt-32/e_acoshf.c @@ -40,10 +40,10 @@ float __ieee754_acoshf(float x) return 0.0; /* acosh(1) = 0 */ } else if (hx > 0x40000000) { /* 2**28 > x > 2 */ t=x*x; - return __ieee754_logf((float)2.0*x-one/(x+__ieee754_sqrtf(t-one))); + return __ieee754_logf((float)2.0*x-one/(x+sqrtf(t-one))); } else { /* 1=0x3F79999A) { /* if |x| > 0.975 */ t = pio2_hi-(2.0f*(s+s*p)-pio2_lo); } else { diff --git a/sysdeps/ieee754/flt-32/e_gammaf_r.c b/sysdeps/ieee754/flt-32/e_gammaf_r.c index 83f1a1bf03b9962e34bb0840ada92f4175052240..673d64a2a1999505e5c281b3b7e3d8ede097b056 100644 --- a/sysdeps/ieee754/flt-32/e_gammaf_r.c +++ b/sysdeps/ieee754/flt-32/e_gammaf_r.c @@ -91,7 +91,7 @@ gammaf_positive (float x, int *exp2_adj) float ret = (__ieee754_powf (x_adj_mant, x_adj) * __ieee754_exp2f (x_adj_log2 * x_adj_frac) * __ieee754_expf (-x_adj) - * __ieee754_sqrtf (2 * (float) M_PI / x_adj) + * sqrtf (2 * (float) M_PI / x_adj) / prod); exp_adj += x_eps * __ieee754_logf (x_adj); float bsum = gamma_coeff[NCOEFF - 1]; diff --git a/sysdeps/ieee754/flt-32/e_hypotf.c b/sysdeps/ieee754/flt-32/e_hypotf.c index fda2651a846815e70631c1f9fe66be1a7561e540..5336876cf4cbb8d684dcd3510b7e8585aef7524a 100644 --- a/sysdeps/ieee754/flt-32/e_hypotf.c +++ b/sysdeps/ieee754/flt-32/e_hypotf.c @@ -40,6 +40,6 @@ __ieee754_hypotf(float x, float y) d_x = (double) x; d_y = (double) y; - return (float) __ieee754_sqrt(d_x * d_x + d_y * d_y); + return (float) sqrt(d_x * d_x + d_y * d_y); } strong_alias (__ieee754_hypotf, __hypotf_finite) diff --git a/sysdeps/ieee754/flt-32/e_j0f.c b/sysdeps/ieee754/flt-32/e_j0f.c index b783dd069dded429fa41ce8c4a93df6544797ab6..105965d06cf46ff7de0de45254537cb727595fe6 100644 --- a/sysdeps/ieee754/flt-32/e_j0f.c +++ b/sysdeps/ieee754/flt-32/e_j0f.c @@ -58,10 +58,10 @@ __ieee754_j0f(float x) * j0(x) = 1/sqrt(pi) * (P(0,x)*cc - Q(0,x)*ss) / sqrt(x) * y0(x) = 1/sqrt(pi) * (P(0,x)*ss + Q(0,x)*cc) / sqrt(x) */ - if(ix>0x48000000) z = (invsqrtpi*cc)/__ieee754_sqrtf(x); + if(ix>0x48000000) z = (invsqrtpi*cc)/sqrtf(x); else { u = pzerof(x); v = qzerof(x); - z = invsqrtpi*(u*cc-v*ss)/__ieee754_sqrtf(x); + z = invsqrtpi*(u*cc-v*ss)/sqrtf(x); } return z; } @@ -131,10 +131,10 @@ __ieee754_y0f(float x) if ((s*c)0x48000000) z = (invsqrtpi*ss)/__ieee754_sqrtf(x); + if(ix>0x48000000) z = (invsqrtpi*ss)/sqrtf(x); else { u = pzerof(x); v = qzerof(x); - z = invsqrtpi*(u*ss+v*cc)/__ieee754_sqrtf(x); + z = invsqrtpi*(u*ss+v*cc)/sqrtf(x); } return z; } diff --git a/sysdeps/ieee754/flt-32/e_j1f.c b/sysdeps/ieee754/flt-32/e_j1f.c index 805a87d85b732b9d30d3b79464e039df2b8e832b..95f03d15c5a6e558ab7f3e6f1b1869342c5c0b0e 100644 --- a/sysdeps/ieee754/flt-32/e_j1f.c +++ b/sysdeps/ieee754/flt-32/e_j1f.c @@ -61,10 +61,10 @@ __ieee754_j1f(float x) * j1(x) = 1/sqrt(pi) * (P(1,x)*cc - Q(1,x)*ss) / sqrt(x) * y1(x) = 1/sqrt(pi) * (P(1,x)*ss + Q(1,x)*cc) / sqrt(x) */ - if(ix>0x48000000) z = (invsqrtpi*cc)/__ieee754_sqrtf(y); + if(ix>0x48000000) z = (invsqrtpi*cc)/sqrtf(y); else { u = ponef(y); v = qonef(y); - z = invsqrtpi*(u*cc-v*ss)/__ieee754_sqrtf(y); + z = invsqrtpi*(u*cc-v*ss)/sqrtf(y); } if(hx<0) return -z; else return z; @@ -135,10 +135,10 @@ __ieee754_y1f(float x) * sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x)) * to compute the worse one. */ - if(ix>0x48000000) z = (invsqrtpi*ss)/__ieee754_sqrtf(x); + if(ix>0x48000000) z = (invsqrtpi*ss)/sqrtf(x); else { u = ponef(x); v = qonef(x); - z = invsqrtpi*(u*ss+v*cc)/__ieee754_sqrtf(x); + z = invsqrtpi*(u*ss+v*cc)/sqrtf(x); } return z; } diff --git a/sysdeps/ieee754/flt-32/e_powf.c b/sysdeps/ieee754/flt-32/e_powf.c index ce8e11f1eab2893c0a975d419f7f36f267ad73f7..7565d22e9e939a0365807c34f028e511385cf7ca 100644 --- a/sysdeps/ieee754/flt-32/e_powf.c +++ b/sysdeps/ieee754/flt-32/e_powf.c @@ -101,7 +101,7 @@ __ieee754_powf(float x, float y) if(hy==0x40000000) return x*x; /* y is 2 */ if(hy==0x3f000000) { /* y is 0.5 */ if(__builtin_expect(hx>=0, 1)) /* x >= +0 */ - return __ieee754_sqrtf(x); + return sqrtf(x); } /* determine if y is an odd int when x < 0 diff --git a/sysdeps/ieee754/flt-32/s_asinhf.c b/sysdeps/ieee754/flt-32/s_asinhf.c index 165a7548cac44eebc47435a273061411c5ed1b79..27ecdd56fa79ae197af9fa8e9b1c5947b181eb3f 100644 --- a/sysdeps/ieee754/flt-32/s_asinhf.c +++ b/sysdeps/ieee754/flt-32/s_asinhf.c @@ -40,10 +40,10 @@ __asinhf(float x) } else { float xa = fabsf(x); if (ix>0x40000000) { /* 2**14 > |x| > 2.0 */ - w = __ieee754_logf(2.0f*xa+one/(__ieee754_sqrtf(xa*xa+one)+xa)); + w = __ieee754_logf(2.0f*xa+one/(sqrtf(xa*xa+one)+xa)); } else { /* 2.0 > |x| > 2**-14 */ float t = xa*xa; - w =__log1pf(xa+t/(one+__ieee754_sqrtf(one+t))); + w =__log1pf(xa+t/(one+sqrtf(one+t))); } } return __copysignf(w, x); diff --git a/sysdeps/ieee754/ldbl-128/e_acoshl.c b/sysdeps/ieee754/ldbl-128/e_acoshl.c index 10576c9a4638776a3cd661aa606414e0f72328b2..a5feb2f0f6b41181544ab708f6d579c38464ada3 100644 --- a/sysdeps/ieee754/ldbl-128/e_acoshl.c +++ b/sysdeps/ieee754/ldbl-128/e_acoshl.c @@ -52,7 +52,7 @@ __ieee754_acoshl(_Float128 x) return 0; /* acosh(1) = 0 */ } else if (hx > 0x4000000000000000LL) { /* 2**28 > x > 2 */ t=x*x; - return __ieee754_logl(2*x-one/(x+__ieee754_sqrtl(t-one))); + return __ieee754_logl(2*x-one/(x+sqrtl(t-one))); } else { /* 11, return NaN with invalid signal. * - * Functions needed: __ieee754_sqrtl. + * Functions needed: sqrtl. */ #include @@ -270,7 +270,7 @@ __ieee754_acosl (_Float128 x) else { /* |x| >= .625 */ z = (one - u.value) * 0.5; - s = __ieee754_sqrtl (z); + s = sqrtl (z); /* Compute an extended precision square root from the Newton iteration s -> 0.5 * (s + z / s). The change w from s to the improved value is diff --git a/sysdeps/ieee754/ldbl-128/e_asinl.c b/sysdeps/ieee754/ldbl-128/e_asinl.c index 1edf1c05a16ff54bc23bc3a516ca44486af345db..53c2f1fada777e2fb36e4d53b3e60c318c6c8a43 100644 --- a/sysdeps/ieee754/ldbl-128/e_asinl.c +++ b/sysdeps/ieee754/ldbl-128/e_asinl.c @@ -231,7 +231,7 @@ __ieee754_asinl (_Float128 x) return x + x * w; } - s = __ieee754_sqrtl (t); + s = sqrtl (t); if (ix >= 0x3ffef333) /* |x| > 0.975 */ { w = p / q; diff --git a/sysdeps/ieee754/ldbl-128/e_gammal_r.c b/sysdeps/ieee754/ldbl-128/e_gammal_r.c index 963cbbf5c0553dadcde491822a79200f8c034358..4b82ad72c29e5a1f02ea1624e4a5c412e7ac02c1 100644 --- a/sysdeps/ieee754/ldbl-128/e_gammal_r.c +++ b/sysdeps/ieee754/ldbl-128/e_gammal_r.c @@ -107,7 +107,7 @@ gammal_positive (_Float128 x, int *exp2_adj) _Float128 ret = (__ieee754_powl (x_adj_mant, x_adj) * __ieee754_exp2l (x_adj_log2 * x_adj_frac) * __ieee754_expl (-x_adj) - * __ieee754_sqrtl (2 * M_PIl / x_adj) + * sqrtl (2 * M_PIl / x_adj) / prod); exp_adj += x_eps * __ieee754_logl (x_adj); _Float128 bsum = gamma_coeff[NCOEFF - 1]; diff --git a/sysdeps/ieee754/ldbl-128/e_hypotl.c b/sysdeps/ieee754/ldbl-128/e_hypotl.c index 87160e4230d73e73e3472b420445ed16f62e72b6..dd82b3aec830b553dabd2303dad2e93560596615 100644 --- a/sysdeps/ieee754/ldbl-128/e_hypotl.c +++ b/sysdeps/ieee754/ldbl-128/e_hypotl.c @@ -116,7 +116,7 @@ __ieee754_hypotl(_Float128 x, _Float128 y) t1 = 0; SET_LDOUBLE_MSW64(t1,ha); t2 = a-t1; - w = __ieee754_sqrtl(t1*t1-(b*(-b)-t2*(a+t1))); + w = sqrtl(t1*t1-(b*(-b)-t2*(a+t1))); } else { a = a+a; y1 = 0; @@ -125,7 +125,7 @@ __ieee754_hypotl(_Float128 x, _Float128 y) t1 = 0; SET_LDOUBLE_MSW64(t1,ha+0x0001000000000000LL); t2 = a - t1; - w = __ieee754_sqrtl(t1*y1-(w*(-w)-(t1*y2+t2*b))); + w = sqrtl(t1*y1-(w*(-w)-(t1*y2+t2*b))); } if(k!=0) { uint64_t high; diff --git a/sysdeps/ieee754/ldbl-128/e_j0l.c b/sysdeps/ieee754/ldbl-128/e_j0l.c index fb8d3518cea2617f59d08599ac03e8ed9dcc32b6..8288d28aad304591dd98ee3003b9240839c9c2a7 100644 --- a/sysdeps/ieee754/ldbl-128/e_j0l.c +++ b/sysdeps/ieee754/ldbl-128/e_j0l.c @@ -723,7 +723,7 @@ __ieee754_j0l (_Float128 x) } if (xx > L(0x1p256)) - return ONEOSQPI * cc / __ieee754_sqrtl (xx); + return ONEOSQPI * cc / sqrtl (xx); xinv = 1 / xx; z = xinv * xinv; @@ -786,7 +786,7 @@ __ieee754_j0l (_Float128 x) p = 1 + z * p; q = z * xinv * q; q = q - L(0.125) * xinv; - z = ONEOSQPI * (p * cc - q * ss) / __ieee754_sqrtl (xx); + z = ONEOSQPI * (p * cc - q * ss) / sqrtl (xx); return z; } strong_alias (__ieee754_j0l, __j0l_finite) @@ -868,7 +868,7 @@ _Float128 } if (xx > L(0x1p256)) - return ONEOSQPI * ss / __ieee754_sqrtl (x); + return ONEOSQPI * ss / sqrtl (x); xinv = 1 / xx; z = xinv * xinv; @@ -931,7 +931,7 @@ _Float128 p = 1 + z * p; q = z * xinv * q; q = q - L(0.125) * xinv; - z = ONEOSQPI * (p * ss + q * cc) / __ieee754_sqrtl (x); + z = ONEOSQPI * (p * ss + q * cc) / sqrtl (x); return z; } strong_alias (__ieee754_y0l, __y0l_finite) diff --git a/sysdeps/ieee754/ldbl-128/e_j1l.c b/sysdeps/ieee754/ldbl-128/e_j1l.c index 6fc69faa3c5fb5d563504817d307981e4ebc757c..65a095ccf0629744d364cc9022a811039eecfae3 100644 --- a/sysdeps/ieee754/ldbl-128/e_j1l.c +++ b/sysdeps/ieee754/ldbl-128/e_j1l.c @@ -736,7 +736,7 @@ __ieee754_j1l (_Float128 x) if (xx > L(0x1p256)) { - z = ONEOSQPI * cc / __ieee754_sqrtl (xx); + z = ONEOSQPI * cc / sqrtl (xx); if (x < 0) z = -z; return z; @@ -803,7 +803,7 @@ __ieee754_j1l (_Float128 x) p = 1 + z * p; q = z * q; q = q * xinv + L(0.375) * xinv; - z = ONEOSQPI * (p * cc - q * ss) / __ieee754_sqrtl (xx); + z = ONEOSQPI * (p * cc - q * ss) / sqrtl (xx); if (x < 0) z = -z; return z; @@ -892,7 +892,7 @@ __ieee754_y1l (_Float128 x) } if (xx > L(0x1p256)) - return ONEOSQPI * ss / __ieee754_sqrtl (xx); + return ONEOSQPI * ss / sqrtl (xx); xinv = 1 / xx; z = xinv * xinv; @@ -955,7 +955,7 @@ __ieee754_y1l (_Float128 x) p = 1 + z * p; q = z * q; q = q * xinv + L(0.375) * xinv; - z = ONEOSQPI * (p * ss + q * cc) / __ieee754_sqrtl (xx); + z = ONEOSQPI * (p * ss + q * cc) / sqrtl (xx); return z; } strong_alias (__ieee754_y1l, __y1l_finite) diff --git a/sysdeps/ieee754/ldbl-128/e_jnl.c b/sysdeps/ieee754/ldbl-128/e_jnl.c index 7ae671bc3ec9f5f070303986351b891322a98929..635b4e7e4298de011d28f55a4d103954ab651012 100644 --- a/sysdeps/ieee754/ldbl-128/e_jnl.c +++ b/sysdeps/ieee754/ldbl-128/e_jnl.c @@ -149,7 +149,7 @@ __ieee754_jnl (int n, _Float128 x) temp = c - s; break; } - b = invsqrtpi * temp / __ieee754_sqrtl (x); + b = invsqrtpi * temp / sqrtl (x); } else { @@ -385,7 +385,7 @@ __ieee754_ynl (int n, _Float128 x) temp = s + c; break; } - b = invsqrtpi * temp / __ieee754_sqrtl (x); + b = invsqrtpi * temp / sqrtl (x); } else { diff --git a/sysdeps/ieee754/ldbl-128/e_powl.c b/sysdeps/ieee754/ldbl-128/e_powl.c index 2aef955b465bd6728b4f8c604c60ed1cd330449a..4418ad7c3871dd6100fd1e2045e7720908f66149 100644 --- a/sysdeps/ieee754/ldbl-128/e_powl.c +++ b/sysdeps/ieee754/ldbl-128/e_powl.c @@ -233,7 +233,7 @@ __ieee754_powl (_Float128 x, _Float128 y) if (hy == 0x3ffe0000) { /* y is 0.5 */ if (hx >= 0) /* x >= +0 */ - return __ieee754_sqrtl (x); + return sqrtl (x); } } diff --git a/sysdeps/ieee754/ldbl-128/s_asinhl.c b/sysdeps/ieee754/ldbl-128/s_asinhl.c index 83efb34447b0f652d796b99644945bebe223a023..93b25f7c0ff377b983f0e54fe4c0760af92d7200 100644 --- a/sysdeps/ieee754/ldbl-128/s_asinhl.c +++ b/sysdeps/ieee754/ldbl-128/s_asinhl.c @@ -64,12 +64,12 @@ __asinhl (_Float128 x) else if (ix >0x40000000) { /* 2^ 54 > |x| > 2.0 */ t = u.value; - w = __ieee754_logl (2.0 * t + one / (__ieee754_sqrtl (x * x + one) + t)); + w = __ieee754_logl (2.0 * t + one / (sqrtl (x * x + one) + t)); } else { /* 2.0 > |x| > 2 ^ -56 */ t = x * x; - w = __log1pl (u.value + t / (one + __ieee754_sqrtl (one + t))); + w = __log1pl (u.value + t / (one + sqrtl (one + t))); } if (sign & 0x80000000) return -w; diff --git a/sysdeps/ieee754/ldbl-128ibm/e_acoshl.c b/sysdeps/ieee754/ldbl-128ibm/e_acoshl.c index cab1da999567cd84b2e346a00d57d2658508de11..f85fe678ba27828ac109a9e427c9d15d8aa820e0 100644 --- a/sysdeps/ieee754/ldbl-128ibm/e_acoshl.c +++ b/sysdeps/ieee754/ldbl-128ibm/e_acoshl.c @@ -53,10 +53,10 @@ __ieee754_acoshl(long double x) return 0.0; /* acosh(1) = 0 */ } else if (hx > 0x4000000000000000LL) { /* 2**56 > x > 2 */ t=x*x; - return __ieee754_logl(2.0*x-one/(x+__ieee754_sqrtl(t-one))); + return __ieee754_logl(2.0*x-one/(x+sqrtl(t-one))); } else { /* 11, return NaN with invalid signal. * - * Functions needed: __ieee754_sqrtl. + * Functions needed: sqrtl. */ #include @@ -268,7 +268,7 @@ __ieee754_acosl (long double x) double shi, slo; z = (one - a) * 0.5; - s = __ieee754_sqrtl (z); + s = sqrtl (z); /* Compute an extended precision square root from the Newton iteration s -> 0.5 * (s + z / s). The change w from s to the improved value is diff --git a/sysdeps/ieee754/ldbl-128ibm/e_asinl.c b/sysdeps/ieee754/ldbl-128ibm/e_asinl.c index 6ed5e8d68dca35b463f4a8a0735706dce538fdf7..1d42fcecef867abf5cd0072c3f018fdd25a4778b 100644 --- a/sysdeps/ieee754/ldbl-128ibm/e_asinl.c +++ b/sysdeps/ieee754/ldbl-128ibm/e_asinl.c @@ -62,7 +62,6 @@ #include #include #include -long double sqrtl (long double); static const long double one = 1.0L, @@ -226,7 +225,7 @@ __ieee754_asinl (long double x) return x + x * w; } - s = __ieee754_sqrtl (t); + s = sqrtl (t); if (a > 0.975L) { w = p / q; diff --git a/sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c b/sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c index 7a4895342a2e9c53ebce6fb8aab1849dc94694ea..0f15b0cade7fd43f01b9244a79c38de76d93f2d7 100644 --- a/sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c +++ b/sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c @@ -106,7 +106,7 @@ gammal_positive (long double x, int *exp2_adj) long double ret = (__ieee754_powl (x_adj_mant, x_adj) * __ieee754_exp2l (x_adj_log2 * x_adj_frac) * __ieee754_expl (-x_adj) - * __ieee754_sqrtl (2 * M_PIl / x_adj) + * sqrtl (2 * M_PIl / x_adj) / prod); exp_adj += x_eps * __ieee754_logl (x_adj); long double bsum = gamma_coeff[NCOEFF - 1]; diff --git a/sysdeps/ieee754/ldbl-128ibm/e_hypotl.c b/sysdeps/ieee754/ldbl-128ibm/e_hypotl.c index de5a66ab058c5760bd660e772beb688e5d095657..7f3b04fde6857450960eb472103a021fd49d5fa2 100644 --- a/sysdeps/ieee754/ldbl-128ibm/e_hypotl.c +++ b/sysdeps/ieee754/ldbl-128ibm/e_hypotl.c @@ -107,7 +107,7 @@ __ieee754_hypotl(long double x, long double y) = a1*(a1+a2) + a2*a + b*b = a1*a1 + a1*a2 + a2*a + b*b = a1*a1 + a2*(a+a1) + b*b */ - w = __ieee754_sqrtl(a1*a1-(b*(-b)-a2*(a+a1))); + w = sqrtl(a1*a1-(b*(-b)-a2*(a+a1))); } else { a = a+a; ldbl_unpack (b, &hi, &lo); @@ -124,7 +124,7 @@ __ieee754_hypotl(long double x, long double y) = w*w + a1*b + a2*b = w*w + a1*(b1+b2) + a2*b = w*w + a1*b1 + a1*b2 + a2*b */ - w = __ieee754_sqrtl(a1*b1-(w*(-w)-(a1*b2+a2*b))); + w = sqrtl(a1*b1-(w*(-w)-(a1*b2+a2*b))); } if(k!=0) { diff --git a/sysdeps/ieee754/ldbl-128ibm/e_j0l.c b/sysdeps/ieee754/ldbl-128ibm/e_j0l.c index 0a7fe3235431061c934754316d054dee2c03034e..50a92bcfe7aaf9e2973c77041ddddec05a305012 100644 --- a/sysdeps/ieee754/ldbl-128ibm/e_j0l.c +++ b/sysdeps/ieee754/ldbl-128ibm/e_j0l.c @@ -650,7 +650,7 @@ __ieee754_j0l (long double x) } if (xx > 0x1p256L) - return ONEOSQPI * cc / __ieee754_sqrtl (xx); + return ONEOSQPI * cc / sqrtl (xx); xinv = 1 / xx; z = xinv * xinv; @@ -713,7 +713,7 @@ __ieee754_j0l (long double x) p = 1 + z * p; q = z * xinv * q; q = q - 0.125L * xinv; - z = ONEOSQPI * (p * cc - q * ss) / __ieee754_sqrtl (xx); + z = ONEOSQPI * (p * cc - q * ss) / sqrtl (xx); return z; } strong_alias (__ieee754_j0l, __j0l_finite) @@ -795,7 +795,7 @@ long double } if (xx > 0x1p256L) - return ONEOSQPI * ss / __ieee754_sqrtl (x); + return ONEOSQPI * ss / sqrtl (x); xinv = 1 / xx; z = xinv * xinv; @@ -858,7 +858,7 @@ long double p = 1 + z * p; q = z * xinv * q; q = q - 0.125L * xinv; - z = ONEOSQPI * (p * ss + q * cc) / __ieee754_sqrtl (x); + z = ONEOSQPI * (p * ss + q * cc) / sqrtl (x); return z; } strong_alias (__ieee754_y0l, __y0l_finite) diff --git a/sysdeps/ieee754/ldbl-128ibm/e_j1l.c b/sysdeps/ieee754/ldbl-128ibm/e_j1l.c index 5956c97b82cc9fdf8e06c65a45f63f36a53cabb9..279771419850a62cdf249532fe74c182f3696974 100644 --- a/sysdeps/ieee754/ldbl-128ibm/e_j1l.c +++ b/sysdeps/ieee754/ldbl-128ibm/e_j1l.c @@ -659,7 +659,7 @@ __ieee754_j1l (long double x) if (xx > 0x1p256L) { - z = ONEOSQPI * cc / __ieee754_sqrtl (xx); + z = ONEOSQPI * cc / sqrtl (xx); if (x < 0) z = -z; return z; @@ -726,7 +726,7 @@ __ieee754_j1l (long double x) p = 1 + z * p; q = z * q; q = q * xinv + 0.375L * xinv; - z = ONEOSQPI * (p * cc - q * ss) / __ieee754_sqrtl (xx); + z = ONEOSQPI * (p * cc - q * ss) / sqrtl (xx); if (x < 0) z = -z; return z; @@ -815,7 +815,7 @@ __ieee754_y1l (long double x) } if (xx > 0x1p256L) - return ONEOSQPI * ss / __ieee754_sqrtl (xx); + return ONEOSQPI * ss / sqrtl (xx); xinv = 1 / xx; z = xinv * xinv; @@ -878,7 +878,7 @@ __ieee754_y1l (long double x) p = 1 + z * p; q = z * q; q = q * xinv + 0.375L * xinv; - z = ONEOSQPI * (p * ss + q * cc) / __ieee754_sqrtl (xx); + z = ONEOSQPI * (p * ss + q * cc) / sqrtl (xx); return z; } strong_alias (__ieee754_y1l, __y1l_finite) diff --git a/sysdeps/ieee754/ldbl-128ibm/e_jnl.c b/sysdeps/ieee754/ldbl-128ibm/e_jnl.c index 4a8ccb044e6a3def61f8152b2d73c68ddf1a54fc..dde5720f5d935c48eee13a9446c70ea84b14bef5 100644 --- a/sysdeps/ieee754/ldbl-128ibm/e_jnl.c +++ b/sysdeps/ieee754/ldbl-128ibm/e_jnl.c @@ -149,7 +149,7 @@ __ieee754_jnl (int n, long double x) temp = c - s; break; } - b = invsqrtpi * temp / __ieee754_sqrtl (x); + b = invsqrtpi * temp / sqrtl (x); } else { @@ -385,7 +385,7 @@ __ieee754_ynl (int n, long double x) temp = s + c; break; } - b = invsqrtpi * temp / __ieee754_sqrtl (x); + b = invsqrtpi * temp / sqrtl (x); } else { diff --git a/sysdeps/ieee754/ldbl-128ibm/e_powl.c b/sysdeps/ieee754/ldbl-128ibm/e_powl.c index cdcc3cdbff9f24a4b78dd069f8ee20d89d4fcf4f..b6c7011501b1407d8e9831a04620a4304639028b 100644 --- a/sysdeps/ieee754/ldbl-128ibm/e_powl.c +++ b/sysdeps/ieee754/ldbl-128ibm/e_powl.c @@ -233,7 +233,7 @@ __ieee754_powl (long double x, long double y) if (hy == 0x3fe00000) { /* y is 0.5 */ if (hx >= 0) /* x >= +0 */ - return __ieee754_sqrtl (x); + return sqrtl (x); } } } diff --git a/sysdeps/ieee754/ldbl-128ibm/s_asinhl.c b/sysdeps/ieee754/ldbl-128ibm/s_asinhl.c index aa9a9ba213acd6b01130ea217ddb9a8904aed836..21ba14bd83684a657bc70dd8f8273799008c2cf0 100644 --- a/sysdeps/ieee754/ldbl-128ibm/s_asinhl.c +++ b/sysdeps/ieee754/ldbl-128ibm/s_asinhl.c @@ -53,10 +53,10 @@ long double __asinhl(long double x) w = __ieee754_logl(fabsl(x))+ln2; } else if (ix>0x4000000000000000LL) { /* 2**56 >= |x| > 2.0 */ t = fabs(x); - w = __ieee754_logl(2.0*t+one/(__ieee754_sqrtl(x*x+one)+t)); + w = __ieee754_logl(2.0*t+one/(sqrtl(x*x+one)+t)); } else { /* 2.0 >= |x| >= 2**-56 */ t = x*x; - w =__log1pl(fabsl(x)+t/(one+__ieee754_sqrtl(one+t))); + w =__log1pl(fabsl(x)+t/(one+sqrtl(one+t))); } if(hx>0) return w; else return -w; } diff --git a/sysdeps/ieee754/ldbl-96/e_acoshl.c b/sysdeps/ieee754/ldbl-96/e_acoshl.c index 381deb56a69f037883e0f4c458f0a837757cba59..56b04d4cc43122e4e40f5d7c036932cfb050ba9c 100644 --- a/sysdeps/ieee754/ldbl-96/e_acoshl.c +++ b/sysdeps/ieee754/ldbl-96/e_acoshl.c @@ -52,10 +52,10 @@ __ieee754_acoshl(long double x) return 0.0; /* acosh(1) = 0 */ } else if (se > 0x4000) { /* 2**28 > x > 2 */ t=x*x; - return __ieee754_logl(2.0*x-one/(x+__ieee754_sqrtl(t-one))); + return __ieee754_logl(2.0*x-one/(x+sqrtl(t-one))); } else { /* 1= 0x3ffef999) { /* if |x| > 0.975 */ w = p / q; diff --git a/sysdeps/ieee754/ldbl-96/e_gammal_r.c b/sysdeps/ieee754/ldbl-96/e_gammal_r.c index 853f6a10bebc2f7d58208265ec3ffaa2b61d85d8..62f5bd20e74e16dd4a40921e6075624a8d5fa3c1 100644 --- a/sysdeps/ieee754/ldbl-96/e_gammal_r.c +++ b/sysdeps/ieee754/ldbl-96/e_gammal_r.c @@ -100,7 +100,7 @@ gammal_positive (long double x, int *exp2_adj) long double ret = (__ieee754_powl (x_adj_mant, x_adj) * __ieee754_exp2l (x_adj_log2 * x_adj_frac) * __ieee754_expl (-x_adj) - * __ieee754_sqrtl (2 * M_PIl / x_adj) + * sqrtl (2 * M_PIl / x_adj) / prod); exp_adj += x_eps * __ieee754_logl (x_adj); long double bsum = gamma_coeff[NCOEFF - 1]; diff --git a/sysdeps/ieee754/ldbl-96/e_hypotl.c b/sysdeps/ieee754/ldbl-96/e_hypotl.c index 337908f8457dfea070458aceec3e5f4a36ccd41e..560ef226f46969de7b9622e324a7b4171449c507 100644 --- a/sysdeps/ieee754/ldbl-96/e_hypotl.c +++ b/sysdeps/ieee754/ldbl-96/e_hypotl.c @@ -117,7 +117,7 @@ long double __ieee754_hypotl(long double x, long double y) GET_LDOUBLE_MSW(high,a); SET_LDOUBLE_WORDS(t1,ea,high,0); t2 = a-t1; - w = __ieee754_sqrtl(t1*t1-(b*(-b)-t2*(a+t1))); + w = sqrtl(t1*t1-(b*(-b)-t2*(a+t1))); } else { uint32_t high; GET_LDOUBLE_MSW(high,b); @@ -127,7 +127,7 @@ long double __ieee754_hypotl(long double x, long double y) GET_LDOUBLE_MSW(high,a); SET_LDOUBLE_WORDS(t1,ea+1,high,0); t2 = a - t1; - w = __ieee754_sqrtl(t1*y1-(w*(-w)-(t1*y2+t2*b))); + w = sqrtl(t1*y1-(w*(-w)-(t1*y2+t2*b))); } if(k!=0) { uint32_t exp; diff --git a/sysdeps/ieee754/ldbl-96/e_j0l.c b/sysdeps/ieee754/ldbl-96/e_j0l.c index 4339d27c70cbe7e970744cee052b34b6a736304f..799812ae86ca6fbd1f71429466e8c183f07b41d3 100644 --- a/sysdeps/ieee754/ldbl-96/e_j0l.c +++ b/sysdeps/ieee754/ldbl-96/e_j0l.c @@ -133,12 +133,12 @@ __ieee754_j0l (long double x) * y0(x) = 1/sqrt(pi) * (P(0,x)*ss + Q(0,x)*cc) / sqrt(x) */ if (__glibc_unlikely (ix > 0x4080)) /* 2^129 */ - z = (invsqrtpi * cc) / __ieee754_sqrtl (x); + z = (invsqrtpi * cc) / sqrtl (x); else { u = pzero (x); v = qzero (x); - z = invsqrtpi * (u * cc - v * ss) / __ieee754_sqrtl (x); + z = invsqrtpi * (u * cc - v * ss) / sqrtl (x); } return z; } @@ -235,12 +235,12 @@ __ieee754_y0l (long double x) ss = z / cc; } if (__glibc_unlikely (ix > 0x4080)) /* 1e39 */ - z = (invsqrtpi * ss) / __ieee754_sqrtl (x); + z = (invsqrtpi * ss) / sqrtl (x); else { u = pzero (x); v = qzero (x); - z = invsqrtpi * (u * ss + v * cc) / __ieee754_sqrtl (x); + z = invsqrtpi * (u * ss + v * cc) / sqrtl (x); } return z; } diff --git a/sysdeps/ieee754/ldbl-96/e_j1l.c b/sysdeps/ieee754/ldbl-96/e_j1l.c index a8a9902db0e8aec31f40aa154976121493933e6d..db983291b0ae3d3419bc4965183abd68c7935e8e 100644 --- a/sysdeps/ieee754/ldbl-96/e_j1l.c +++ b/sysdeps/ieee754/ldbl-96/e_j1l.c @@ -137,12 +137,12 @@ __ieee754_j1l (long double x) * y1(x) = 1/sqrt(pi) * (P(1,x)*ss + Q(1,x)*cc) / sqrt(x) */ if (__glibc_unlikely (ix > 0x4080)) - z = (invsqrtpi * cc) / __ieee754_sqrtl (y); + z = (invsqrtpi * cc) / sqrtl (y); else { u = pone (y); v = qone (y); - z = invsqrtpi * (u * cc - v * ss) / __ieee754_sqrtl (y); + z = invsqrtpi * (u * cc - v * ss) / sqrtl (y); } if (se & 0x8000) return -z; @@ -231,12 +231,12 @@ __ieee754_y1l (long double x) * to compute the worse one. */ if (__glibc_unlikely (ix > 0x4080)) - z = (invsqrtpi * ss) / __ieee754_sqrtl (x); + z = (invsqrtpi * ss) / sqrtl (x); else { u = pone (x); v = qone (x); - z = invsqrtpi * (u * ss + v * cc) / __ieee754_sqrtl (x); + z = invsqrtpi * (u * ss + v * cc) / sqrtl (x); } return z; } diff --git a/sysdeps/ieee754/ldbl-96/e_jnl.c b/sysdeps/ieee754/ldbl-96/e_jnl.c index d801ec619fd108e170eccf29deb6e3136ebc8d76..fe249b9126e384e0406072b76237dcface0e487d 100644 --- a/sysdeps/ieee754/ldbl-96/e_jnl.c +++ b/sysdeps/ieee754/ldbl-96/e_jnl.c @@ -142,7 +142,7 @@ __ieee754_jnl (int n, long double x) temp = c - s; break; } - b = invsqrtpi * temp / __ieee754_sqrtl (x); + b = invsqrtpi * temp / sqrtl (x); } else { @@ -371,7 +371,7 @@ __ieee754_ynl (int n, long double x) temp = s + c; break; } - b = invsqrtpi * temp / __ieee754_sqrtl (x); + b = invsqrtpi * temp / sqrtl (x); } else { diff --git a/sysdeps/ieee754/ldbl-96/s_asinhl.c b/sysdeps/ieee754/ldbl-96/s_asinhl.c index da49ea59884c64e8dcea686b24068170c81e4444..22863e09b07f7f897b90f53743537f3aae4f4a2f 100644 --- a/sysdeps/ieee754/ldbl-96/s_asinhl.c +++ b/sysdeps/ieee754/ldbl-96/s_asinhl.c @@ -54,10 +54,10 @@ long double __asinhl(long double x) } else { long double xa = fabsl(x); if (ix>0x4000) { /* 2**34 > |x| > 2.0 */ - w = __ieee754_logl(2.0*xa+one/(__ieee754_sqrtl(xa*xa+one)+xa)); + w = __ieee754_logl(2.0*xa+one/(sqrtl(xa*xa+one)+xa)); } else { /* 2.0 > |x| > 2**-28 */ t = xa*xa; - w =__log1pl(xa+t/(one+__ieee754_sqrtl(one+t))); + w =__log1pl(xa+t/(one+sqrtl(one+t))); } } return __copysignl(w, x); diff --git a/sysdeps/m68k/m680x0/fpu/e_pow.c b/sysdeps/m68k/m680x0/fpu/e_pow.c index 9a534a72d10888627c70adee91968ff0a8e4b23a..b6d626db8a17f5516e23246a001eed6511cf3c65 100644 --- a/sysdeps/m68k/m680x0/fpu/e_pow.c +++ b/sysdeps/m68k/m680x0/fpu/e_pow.c @@ -64,7 +64,7 @@ s(__ieee754_pow) (float_type x, float_type y) if (y == 2) return x * x; if (y == 0.5 && !(x_cond & __M81_COND_NEG)) - return m81(__ieee754_sqrt) (x); + return m81(sqrt) (x); if (x == 10.0) { diff --git a/sysdeps/powerpc/fpu/e_hypot.c b/sysdeps/powerpc/fpu/e_hypot.c index 2685ca6ba06441f1ab48aeb78183442686841a97..98319f841ecddb185506f40cddb5d980f1bdab7c 100644 --- a/sysdeps/powerpc/fpu/e_hypot.c +++ b/sysdeps/powerpc/fpu/e_hypot.c @@ -110,7 +110,7 @@ __ieee754_hypot (double x, double y) { x *= twoM600; y *= twoM600; - return __ieee754_sqrt (x * x + y * y) / twoM600; + return sqrt (x * x + y * y) / twoM600; } if (y < twoM500) { @@ -118,7 +118,7 @@ __ieee754_hypot (double x, double y) { x *= two1022; y *= two1022; - double ret = __ieee754_sqrt (x * x + y * y) / two1022; + double ret = sqrt (x * x + y * y) / two1022; math_check_force_underflow_nonneg (ret); return ret; } @@ -126,9 +126,9 @@ __ieee754_hypot (double x, double y) { x *= two600; y *= two600; - return __ieee754_sqrt (x * x + y * y) / two600; + return sqrt (x * x + y * y) / two600; } } - return __ieee754_sqrt (x * x + y * y); + return sqrt (x * x + y * y); } strong_alias (__ieee754_hypot, __hypot_finite) diff --git a/sysdeps/powerpc/fpu/e_hypotf.c b/sysdeps/powerpc/fpu/e_hypotf.c index 8502ca962a307d94dea6e693d50b1eadee11e76c..f09c42a03aab50492ab9effc53968a5fd2472d55 100644 --- a/sysdeps/powerpc/fpu/e_hypotf.c +++ b/sysdeps/powerpc/fpu/e_hypotf.c @@ -71,6 +71,6 @@ __ieee754_hypotf (float x, float y) { TEST_INF_NAN (x, y); - return __ieee754_sqrt ((double) x * x + (double) y * y); + return sqrt ((double) x * x + (double) y * y); } strong_alias (__ieee754_hypotf, __hypotf_finite) From patchwork Tue Sep 26 13:25:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wilco Dijkstra X-Patchwork-Id: 818643 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-84962-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="WliU4uOM"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3y1hXX304Yz9tXH for ; Tue, 26 Sep 2017 23:25:32 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id :content-type:content-transfer-encoding:mime-version; q=dns; s= default; b=IGtxFoN8w0zn8TEgrXOcgcnkMo+dus9JThaM2XnVaYIFCR30a90ZR RD3zDa2QNzez4spYYCwQDL5LsCCfZTRt+ppgPZvWTaty69eKPY1PRteTkaAkD6WG TTtZkP0lMvrxxX0lpuAn4MwVTJSZEi4Lx2ebARoR1+0vl1dP4YBJ9k= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id :content-type:content-transfer-encoding:mime-version; s=default; bh=QQ8Avdgt97O2MZAqofRGn/g6nJk=; b=WliU4uOMM43WaRGaQPlyPy0w0jkU 8HmiDMqIFFB3onyEVvLqFShKkryXoFejHQxGbjDFPWSVb0IxVn0ZHPJpYGynZf8Q ip72grTf6HHilcVxaMM6j9cnkJuzGmt+vOvAnoZY4QT9DOsVTXHJcHHLCZeOQmMZ dAj9A+K4LmCrihU= Received: (qmail 90653 invoked by alias); 26 Sep 2017 13:25:26 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 89799 invoked by uid 89); 26 Sep 2017 13:25:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LOTSOFHASH, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 spammy=FIX, (unknown), sud X-HELO: EUR03-VE1-obe.outbound.protection.outlook.com From: Wilco Dijkstra To: "libc-alpha@sourceware.org" CC: nd Subject: [PATCH 3/3] Cleanup __ieee754_sqrt(f/l) Date: Tue, 26 Sep 2017 13:25:20 +0000 Message-ID: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Wilco.Dijkstra@arm.com; x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB6PR0801MB2053; 6:L8GRbLk3KCWLUDSZxKYWjWhx/DCkoi6Mss+v9xxUeIQkbSe24wcHzQMw90Yg2UZhlCOImi0oUk2qpOFrZfJpR83SuU01YvyOJ1qCictCJrMBLhVNRfEmrx/LcxwLnBQnnnvkOkAZK9HyT0sKQdGGBfhoPi42vBZVrQmtScd9e7HBS6rfcLvRj5aJxuETvvStwHSpvW80KiImfBnAFMabyXKGM0IS+agSj+Ompq+s0+dqNJuRyHL/RTaJShbF2qdF24+1UOCgR6uGgLkNxP5FbPYDjgJ1sptWyAtpAVpwKj+DAczSHAA2TOssQYrT26seAbf41mzvbmfQ8sJ4bxZ81Q==; 5:jXlYrk0EHQRDOei9KImyw7sZIEUnEbYu3lPhI8vDSURBXyq2LeIizmHprz0zPtBSs4gyflyBg8mvDv4jfHwWJLIy1a4MKNgxqouI+gh+YAdHqtnpnbqSAfehK9CQWBNHQk/1VaQKKOVqH5NTL6sc0Q==; 24:WL2Qf8oi8AM+J0qBvgWAnFeGM6mYb54WgvP2ID6ed81Oecnh3rm+0V9Uvkk0Wot1ylNn6pGuWdZnWmyguvXyzR6EJobJiP2whfleD+QMjq0=; 7:R1AkuE5Yj1uZqyUHgFV9FGVArVlXabyf/D7Yo3dLyGap5haYQezOnVwu1f3lS7HI9KZWoueelw96PIvNHDGn1gpxdxnsuXA5ICAfiCzkmmvsVVvoKHZCupG1KyfBmnE6TrjY81p1xbgyaEqCQ6Gy3Z9bECPdOVA/BZFERt8GvPxwCk/93ZOn088Bn8d2SIf0dDYLQ4zml5HuuvR7meiQcOTrcQ2cTysZh4ArspQK2Jk= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: f59af37c-735f-440f-133c-08d504e20912 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(48565401081)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:DB6PR0801MB2053; x-ms-traffictypediagnostic: DB6PR0801MB2053: nodisclaimer: True x-exchange-antispam-report-test: UriScan:(180628864354917); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(10201501046)(3002001)(93006095)(93001095)(100000703101)(100105400095)(6055026)(6041248)(20161123558100)(20161123555025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DB6PR0801MB2053; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DB6PR0801MB2053; x-forefront-prvs: 0442E569BC x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(39860400002)(346002)(376002)(199003)(189002)(377424004)(54534003)(2906002)(105586002)(478600001)(86362001)(6436002)(3280700002)(6506006)(2351001)(3660700001)(66066001)(6916009)(5660300001)(14454004)(53936002)(3846002)(102836003)(7696004)(4326008)(5640700003)(189998001)(9686003)(99286003)(72206003)(68736007)(25786009)(50986999)(54356999)(74316002)(2501003)(316002)(55016002)(6116002)(575784001)(106356001)(97736004)(7736002)(81156014)(33656002)(101416001)(5250100002)(2900100001)(81166006)(8936002)(8676002)(305945005); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR0801MB2053; H:DB6PR0801MB2053.eurprd08.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Sep 2017 13:25:20.3623 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0801MB2053 Finally remove the now unused target specific__ieee754_sqrt(f/l) inlines. ChangeLog: 2017-09-25 Wilco Dijkstra * sysdeps/aarch64/fpu/math_private.h (__ieee754_sqrt): Remove. (__ieee754_sqrtf): Remove. * sysdeps/alpha/fpu/math_private.h (__ieee754_sqrt): Remove. (__ieee754_sqrtf): Remove. * sysdeps/generic/math-type-macros.h (M_SQRT): Use __builtin_sqrt(f). * sysdeps/m68k/m680x0/fpu/mathimpl.h (__ieee754_sqrt): Remove. * sysdeps/powerpc/fpu/math_private.h (__ieee754_sqrt): Remove. (__ieee754_sqrtf): Remove. * sysdeps/s390/fpu/bits/mathinline.h (__ieee754_sqrt): Remove. (__ieee754_sqrtf): Remove. (sqrtl): Remove. * sysdeps/sparc/fpu/bits/mathinline.h (sqrt) Remove. (sqrtf): Remove. (sqrtl): Remove. (__ieee754_sqrt): Remove. (__ieee754_sqrtf): Remove. (__ieee754_sqrtl): Remove. * sysdeps/m68k/m680x0/fpu/mathimpl.h (__ieee754_sqrt): Remove. * sysdeps/x86/fpu/math_private.h (__ieee754_sqrt): Remove. * sysdeps/x86_64/fpu/math_private.h (__ieee754_sqrt): Remove. (__ieee754_sqrtf): Remove. (__ieee754_sqrtl): Remove. diff --git a/sysdeps/aarch64/fpu/math_private.h b/sysdeps/aarch64/fpu/math_private.h index be10488f5df437bcdb28a136a2b9a4533e862275..8c04b675027a7ea6dc2b199a7ab876cb48c876e8 100644 --- a/sysdeps/aarch64/fpu/math_private.h +++ b/sysdeps/aarch64/fpu/math_private.h @@ -27,22 +27,6 @@ #define math_force_eval(x) \ ({ __typeof (x) __x = (x); __asm __volatile__ ("" : : "w" (__x)); }) -extern __always_inline double -__ieee754_sqrt (double d) -{ - double res; - asm __volatile__ ("fsqrt %d0, %d1" : "=w" (res) : "w" (d)); - return res; -} - -extern __always_inline float -__ieee754_sqrtf (float s) -{ - float res; - asm __volatile__ ("fsqrt %s0, %s1" : "=w" (res) : "w" (s)); - return res; -} - static __always_inline void libc_feholdexcept_aarch64 (fenv_t *envp) { diff --git a/sysdeps/alpha/fpu/math_private.h b/sysdeps/alpha/fpu/math_private.h index 1e97c867c38767a2237df21f84e9c55a53ad13bb..95dc32c969c1133add0d5a1c42e1f1bd0c9d0e2d 100644 --- a/sysdeps/alpha/fpu/math_private.h +++ b/sysdeps/alpha/fpu/math_private.h @@ -21,30 +21,4 @@ #include_next -#ifdef __alpha_fix__ -extern __always_inline double -__ieee754_sqrt (double d) -{ - double ret; -# ifdef _IEEE_FP_INEXACT - asm ("sqrtt/suid %1,%0" : "=&f"(ret) : "f"(d)); -# else - asm ("sqrtt/sud %1,%0" : "=&f"(ret) : "f"(d)); -# endif - return ret; -} - -extern __always_inline float -__ieee754_sqrtf (float d) -{ - float ret; -# ifdef _IEEE_FP_INEXACT - asm ("sqrts/suid %1,%0" : "=&f"(ret) : "f"(d)); -# else - asm ("sqrts/sud %1,%0" : "=&f"(ret) : "f"(d)); -# endif - return ret; -} -#endif /* FIX */ - #endif /* ALPHA_MATH_PRIVATE_H */ diff --git a/sysdeps/generic/math-type-macros.h b/sysdeps/generic/math-type-macros.h index 6aaa2335b9b165ba5ec9384e730f10382e3b969c..26d338972d7ded66877bd0a2d8e822f929cee1c9 100644 --- a/sysdeps/generic/math-type-macros.h +++ b/sysdeps/generic/math-type-macros.h @@ -84,7 +84,7 @@ #define M_HYPOT M_SUF (__ieee754_hypot) #define M_LOG M_SUF (__ieee754_log) #define M_SINH M_SUF (__ieee754_sinh) -#define M_SQRT M_SUF (__ieee754_sqrt) +#define M_SQRT M_SUF (sqrt) /* Needed to evaluate M_MANT_DIG below. */ #include diff --git a/sysdeps/m68k/m680x0/fpu/mathimpl.h b/sysdeps/m68k/m680x0/fpu/mathimpl.h index 653df968735a3bc1f41cd137632fe7739d76c443..1c315150a532f5575104e2a154166d020c6b1617 100644 --- a/sysdeps/m68k/m680x0/fpu/mathimpl.h +++ b/sysdeps/m68k/m680x0/fpu/mathimpl.h @@ -30,7 +30,6 @@ __inline_mathop (__ieee754_exp10, tentox) __inline_mathop (__ieee754_log10, log10) __inline_mathop (__ieee754_log2, log2) __inline_mathop (__ieee754_log, logn) -__inline_mathop (__ieee754_sqrt, sqrt) __inline_mathop (__ieee754_atanh, atanh) __m81_defun (double, __ieee754_remainder, (double __x, double __y)) diff --git a/sysdeps/powerpc/fpu/math_private.h b/sysdeps/powerpc/fpu/math_private.h index 396fd0562eda2f64bc5858a8e90b94cf5028f28b..f73b6efaa9d1c3f5dec0427965cdf25b1b61b843 100644 --- a/sysdeps/powerpc/fpu/math_private.h +++ b/sysdeps/powerpc/fpu/math_private.h @@ -35,36 +35,6 @@ __ieee754_sqrtf128 (_Float128 __x) } #endif -extern double __slow_ieee754_sqrt (double); -extern __always_inline double -__ieee754_sqrt (double __x) -{ - double __z; - -#ifdef _ARCH_PPCSQ - asm ("fsqrt %0,%1" : "=f" (__z) : "f" (__x)); -#else - __z = __slow_ieee754_sqrt(__x); -#endif - - return __z; -} - -extern float __slow_ieee754_sqrtf (float); -extern __always_inline float -__ieee754_sqrtf (float __x) -{ - float __z; - -#ifdef _ARCH_PPCSQ - asm ("fsqrts %0,%1" : "=f" (__z) : "f" (__x)); -#else - __z = __slow_ieee754_sqrtf(__x); -#endif - - return __z; -} - #if defined _ARCH_PWR5X # ifndef __round diff --git a/sysdeps/s390/fpu/bits/mathinline.h b/sysdeps/s390/fpu/bits/mathinline.h index 52e21db98d51254cee442989190923eef25b1b44..76b3be50c4e347281ed7790aa5eafbdb36d95052 100644 --- a/sysdeps/s390/fpu/bits/mathinline.h +++ b/sysdeps/s390/fpu/bits/mathinline.h @@ -63,38 +63,4 @@ __NTH (__signbitl (long double __x)) #endif /* C99 */ -/* This code is used internally in the GNU libc. */ -#ifdef __LIBC_INTERNAL_MATH_INLINES - -__MATH_INLINE double -__NTH (__ieee754_sqrt (double x)) -{ - double res; - - __asm__ ( "sqdbr %0,%1" : "=f" (res) : "f" (x) ); - return res; -} - -__MATH_INLINE float -__NTH (__ieee754_sqrtf (float x)) -{ - float res; - - __asm__ ( "sqebr %0,%1" : "=f" (res) : "f" (x) ); - return res; -} - -# if !defined __NO_LONG_DOUBLE_MATH -__MATH_INLINE long double -__NTH (sqrtl (long double __x)) -{ - long double res; - - __asm__ ( "sqxbr %0,%1" : "=f" (res) : "f" (__x) ); - return res; -} -# endif /* !__NO_LONG_DOUBLE_MATH */ - -#endif /* __LIBC_INTERNAL_MATH_INLINES */ - #endif /* __NO_MATH_INLINES */ diff --git a/sysdeps/sparc/fpu/bits/mathinline.h b/sysdeps/sparc/fpu/bits/mathinline.h index 60a2028f2ce7484883791c683be1a28586de0c13..2939af5bc623287bab02dab72d664509d435f2f9 100644 --- a/sysdeps/sparc/fpu/bits/mathinline.h +++ b/sysdeps/sparc/fpu/bits/mathinline.h @@ -190,80 +190,7 @@ __NTH (__signbitl (long double __x)) # endif /* __USE_ISOC99 */ -# if !defined __NO_MATH_INLINES && !__GNUC_PREREQ (3, 2) - -__MATH_INLINE double -__NTH (sqrt (double __x)) -{ - register double __r; - __asm ("fsqrtd %1,%0" : "=f" (__r) : "f" (__x)); - return __r; -} - -__MATH_INLINE float -__NTH (sqrtf (float __x)) -{ - register float __r; - __asm ("fsqrts %1,%0" : "=f" (__r) : "f" (__x)); - return __r; -} - -# if __WORDSIZE == 64 -__MATH_INLINE long double -__NTH (sqrtl (long double __x)) -{ - long double __r; - extern void _Qp_sqrt (long double *, const long double *); - _Qp_sqrt (&__r, &__x); - return __r; -} -# elif !defined __NO_LONG_DOUBLE_MATH -__MATH_INLINE long double -sqrtl (long double __x) __THROW -{ - extern long double _Q_sqrt (const long double); - return _Q_sqrt (__x); -} -# endif /* sparc64 */ - -# endif /* !__NO_MATH_INLINES && !GCC 3.2+ */ - /* This code is used internally in the GNU libc. */ -# ifdef __LIBC_INTERNAL_MATH_INLINES -__MATH_INLINE double -__ieee754_sqrt (double __x) -{ - register double __r; - __asm ("fsqrtd %1,%0" : "=f" (__r) : "f" (__x)); - return __r; -} - -__MATH_INLINE float -__ieee754_sqrtf (float __x) -{ - register float __r; - __asm ("fsqrts %1,%0" : "=f" (__r) : "f" (__x)); - return __r; -} - -# if __WORDSIZE == 64 -__MATH_INLINE long double -__ieee754_sqrtl (long double __x) -{ - long double __r; - extern void _Qp_sqrt (long double *, const long double *); - _Qp_sqrt(&__r, &__x); - return __r; -} -# elif !defined __NO_LONG_DOUBLE_MATH -__MATH_INLINE long double -__ieee754_sqrtl (long double __x) -{ - extern long double _Q_sqrt (const long double); - return _Q_sqrt (__x); -} -# endif /* sparc64 */ -# endif /* __LIBC_INTERNAL_MATH_INLINES */ # endif /* gcc 2.8+ */ # ifdef __USE_ISOC99 diff --git a/sysdeps/x86/fpu/bits/mathinline.h b/sysdeps/x86/fpu/bits/mathinline.h index bcd99bdf7435e8eff3bd60e5134a15a85d9320b8..a183693ae6978a875f80bfd61a1fa5e5333de204 100644 --- a/sysdeps/x86/fpu/bits/mathinline.h +++ b/sysdeps/x86/fpu/bits/mathinline.h @@ -950,7 +950,6 @@ __NTH (__finite (double __x)) /* This code is used internally in the GNU libc. */ # ifdef __LIBC_INTERNAL_MATH_INLINES -__inline_mathop (__ieee754_sqrt, "fsqrt") __inline_mathcode2_ (long double, __ieee754_atan2l, __y, __x, register long double __value; __asm __volatile__ ("fpatan\n\t" diff --git a/sysdeps/x86_64/fpu/math_private.h b/sysdeps/x86_64/fpu/math_private.h index 027a6a3a4d0a68948f19ebaa129bf442a9f4f3e6..13052893ef9541e100d6d68b85ff16a2910a28e3 100644 --- a/sysdeps/x86_64/fpu/math_private.h +++ b/sysdeps/x86_64/fpu/math_private.h @@ -48,38 +48,6 @@ #include #include_next -extern __always_inline double -__ieee754_sqrt (double d) -{ - double res; -#if defined __AVX__ || defined SSE2AVX - asm ("vsqrtsd %1, %0, %0" : "=x" (res) : "xm" (d)); -#else - asm ("sqrtsd %1, %0" : "=x" (res) : "xm" (d)); -#endif - return res; -} - -extern __always_inline float -__ieee754_sqrtf (float d) -{ - float res; -#if defined __AVX__ || defined SSE2AVX - asm ("vsqrtss %1, %0, %0" : "=x" (res) : "xm" (d)); -#else - asm ("sqrtss %1, %0" : "=x" (res) : "xm" (d)); -#endif - return res; -} - -extern __always_inline long double -__ieee754_sqrtl (long double d) -{ - long double res; - asm ("fsqrt" : "=t" (res) : "0" (d)); - return res; -} - #ifdef __SSE4_1__ extern __always_inline double __rint (double d)