From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 81E703858D33; Mon, 4 Mar 2024 14:58:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 81E703858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1709564305; bh=zMQeHIjMRlpfsAvRUROZr4Il66S8vwhSKpG+UiNhrXk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=tYvwQ8GVbXUMKFMcryMMf6R5eFQv++QtfTxtku8zrv/q4XOOLzStmg65Kl6t7Z1d9 KI0SIixhrAo4CtbKKV/f2GUhBeJACTE/O6PEBxbJNXM301GD76zTg22MD7SLkM+8Uc Ggtfime6+N2HjPb/svyDPerIdJLDdLZxaeIqHRJI= From: "wdijkstr at arm dot com" To: glibc-bugs@sourceware.org Subject: [Bug math/28472] pow(10, i) accuracy Date: Mon, 04 Mar 2024 14:58:23 +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: cc 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 Wilco changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wdijkstr at arm dot com --- Comment #15 from Wilco --- GLIBC double precision pow is the most accurate of all libraries tested at 0.523 ULP [1]. The new exp10 is also the most accurate of the 13 tested math libraries. If you complain about inaccuracies in the most accurate library then maybe = your expectations are a little bit off... The fact is, binary floating point cannot represent all powers of 10. If you don't like the rounding behaviour of floating point, don't use floating poi= nt. Note compilers optimize pow (C, x) into exp (x * log (C)) with -Ofast. Howe= ver if C is a multiple of 2 or 10, we could use exp2 or exp10 for slightly bett= er accuracy. [1] https://members.loria.fr/PZimmermann/papers/accuracy.pdf --=20 You are receiving this mail because: You are on the CC list for the bug.=