175584Sru
275584Sru
375584Sru/* Stub for defining degree-valued trigonemetric functions using MPFR.
475584Sru   Copyright (C) 2000-2020 Free Software Foundation, Inc.
575584Sru   Contributed by Fritz Reese <foreese@gcc.gnu.org>
675584Sru   and Steven G. Kargl <kargl@gcc.gnu.org>
775584Sru
875584SruThis file is part of GCC.
975584Sru
1075584SruGCC is free software; you can redistribute it and/or modify it under
1175584Sruthe terms of the GNU General Public License as published by the Free
1275584SruSoftware Foundation; either version 3, or (at your option) any later
1375584Sruversion.
1475584Sru
1575584SruGCC is distributed in the hope that it will be useful, but WITHOUT ANY
1675584SruWARRANTY; without even the implied warranty of MERCHANTABILITY or
1775584SruFITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1875584Srufor more details.
1975584Sru
2075584SruYou should have received a copy of the GNU General Public License
2175584Srualong with GCC; see the file COPYING3.  If not see
2275584Sru.  */
2375584Sru
2475584Sru#define FTYPE mpfr_t
2575584Sru#define RETTYPE void
2675584Sru#define RETURN(x) do { } while (0)
2775584Sru#define ITYPE mpz_t
2875584Sru
2975584Sru#define ISFINITE(x) mpfr_number_p(x)
3075584Sru#define D2R(x) deg2rad(x)
3175584Sru
3275584Sru#define ENABLE_SIND
3375584Sru#define ENABLE_COSD
3475584Sru#define ENABLE_TAND
3575584Sru
3675584Sru#define SIND simplify_sind
3775584Sru#define COSD simplify_cosd
3875584Sru#define TAND simplify_tand
3975584Sru
4075584Sru/* cosd(30) === sqrt(3) / 2.  */
4175584Sru#define SET_COSD30(x) do { \
4275584Sru    mpfr_set_ui (x, 3, GFC_RND_MODE); \
4375584Sru    mpfr_sqrt (x, x, GFC_RND_MODE); \
4475584Sru    mpfr_div_ui (x, x, 2, GFC_RND_MODE); \
4575584Sru  } while (0)
4675584Sru
4775584Srustatic RETTYPE SIND (FTYPE);
4875584Srustatic RETTYPE COSD (FTYPE);
4975584Srustatic RETTYPE TAND (FTYPE);
5075584Sru
5175584Sru#include "../../libgfortran/intrinsics/trigd.inc"
5275584Sru
5375584Sru/* vim: set ft=c: */
5475584Sru