summaryrefslogtreecommitdiff
path: root/src/rootofunity.c
Commit message (Collapse)AuthorAgeFilesLines
* rootofunity: Use a better approximation of the lost bits.rootofunityAndreas Enge2016-07-221-5/+11
| | | | | | | | * src/rootofunity.c [mpc_rootofunity]: Drop the absolute bound for the number of lost bits in favour of a bound depending on the exponents of the result. * tests/rootofunity.dat: Add examples with large n, that is, a result close to the axes.
* rootofunity: Handle powers of roots of order n = 3, 4, 6, 8, 12.Andreas Enge2016-07-221-8/+43
| | | | | | * src/rootofunity.c [mpc_rootofunity]: Handle powers for special n. * tests/rootofunity.dat: Add corresponding tests, in particular with directed rounding.
* rootofunity: Allow powers of primitive roots of unity.Andreas Enge2016-07-221-13/+47
| | | | | | | | | | | | * src/mpc.h: Change the prototype of rootofunity. * doc/mpc.texi: Document the change. * src/rootofunity.c [gcd]: New function. [rootofunity]: Adapt the algorithm. The special cases of n are not yet handled. Correct a mistake in the error analysis, leading to wrong results for large n. * tests/trootofunity.c, tests/rootofunity.dsc, src/rootofunity.c: Adapt the tests.
* fixed case n=12 + added case n=8Paul Zimmermann2016-05-241-3/+10
|
* rootofunity: Handle special case of order 0.Andreas Enge2016-05-241-0/+6
| | | | | | | * src/rootofunity.c: Return NaN+i*NaN on input 0. * tests/rootofunity.dat: New file. * tests/Makefile.am: Register new file. * tests/trootofunity.c: Use data file for tests.
* rootofunity: Adapt to current mpc code and compilers.Andreas Enge2016-05-241-12/+12
| | | | | | * src/rootofunity.c: Replace mpc_div_2exp by mpc_div_2ui and GMP_RND* by MPFR_RND*. * tests/trootofunity.c: Correct a signedness warning.
* rootsofunity: use mean value theorem for analysis (suggested by Damien Robert)Andreas Enge2016-05-241-4/+4
| | | | git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/mpc/branches/rootsunity@1197 211d60ee-9f03-0410-a15a-8952a2c7a4e4
* implemented rootofunityAndreas Enge2016-05-241-0/+86
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/mpc/branches/rootsunity@1194 211d60ee-9f03-0410-a15a-8952a2c7a4e4