在 2026-7-3 01:44, Oleg Tolmatcev 写道:
When exp(real(z)) overflows, cexp() currently falls through to the generic infinite-result path. That path derives both components from the sincos() results, which is appropriate for non-zero imaginary arguments but not for the real-axis case.For z = x + 0i with x > MAXLOG, the mathematically expected result is Inf + 0i. Handle i_class == FP_ZERO before the generic overflow case so the function returns the overflowing real part unchanged and preserves the signed zero imaginary part from the input. Add a regression test covering cexp(MAXLOG + 1 + 0i) to lock in the Inf + 0i result. Signed-off-by: Oleg Tolmatcev <[email protected]> --- mingw-w64-crt/complex/cexp.def.h | 5 +++++ mingw-w64-crt/testcases/complex/cexp.c | 1 + 2 files changed, 6 insertions(+)
Thanks for the patch. Pushed now. -- Best regards, LIU Hao
OpenPGP_signature.asc
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
