On Mon, Dec 9, 2024 at 5:27 PM LIU Hao <lh_mo...@126.com> wrote:

>
> In mingw-w64 it's implemented in 'mingw-w64-crt/math/powi.def.h'. Mostly
> it's because rounding
> errors accumulate.
>
> Maybe `powl` shouldn't be implemented that way, however I don't know how
> to do that correctly.
>

I doubt that I'd be of much use in trying to rewrite it.
And as someone who has been relying on others to build gcc for me, my
capacity to test is probably also limited.

The issue seems to be with powl() specifically. At least, if a similar
issue exists with pow() and/or powq(), then I haven't struck it.
The debian devs apparently fixed this powl()  problem in glibc-2.17, and
then made more changes in 2.18 to improve on the performance degradation
that 2.17 had suffered as a result of the fix.

Correction:
Actually, there used to be some off-by-one-ULP errors (not limited to
MSWindows) with powq (eg powq(2.0Q, 0.5Q), but they all seem to have been
fixed in recent gcc releases.

Anyway .... if there's some way of getting this fixed, that would be
excellent.
Otherwise, I'll just accept that it requires a workaround whenever
correctness is expected.

Thanks for replying so promptly.

_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to