]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: Use mpfr_sinu etc. with mpfr 4.2.0+ for degree trigonometric functions ...
authorTobias Burnus <tburnus@baylibre.com>
Wed, 14 May 2025 07:12:13 +0000 (09:12 +0200)
committerTobias Burnus <tburnus@baylibre.com>
Wed, 14 May 2025 07:12:13 +0000 (09:12 +0200)
commitc91c226762b422c3c310227e26f9390f93fe9f4d
tree866cc4ee39d8044802d99862928de804238b7d89
parent629a4ec1073b7e46c6e8db0e8f2d1ab562ed7f49
Fortran: Use mpfr_sinu etc. with mpfr 4.2.0+ for degree trigonometric functions [PR120225]

As MPFR 4.2.0 added, support for degree trigonometric functions by via the
mpfr_...u functions (for u = 360), it makes sense to use them if available.
If MPFR is older, the current implementation is used as fallback.

PR fortran/120225

gcc/fortran/ChangeLog:

* simplify.cc: Include "trigd_fe.inc" only with MPFR < 4.2.0.
(rad2deg, rad2deg): Only define if MPFR < 4.2.0.
(gfc_simplify_acosd, gfc_simplify_asind, gfc_simplify_atand,
gfc_simplify_atan2d, gfc_simplify_cosd, gfc_simplify_tand,
gfc_simplify_cotand): Use mpfr_...u functions with MPFR >= 4.2.0.
gcc/fortran/simplify.cc