diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2020-12-16 10:24:47 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2020-12-16 10:24:47 +0000 |
commit | 2d2a160621779221cb81093f781ec6d937eda897 (patch) | |
tree | 7d62627a5f040abe447c6d42a721b7432ceba26d /src/sinu.c | |
parent | 85ddb25cb0d6c08210e3bee519db9d599d3d3ffe (diff) | |
download | mpfr-2d2a160621779221cb81093f781ec6d937eda897.tar.gz |
added sinpi, cospi, tanpi
git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14211 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/sinu.c')
-rw-r--r-- | src/sinu.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/sinu.c b/src/sinu.c index 277a92cf1..3fb2dc784 100644 --- a/src/sinu.c +++ b/src/sinu.c @@ -1,4 +1,5 @@ -/* mpfr_sinu -- sinu(x) = sin(2*pi*x/u) +/* mpfr_sinu -- sinu(x) = sin(2*pi*x/u) + mpfr_sinpi -- sinpi(x) = sin(pi*x) Copyright 2020 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. @@ -189,3 +190,9 @@ mpfr_sinu (mpfr_ptr y, mpfr_srcptr x, unsigned long u, mpfr_rnd_t rnd_mode) MPFR_SAVE_EXPO_FREE (expo); return underflow ? inexact : mpfr_check_range (y, inexact, rnd_mode); } + +int +mpfr_sinpi (mpfr_ptr y, mpfr_srcptr x, mpfr_rnd_t rnd_mode) +{ + return mpfr_sinu (y, x, 2, rnd_mode); +} |