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

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #56949|0                           |1
        is obsolete|                            |
  Attachment #56950|0                           |1
        is obsolete|                            |
  Attachment #56951|0                           |1
        is obsolete|                            |
  Attachment #56952|0                           |1
        is obsolete|                            |
  Attachment #56956|0                           |1
        is obsolete|                            |

--- Comment #12 from kargl at gcc dot gnu.org ---
Created attachment 57179
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57179&action=edit
Patch

Here is a new patch.  It includes an implementation for the half-cycle
trigonometric functions as well as fixes for

PR113412 -- better error message for atan(y,x)
PR113413 -- implement atand(y,x)

Here's text that may be suitable formatted for a ChangeLog.

gfortran:

        * gfortran.h (gfc_isym_id): Add GFC_ISYM_ACOSPI, GFC_ISYM_ASINPI,
        GFC_ISYM_ATANPI, GFC_ISYM_ATAN2PI, GFC_ISYM_COSPI, GFC_ISYM_SINPI, and
        GFC_ISYM_TANPI
        * intrinsic.cc (do_check): Whitespace and typo in comments.
        (add_functions): Add two-argument form of ATAND.  Add half-cycle 
        trigonometric functions ACOSPI, ASINPI, ATANPI, ATAN2PI, COSPI,
        SINPI, and TANPI.
        (sort_actual): Generate sensible error messages for two argument
        versions of ATAN, ATAND, and ATANPI.
        * intrinsic.h: New prototypes for gfc_simplify_acospi, 
        gfc_simplify_asinpi, gfc_simplify_atanpi, gfc_simplify_atan2pi,
        gfc_simplify_cospi, gfc_simplify_sinpi, gfc_simplify_tanpi,
        gfc_resolve_acospi, gfc_resolve_asinpi, gfc_resolve_atanpi,
        gfc_resolve_atan2pi, gfc_resolve_cospi, gfc_resolve_sinpi, and
        gfc_resolve_tanpi
        * intrinsic.texi: Document new functions ACOSPI, ASINPI, ATANPI,
        ATAN2PI, COSPI, SINPI, and TANPI.  Put the ATAN* family of functions
        in lexigraphical order.
        * iresolve.cc (gfc_resolve_acospi, gfc_resolve_asinpi,
        gfc_resolve_atanpi, gfc_resolve_atan2pi, gfc_resolve_cospi,
        gfc_resolve_sinpi, gfc_resolve_tanpi):  New functions.
        * simplify.cc (gfc_simplify_acospi, gfc_simplify_asinpi,
        gfc_simplify_atanpi, gfc_simplify_atan2pi, gfc_simplify_cospi,
        gfc_simplify_sinpi, gfc_simplify_tanpi): New functions.
        Introduce MPFR_HALF_CYCLE macros to use MPFR half-cycle functions
        if available.
        * trans-intrinsic.cc: Declare asinpi, acospi, atanpi, atan2pi, sinpi, 
        cospi, and tanpi as LIB_FUNCTION's.

libgfortran 

        *Makefile.am: New files trigpi.c, trigpi_fallback1.c, and
        trigpi_fallback2.F90
        * configure.ac: Check libm for float, double, and long double
        functions for asinpi, acospi, atanpi, atan2pi, sinpi, cospi, and
        tanpi
        * Makefile.in: Regenerated.
        * config.h.in: Ditto.
        * configure: Ditto.
        * gfortran.map: Add GFORTRAN_14 section to expose the library
        symbols.
        * trigpi.c: Fallback implementations of the half-cycle trigonometric
        functions.
        * trigpi_fallback1.c: Fallback functions for float, double, and
        long double routines if libm does provide them.
        * trigpi_fallback2.F90: REAL(16)/REAL(17) fallback implementations
        of the half-cycle trigonometric functions.

Reply via email to