aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJ08nY2017-05-01 22:07:38 +0200
committerJ08nY2017-05-01 22:07:38 +0200
commit7f933a25210a8c2a4eef63b94abac887ca8805ee (patch)
tree6b9f3b52e457e40e8576460570f300ed7d84f7b4 /src
parente990fed4bc44fb78d25b898bf2d271d1cb1cb92c (diff)
downloadecgen-7f933a25210a8c2a4eef63b94abac887ca8805ee.tar.gz
ecgen-7f933a25210a8c2a4eef63b94abac887ca8805ee.tar.zst
ecgen-7f933a25210a8c2a4eef63b94abac887ca8805ee.zip
Raise precision in anomalous curve generation
Diffstat (limited to 'src')
-rw-r--r--src/exhaustive/anomalous.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/exhaustive/anomalous.c b/src/exhaustive/anomalous.c
index c87d61c..7838aa8 100644
--- a/src/exhaustive/anomalous.c
+++ b/src/exhaustive/anomalous.c
@@ -57,9 +57,9 @@ static GEN anomalous_prime(size_t i, unsigned long bits) {
GEN upper = divii(subii(int2n(bits), last), D);
GEN lower_bound = gceil(gdiv(
- gsub(gsqrt(addis(mulis(lower, 4), 1), BIGDEFAULTPREC), gen_1), gen_2));
+ gsub(gsqrt(addis(mulis(lower, 4), 1), BIGDEFAULTPREC*2), gen_1), gen_2));
GEN upper_bound = gfloor(gdiv(
- gsub(gsqrt(addis(mulis(upper, 4), 1), BIGDEFAULTPREC), gen_1), gen_2));
+ gsub(gsqrt(addis(mulis(upper, 4), 1), BIGDEFAULTPREC*2), gen_1), gen_2));
GEN range = gtovec0(gen_0, 2);
gel(range, 1) = lower_bound;