Skip to content

Commit 970d115

Browse files
committed
use to_ZZ() to convert integers>2^31 to bigint
1 parent 6e0e7c3 commit 970d115

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

libsrc/eclib/xmod.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ inline bigint xmodmul(const bigint& a, const bigint& b, const bigint& m) {return
203203

204204
#if(1)
205205
const int DEFAULT_MODULUS = BIGPRIME;
206-
// table of inversers of residues<20 modulo BIGPRIME:
206+
// table of inverses of residues<20 modulo BIGPRIME:
207207
static int table_invs[20] = {0,1, 536870895, 357913930, 805306342, 214748358, 178956965, 920350105, 402653171, 477218573, 107374179, 97612890, 626349377, 330382089, 997045947, 71582786, 738197480, 442128972, 775480181, 226050903};
208208
#else
209209
const int DEFAULT_MODULUS = 1073741783; //BIGPRIME-6;

tests/tegros.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ int main(void)
4545
cout << "Q("<<S5<<", 6) has "<<Q_S5_6.size() << " elements (should be "<<2*pow(6,S5.size())<<")\n";
4646
cout<<endl;
4747

48-
bigrational j(bigint(272223782641), bigint(164025));
48+
bigrational j(to_ZZ("272223782641"), bigint(164025));
4949
cout<<"Curves with good reduction outside "<<S5<<" and j = "<<j;
5050
if (is_j_possible(j,S5))
5151
cout <<" do exist"<<endl;
@@ -66,7 +66,7 @@ int main(void)
6666
cout << "Elliptic curves with conductor a power of 11, from their known j-invariants" << endl;
6767
vector<bigrational> j11 = {
6868
bigrational(bigint(-122023936), bigint(161051)),
69-
bigrational(bigint(-52893159101157376), bigint(11)),
69+
bigrational(to_ZZ("-52893159101157376"), bigint(11)),
7070
bigrational(bigint(-4096), bigint(11)),
7171
bigrational(bigint(-121)),
7272
bigrational(bigint(-32768)),

tests/telog.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ int main(){
113113
/*
114114
// a curve (7998K1) with rank 1 and 5-torsion:
115115
116-
Curve c(1,0,0,5355560,7740216896);
116+
Curve c(1,0,0,5355560,to_ZZ("7740216896");
117117
Curvedata cd(c,1);
118118
119119
Point P0(cd, bigint(-248),bigint(80104)) ;

0 commit comments

Comments
 (0)