summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Enge <andreas.enge@inria.fr>2016-05-24 15:01:47 +0200
committerAndreas Enge <andreas.enge@inria.fr>2016-05-24 16:21:43 +0200
commit32ea95ab25f619c71ee439a1508daec2213e2da8 (patch)
treed771e9be5836e413aa6ee2516134b9f828d4a1b4
parentc05dc11ea88df618095f152adc1cdadbada8e626 (diff)
downloadmpc-git-32ea95ab25f619c71ee439a1508daec2213e2da8.tar.gz
mpc_rootofunity: Finish adding the function.
* doc/mpc.texi, NEWS: Document the function. * Makefile.vc: Add the new files.
-rw-r--r--Makefile.vc4
-rw-r--r--NEWS2
-rw-r--r--doc/mpc.texi6
3 files changed, 11 insertions, 1 deletions
diff --git a/Makefile.vc b/Makefile.vc
index 201ddfe..32c92b6 100644
--- a/Makefile.vc
+++ b/Makefile.vc
@@ -159,6 +159,7 @@ $(DIRMPC)\pow_ui.obj \
$(DIRMPC)\pow_z.obj \
$(DIRMPC)\proj.obj \
$(DIRMPC)\real.obj \
+$(DIRMPC)\rootofunity.obj \
$(DIRMPC)\set.obj \
$(DIRMPC)\set_prec.obj \
$(DIRMPC)\set_str.obj \
@@ -237,6 +238,7 @@ pow_ui.obj \
pow_z.obj \
proj.obj \
real.obj \
+rootofunity.obj \
set.obj \
set_prec.obj \
set_str.obj \
@@ -403,6 +405,8 @@ test :
cd $(DIRMPCTESTS) && treal.exe && cd ..
$(TESTCOMPILE)treimref.c $(MIDTESTCOMPILE)treimref.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && treimref.exe && cd ..
+ $(TESTCOMPILE)trootofunity.c $(MIDTESTCOMPILE)trootofunity.exe $(ENDTESTCOMPILE)
+ cd $(DIRMPCTESTS) && trootofunity.exe && cd ..
$(TESTCOMPILE)tset.c $(MIDTESTCOMPILE)tset.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tset.exe && cd ..
$(TESTCOMPILE)tsin.c $(MIDTESTCOMPILE)tsin.exe $(ENDTESTCOMPILE)
diff --git a/NEWS b/NEWS
index 4971f7f..be9557e 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,6 @@
Recent changes in the trunk:
- Minimally required library version: mpfr 3.0.0
- - New function: mpc_cmp_abs
+ - New functions: mpc_cmp_abs, mpc_rootofunity
- Improved speed for corner cases of mpc_asin, mpc_sin, see
http://lists.gforge.inria.fr/pipermail/mpc-discuss/2013-December/001266.html
- Rewrite of the testing framework
diff --git a/doc/mpc.texi b/doc/mpc.texi
index 6286347..aa629a1 100644
--- a/doc/mpc.texi
+++ b/doc/mpc.texi
@@ -981,6 +981,12 @@ so that the imaginary part of the result lies in
@math{]-\pi , \pi]} and @math{]-\pi/log(10) , \pi/log(10)]} respectively.
@end deftypefun
+@deftypefun int mpc_rootofunity (mpc_t @var{rop}, unsigned long int @var{n}, mpc_rnd_t @var{rnd})
+Set @var{rop} to the standard primitive @var{n}-th root of unity,
+@math{\exp (2 \pi i / n)},
+rounded according to @var{rnd} with the precision of @var{rop}.
+@end deftypefun
+
@node Trigonometric Functions
@section Trigonometric Functions