3 /* Stub for defining degree-valued trigonemetric functions using MPFR.
4 Copyright (C) 2000-2023 Free Software Foundation, Inc.
5 Contributed by Fritz Reese <foreese@gcc.gnu.org>
6 and Steven G. Kargl <kargl@gcc.gnu.org>
8 This file is part of GCC.
10 GCC is free software; you can redistribute it and/or modify it under
11 the terms of the GNU General Public License as published by the Free
12 Software Foundation; either version 3, or (at your option) any later
15 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
16 WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20 You should have received a copy of the GNU General Public License
21 along with GCC; see the file COPYING3. If not see
22 <http://www.gnu.org/licenses/>. */
26 #define RETURN(x) do { } while (0)
29 #define ISFINITE(x) mpfr_number_p(x)
30 #define D2R(x) deg2rad(x)
36 #define SIND simplify_sind
37 #define COSD simplify_cosd
38 #define TAND simplify_tand
40 /* cosd(30) === sqrt(3) / 2. */
41 #define SET_COSD30(x) do { \
42 mpfr_set_ui (x, 3, GFC_RND_MODE); \
43 mpfr_sqrt (x, x, GFC_RND_MODE); \
44 mpfr_div_ui (x, x, 2, GFC_RND_MODE); \
47 static RETTYPE SIND (FTYPE);
48 static RETTYPE COSD (FTYPE);
49 static RETTYPE TAND (FTYPE);
51 #include "../../libgfortran/intrinsics/trigd.inc"