https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93871
Fritz Reese <foreese at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #47883|0 |1 is obsolete| | Attachment #47913|0 |1 is obsolete| | --- Comment #44 from Fritz Reese <foreese at gcc dot gnu.org> --- Created attachment 48164 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48164&action=edit Patch for trunk Final version of patch submitted, pending final review. cf. https://gcc.gnu.org/pipermail/fortran/2020-March/054162.html and the containing thread for details. The patch includes and extends Steve's changes which rework the degree-valued trigonometric functions. COTAN is implemented as -TAN(x+pi/2) for REAL values, and COS(x)/SIN(x) for complex values. COTAND is implemented as -TAND(x+90). These are equivalent to 1/TAN[D] but should be faster than division. SIND, COSD, and TAND are rewritten to use Steve's range folding technique into [0, 45] both at runtime from libgfortran and at simplification time for constant expressions.