From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B0DA43858C74; Sat, 2 Mar 2024 22:53:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B0DA43858C74 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1709420016; bh=Or97t1HxII1J2WyFCTqiOkHXqf+HQOEdwFBQWlLb+CU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Lkd++79bG/9P1hwZzVNZEcBS6nuohmrjcIcKoJ+hJ5byNS5KBHyzNgu4X2P/6Pp8y a5Fk2Bb79+gJMKAq0eH1AvK0Or8zypXTwx3D1NJRoFU9q5tqc14MaHc2WYo+cKE4Ad I4C7ekqeV2a0q5Mo3pEXEhyg4Zi4sD/zWOuQYQ04= From: "vincent-srcware at vinc17 dot net" To: glibc-bugs@sourceware.org Subject: [Bug math/28472] pow(10, i) accuracy Date: Sat, 02 Mar 2024 22:53: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: vincent-srcware at vinc17 dot net 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 Vincent Lef=C3=A8vre changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |vincent-srcware at vinc17 = dot net --- Comment #14 from Vincent Lef=C3=A8vre --- (In reply to b. from comment #13) > (In reply to joseph@codesourcery.com from comment #12) > > I don't consider special-casing 10 in pow to be reasonable.=20=20 > As M Welinder pointed out in C#2 it's an IEEE recommendation to have these > values correct, and - again - it's important in rounding other values. What IEEE 754 recommends is that some math functions, like pow and exp10, be correctly rounded. If a function is not correctly rounded, there are no additional recommendations at all. In particular, IEEE 754 does not recomme= nd anything for some particular values, like powers of 10. Having special-casi= ng may be counter-productive, because this can make the function less smooth at these points and/or break monotonicity (though monotonicity is not guarante= ed). What could be done is to make such functions more accurate, say ensure fait= hful rounding for round-to-nearest (so with an error strictly less than 1 ulp of= the exact result and of the computed result), even though this would make them a bit slower. Users who do not care about the accuracy could still write fast= er (and less accurate) functions than those already provided, anyway. --=20 You are receiving this mail because: You are on the CC list for the bug.=