Hi Joseph,

> I don't see tests for the various special cases from Annex F (for example,
> "tanpi(n) returns +0, for positive even and negative odd integers n." and
> "tanpi(n) returns -0, for positive odd and negative even integers n.").
> In such cases the sign of zero would need to be checked specifically (via
> copysign or signbit).

Thanks for the suggestions! The tests are now added; please check the attached
patch.

> Similar considerations may apply to other functions as well - and would be
> avoided by not trying to do the optimizations with older MPFR versions.

While conditionally optimizing these built-in functions based on the available
MPFR version seems beneficial, it poses a testing challenge. Specifically, test
cases would need a mechanism to dynamically determine the MPFR version in use.

Yuao

Attachment: 0001-gcc-middle-end-opt-for-trigonometric-pi-based-functi.patch
Description: 0001-gcc-middle-end-opt-for-trigonometric-pi-based-functi.patch

Reply via email to