在 2026-1-9 00:05, Markus Mützel via Mingw-w64-public 写道:
C23 added trigonometric math functions that act on half-revolutions.
Implement them in C.

Reduce the input argument of `sinpi?` and `tanpi?` to the interval [-1, +1]
before passing the actual calculation on to `sin?` or `tan?`, respectively.
Reduce the input argument of `cospi?` to the interval [0, 2] before passing
the calculation on to `cos?`.

For `acospi?`, `asinpi?`, `atanpi?`, and `atan2pi?`, pass the actual
calculation on to `acos?`, `asin?`, `atan?`, or `atan2?`, respectively,
without any domain reduction.


Compared to the last patch, the new functions are now defined in separate files
and added to libmingwex. Also, the new functions are now declared in `math.h`
when building the CRT independent of the C standard version.

This patch duplicates the definition of `M_PI` in every file. I think for `M_PI` you can just `#define _USE_MATH_DEFINES` before including <math.h>. If it doesn't work, you can add it to `AM_CPPFLAGS`.



--
Best regards,
LIU Hao

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

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

Reply via email to