https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82004

--- Comment #17 from Wilco <wilco at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #15)
> Created attachment 43464 [details]
> gcc8-pr82004.patch
> 
> Thus, does this fix the miscompare?  I'll bootstrap/regtest it on
> x86_64-linux and i686-linux, but don't have SPEC2k17 around.

It can't since the pow is in a loop:

   do n=0,nsub
     logchl = logchl + dlogchl
     chlamnt = 10**(logchl)

As noted above the code is very badly written, it expects pow(10,log10(x)) to
be bit-identical for any x. Even perfect rounding cannot avoid 0.5ULP
worst-case error.

Reply via email to