On Wed, 31 Jul 2019, sisyphus wrote:

Martin,

I couldn't locate mingw-w64-crt/math/x86/pow.def.h on the internet (URL ?),

Here it is:
https://sourceforge.net/p/mingw-w64/mingw-w64/ci/master/tree/mingw-w64-crt/math/x86/pow.def.h

but I assume the patch is concerned with raising a NaN to a power.
Given that raising an input NaN to a power does not always result in a NaN,
it seems a little suspicious that this has come up under the subject
"properly propagate input NANs".

The patch makes sure to propagate the input NAN instead of making up a new one.

In short - I'm simply seeking reassurance that the case of raising a NaN to
the power of zero is still being correctly handled.

This patchset has been developed and tested with https://github.com/mstorsjo/llvm-mingw/blob/c99math/test/crt-test.c. In particular, see line 851 there. This testsuite passes with linux/x86_64/glibc, msvc (x86, x64, arm, arm64), and with this patchset, also with mingw-w64 on the same four architectures, with -lmsvcrt-os (msvcrt.dll), -lucrt (api-ms-win-crt-math-....dll) and -lucrtbase (ucrtbase.dll).

There may still be gaps in the testsuite, but pow(NAN, 0) == 1 and pow(1, NAN)
 == 1 are tested.

// Martin



_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to