-
-
Notifications
You must be signed in to change notification settings - Fork 491
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from yyyyx4/public/35302
patches for PARI 2.15.3
- Loading branch information
Showing
6 changed files
with
92 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2.15.3 | ||
2.15.3.p1 |
189 changes: 0 additions & 189 deletions
189
build/pkgs/pari/patches/Keep-product-of-prime-numbers-to-use-in-Z_factor_limit.patch
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
From 7ca0c2eae87def89fa7253c60e4791a8ef26629d Mon Sep 17 00:00:00 2001 | ||
From: Bill Allombert <Bill.Allombert@math.u-bordeaux.fr> | ||
Date: Mon, 3 Apr 2023 15:30:26 +0200 | ||
Subject: [PATCH] quadunitindex(8461,2)->1 instead of 3 [#2466] | ||
|
||
--- | ||
src/basemath/quad.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/src/basemath/quad.c b/src/basemath/quad.c | ||
index 021a404b00..7ed554c2f3 100644 | ||
--- a/src/basemath/quad.c | ||
+++ b/src/basemath/quad.c | ||
@@ -359,7 +359,7 @@ quadunit_mod(GEN D, GEN N) | ||
GEN M = shifti(mulii(q, N), 1); | ||
quadunit_uvmod(D, d, M, &u, &v); | ||
u = diviiexact(u, q); | ||
- v = diviiexact(v, q); u = shifti(u,-1); | ||
+ v = modii(diviiexact(v, q), N); u = shifti(u,-1); | ||
} | ||
return deg1pol_shallow(v, u, 0); | ||
} | ||
-- | ||
2.40.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
diff --git a/src/basemath/ifactor1.c b/src/basemath/ifactor1.c | ||
index 526ac5c1b3..5fb4454353 100644 | ||
--- a/src/basemath/ifactor1.c | ||
+++ b/src/basemath/ifactor1.c | ||
@@ -3595,7 +3595,7 @@ ifactor_sign(GEN n, ulong all, long hint, long sn, GEN *pU) | ||
{ | ||
GEN M, N; | ||
pari_sp av; | ||
- long nb = 0, nb0 = 0, i; | ||
+ long nb = 0, nb0 = -1, i; | ||
ulong lim; | ||
forprime_t T; | ||
|
||
@@ -3666,7 +3666,7 @@ ifactor_sign(GEN n, ulong all, long hint, long sn, GEN *pU) | ||
affii(n, N); n = N; set_avma(av3); | ||
STOREu(&nb, p, k); | ||
} | ||
- if (p == 16381 && bit_accuracy(lgefint(n)) < 2048) | ||
+ if (!stop && p == 16381 && bit_accuracy(lgefint(n)) < 2048) | ||
{ stop = ifac_isprime(n); nb0 = nb; } | ||
if (stop) | ||
{ | ||
@@ -3706,15 +3706,14 @@ ifactor_sign(GEN n, ulong all, long hint, long sn, GEN *pU) | ||
long k; | ||
av = avma; | ||
k = isanypower_nosmalldiv(n, &x); | ||
- if (k > 1) affii(x, n); | ||
+ if (k > 1) { affii(x, n); nb0 = -1; } | ||
if (pU) | ||
{ | ||
GEN F; | ||
if (abscmpiu(n, lim) <= 0 | ||
|| cmpii(n, sqru(lim)) <= 0 | ||
- || ((nb > nb0 || k > 1) | ||
- && bit_accuracy(lgefint(n)) < 2048 && ifac_isprime(n))) | ||
+ || (nb > nb0 && bit_accuracy(lgefint(n)) < 2048 && ifac_isprime(n))) | ||
{ set_avma(av); STOREi(&nb, n, k); return aux_end(M,n, nb); } | ||
set_avma(av); F = aux_end(M, NULL, nb); /* don't destroy n */ | ||
*pU = mkvec2(icopy(n), utoipos(k)); /* composite cofactor */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters