From 32ea95ab25f619c71ee439a1508daec2213e2da8 Mon Sep 17 00:00:00 2001 From: Andreas Enge Date: Tue, 24 May 2016 15:01:47 +0200 Subject: mpc_rootofunity: Finish adding the function. * doc/mpc.texi, NEWS: Document the function. * Makefile.vc: Add the new files. --- Makefile.vc | 4 ++++ NEWS | 2 +- doc/mpc.texi | 6 ++++++ 3 files changed, 11 insertions(+), 1 deletion(-) 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 -- cgit v1.2.1