From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 118596 invoked by alias); 13 Mar 2018 15:29:16 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 118587 invoked by uid 89); 13 Mar 2018 15:29:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: EUR01-VE1-obe.outbound.protection.outlook.com From: Wilco Dijkstra To: Siddhesh Poyarekar , "libc-alpha@sourceware.org" CC: nd Subject: Re: [PATCH 6/6] Remove slow paths from sin/cos Date: Tue, 13 Mar 2018 15:29:00 -0000 Message-ID: References: <37a3d699-e7aa-a411-f9bf-54aa1491a154@gotplt.org> ,<2a4f8559-9978-42ee-2b8a-df5d7335b425@gotplt.org> In-Reply-To: <2a4f8559-9978-42ee-2b8a-df5d7335b425@gotplt.org> authentication-results: spf=none (sender IP is ) smtp.mailfrom=Wilco.Dijkstra@arm.com; x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DB6PR0801MB1960;7:5eoiMIJ5uLqeFgkyrz86nieIs4UGix5Brr1uF4qROsEYHh5sGblS9xrCCLHFznOeu8ZF1V6wMAVuLo/LwZ8Hz+maJ+p1h7QVJ1GJugz9nr/B8ZnJAhDMBJ+f1MzOsbBBzxLAuHJPFGe/mHVvbur7qr/I4pUrndzYrzKcSH4UNRUc7vREvgSK9BunfXAJf8DrJyg4/uUc6cioVVrUBLx1TOQX+ESPASb5oXXKx1gI6TLEl/UsAvdgPm62eteLSsx3 x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: 0d54f37b-bb55-4547-2f62-08d588f72b73 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4604075)(3008032)(48565401081)(2017052603328)(7153060)(7193020);SRVR:DB6PR0801MB1960; x-ms-traffictypediagnostic: DB6PR0801MB1960: nodisclaimer: True x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231221)(944501244)(52105095)(6055026)(6041310)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(6072148)(201708071742011);SRVR:DB6PR0801MB1960;BCL:0;PCL:0;RULEID:;SRVR:DB6PR0801MB1960; x-forefront-prvs: 0610D16BBE x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(376002)(366004)(39860400002)(396003)(39380400002)(346002)(199004)(189003)(7696005)(229853002)(2950100002)(74316002)(2900100001)(2906002)(26005)(14454004)(93886005)(66066001)(102836004)(305945005)(7736002)(6506007)(86362001)(97736004)(478600001)(3846002)(6116002)(33656002)(105586002)(3280700002)(81156014)(81166006)(9686003)(5250100002)(6436002)(25786009)(68736007)(72206003)(8676002)(6246003)(5660300001)(2501003)(55016002)(99286004)(8936002)(4326008)(110136005)(106356001)(316002)(76176011)(3660700001)(53936002);DIR:OUT;SFP:1101;SCL:1;SRVR:DB6PR0801MB1960;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) x-microsoft-antispam-message-info: NMnI1ggPw7GqgsCsjyQb0aAivUS6aPbiP2j0knfPnZFZ3UUfrw9/RGQCntd3zGlBZSYyM3OoDG5ObDtJ5lW5nNG0sANl5bBE+Ujyl5iPBaiVjn2E3ma4oYk+JWJpkkQ15DRZQvosFLT9taMe9MHXNErekoikOxtL/KejupiGWUe07N/0g2vQuc+ul84IAZhZb2wldmNxB3bbxQFCIXzholSGIiRdDK///oi8Zu29u9BxKZIt8L6gkRklZsjec8eqejG3NTSLwo59i+SQLFAyHs5yK9bD2Q4YM/5PLYDLEFRpHhLvLVPcL9F1yvWpXk3Qixf7rymYeAUTifpC1z6F7w== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0d54f37b-bb55-4547-2f62-08d588f72b73 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Mar 2018 15:29:10.8968 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0801MB1960 X-SW-Source: 2018-03/txt/msg00319.txt.bz2 Siddhesh Poyarekar wrote: > On Monday 12 March 2018 11:01 PM, Wilco Dijkstra wrote: >> I had lots of issues due to parts of functions being included in sincos.= c, so I had to >> disable sincos during development. The new version is much easier to mai= ntain. > > That's subjective; someone half a decade down the line might differ when > they see bits of code duplicated across files :) This code won't last half a decade - it should be further simplified and ma= de much faster. This pattern is repeated 6 times with slight variations. It may be feasible= to merge it all into do_sin: if (k < 0x3fd00000) { xx =3D x * x; t =3D POLYNOMIAL (xx) * (xx * x); *sinx =3D x + t; } else *sinx =3D __copysign (do_sin (x, 0), x); The other is: /* |x| < 2.426265. */ y =3D hp0 - fabs (x); a =3D y + hp1; da =3D (y - a) + hp1; That's tiny enough that I don't see an issue. Wilco