On Mon, 18 May 2026 13:14:37 GMT, zimmermann6 <[email protected]> wrote:
> I confirm this fixes the issue. With the following patch to openlibm 0.8.7 (I > don't have easy access to openjdk with my tools, and I didn't update the > comment): > > ``` > $ diff e_pow.c.orig e_pow.c > 95,96c95,96 > < ivln2_h = 1.44269502162933349609e+00, /* 0x3FF71547, 0x60000000 =24b > 1/ln2*/ > < ivln2_l = 1.92596299112661746887e-08; /* 0x3E54AE0B, 0xF85DDF44 =1/ln2 > tail*/ > --- > > ivln2_h = 1.4426946640014648438, /* 0x3FF71547, 0x60000000 =24b 1/ln2*/ > > ivln2_l = 3.7688749856360991145e-07; /* 0x3E54AE0B, 0xF85DDF44 =1/ln2 > > tail*/ > ``` > > the maximal error I find reduces to less than 1 ulp: > > ``` > Checking pow with openlibm-0.8.7-patched > pow 0 -1 0x1.a26d96e778dc8p+163,0x1.90d5de9f964f6p-9 [0.895] 0.894019 > 0.8940184425798512 > ``` > > This matches the maximal error found by Newlib 4.6.0 (our comparison says > 0.892 but it is indeed 0.895). I guess a similar patch was applied to Newlib > between 4.50 (which has a maximal error of 169 ulps) and 4.6.0. Thank you for confirming @zimmermann6 . ------------- PR Comment: https://git.openjdk.org/jdk/pull/30984#issuecomment-4482344019
