https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113152

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu.org

--- Comment #19 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Note that C23 added Trigonometric functions: acospi, asinpi, atan2pi, atanpi,
cospi, sinpi, tanpi.
That's supported, e.g., in Glibc 2.41.

IMHO, the proper way is to add the proper __builtin_ to GCC and use it in
Fortran with a fallback in libgfortran (like we have for C99) and an mpfr
implentation both in gcc/simplify.cc for constant expressions and in fold*.cc
for expressions that only become constant after value propagation.

Note that mpfr 4.2.0 added functions mpfr_cospi, mpfr_sinpi, mpfr_tanpi,
mpfr_acospi, mpfr_asinpi, mpfr_atanpi and mpfr_atan2pi. This implies that we
should use it by default, only falling back to a replacement if mpfr is too
old.

Reply via email to