From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3EDF73858C31; Wed, 20 Mar 2024 13:54:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3EDF73858C31 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1710942877; bh=Y16BtSIMhEvOSjUxZ/+ZlI8EVvFeB1cZGSadnjr63dM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=K0459y55Tr/d2W0k7dUhM+lHDbeOFTs4dmzCfemZHgDnAvhNiaXcgj25F1iDUHx/z 3GObIk94aWZD8y1VzsEz6r+SOxDZ3QoRR4SXjwTuWWe1S5ANW/h28SMS6i5kuSG1Ey bU2ehliUhW7E5RkhwaeWFBGmL+TYSIJcbAeOOXLk= From: "wdijkstr at arm dot com" To: glibc-bugs@sourceware.org Subject: [Bug math/28472] pow(10, i) accuracy Date: Wed, 20 Mar 2024 13:54:35 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: math X-Bugzilla-Version: 2.31 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: wdijkstr at arm dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D28472 --- Comment #25 from Wilco --- (In reply to b. from comment #23) > @Wilco, thanks for your comment, would you mind sharing=20=20 > a.) a code pointer,=20=20 > b.) a hint which method / tool is used / would be accepted=20=20 > to compare performance?=20=20 > c.) 'just use a correctly rounded math library',=20=20 > a hint which and how to?=20=20 > ( I'm not! a pro in coding and 'system', just good in=20=20 > spotting weak points. ) The implementation [1] comes from Arm Optimized Routines and is believed to= be the best in the industry. It has been ported to GLIBC, Android and MUSL. Note pow() doesn't at any point deal with integers. It literally implements= pow (x, y) as exp (log (x) * y) with higher internal precision. You'd have to increase internal precision further with larger tables and polynomials - but even that is no guarantee it rounds all cases the way you want. You need correctly rounded math for that. Both Optimized Routines and GLIBC have internal tests and benchmarks. [1] https://github.com/ARM-software/optimized-routines/blob/master/math/pow= .c --=20 You are receiving this mail because: You are on the CC list for the bug.=