Home
last modified time | relevance | path

Searched refs:ModP (Results 1 – 25 of 32) sorted by relevance

12

/dports/math/cocoalib/CoCoALib-0.99712/src/AlgebraicCore/
H A DDUPFp.C89 DUPFp ans(d, ModP);
120 return f * ModP.myRecip(c);
131 f *= ModP.myRecip(c);
406 F[i+DegShift] = ModP.myAdd(F[i+DegShift], MultTbl[ModP.myExportNonNeg(G[i])]); in ShiftAdd()
522 DUPFp fprime(d-1, ModP); in deriv()
524 fprime.myCoeffs[i-1] = ModP.myMul(ModP.myReduce(i), f.myCoeffs[i]); in deriv()
543 const FpElem q = ModP.myNegate(ModP.myDiv(LC(f), LC(g))); in EuclidAlgm()
578 DUPFp m12(deg(f), ModP); in ExtEuclidAlgm()
579 DUPFp m21(deg(g), ModP); in ExtEuclidAlgm()
585 const FpElem q = ModP.myNegate(ModP.myDiv(LC(f), LC(g))); in ExtEuclidAlgm()
[all …]
H A DMatrixFp.C52 myArith(ModP), in MatrixFp()
110 ans(i,j) = ModP.myNormalize(sum); in MulByTr()
270 MatrixFp Mcopy(ModP, rows, cols); in LinSolveFp()
324 const SmallFpImpl::value q = ModP.myNegate(ModP.myRecip(ThisRow[j])); // surely non-zero in LinKerFp()
326 M(j,i) = ModP.myMul(q, ModP.myNormalize(M(j,i))); in LinKerFp()
404 myArith(ModP), in LinDepFp()
510 const SmallFpImpl& ModP = ModPArith(M); in det() local
511 const long p = ModP.myModulus(); in det()
574 M(row,j)/*Mrow[j]*/ = ModP.myMul(inv, ModP.myNormalize(CurrRow[j])); in det()
586 return ModP.myModulus() - ModP.myExportNonNeg(DiagProd); in det()
[all …]
H A DSmallFqUtils.C51 SmallFpImpl ModP(p); in VectorToPoly()
58 … f += ModP.myExport(v[i]); // inefficient because it forces reduction mod p of result of myExport! in VectorToPoly()
63 void next(const SmallFpImpl& ModP, vector<SmallFpImpl::value>& v) in next() argument
68 v[i] = ModP.myAdd(v[i],one(SmallFp)); in next()
105 bool IsGroupGen(const SmallFpImpl& ModP, const std::vector<SmallFpImpl::value>& MinPoly) in IsGroupGen() argument
110 const long p = ModP.myModulus(); in IsGroupGen()
126 SmallFpImpl ModP(p); in FindGroupGenerator()
133 while (!IsGroupGen(ModP, f)) in FindGroupGenerator()
134 next(ModP,f); in FindGroupGenerator()
H A DSparsePolyOps-implicit.C985 SmallFpImpl ModP(p); in ImplicitByPoints2()
1048 const SmallFpImpl::value c2 = ModP.myNegate(ModP.myDiv(coordi, RowReducers2[i][i])); in ImplicitByPoints2()
1053 NewPolyx += ModP.myExportNonNeg(c2)*polyx[i]; in ImplicitByPoints2()
1061 if (IterCount == ModP.myMaxIters()) in ImplicitByPoints2()
1067 NewRow2[j] = ModP.myHalfNormalize(NewRow2[j]); in ImplicitByPoints2()
1116 SmallFpImpl ModP(p); in ImplicitByPoints3()
1149 QBvalue[0] = ModP.myReduce(1); in ImplicitByPoints3()
1158 const long ReduceNow = ModP.myMaxIters(); in ImplicitByPoints3()
1236 const SmallFpImpl::value q = ModP.myNegate(ModP.myDiv(coordi, RowReducers[i][i])); in ImplicitByPoints3()
1250 if (IterCount == ModP.myMaxIters()) in ImplicitByPoints3()
[all …]
H A DRingFqVec.C410 const SmallFpImpl& ModP(myImpl.myFpArith()); in myOutput()
412 out << "[" << ModP.myExport(v[0]); in myOutput()
414 out << ", " << ModP.myExport(v[i]); in myOutput()
/dports/math/giacxcas/CoCoALib-0.99700/src/AlgebraicCore/
H A DDUPFp.C89 DUPFp ans(d, ModP);
120 return f * ModP.myRecip(c);
131 f *= ModP.myRecip(c);
406 F[i+DegShift] = ModP.myAdd(F[i+DegShift], MultTbl[ModP.myExportNonNeg(G[i])]); in ShiftAdd()
522 DUPFp fprime(d-1, ModP); in deriv()
524 fprime.myCoeffs[i-1] = ModP.myMul(ModP.myReduce(i), f.myCoeffs[i]); in deriv()
543 const FpElem q = ModP.myNegate(ModP.myDiv(LC(f), LC(g))); in EuclidAlgm()
578 DUPFp m12(deg(f), ModP); in ExtEuclidAlgm()
579 DUPFp m21(deg(g), ModP); in ExtEuclidAlgm()
585 const FpElem q = ModP.myNegate(ModP.myDiv(LC(f), LC(g))); in ExtEuclidAlgm()
[all …]
H A DMatrixFp.C52 myArith(ModP), in MatrixFp()
110 ans(i,j) = ModP.myNormalize(sum); in MulByTr()
270 MatrixFp Mcopy(ModP, rows, cols); in LinSolveFp()
324 const SmallFpImpl::value q = ModP.myNegate(ModP.myRecip(ThisRow[j])); // surely non-zero in LinKerFp()
326 M(j,i) = ModP.myMul(q, ModP.myNormalize(M(j,i))); in LinKerFp()
404 myArith(ModP), in LinDepFp()
510 const SmallFpImpl& ModP = ModPArith(M); in det() local
511 const long p = ModP.myModulus(); in det()
574 M(row,j)/*Mrow[j]*/ = ModP.myMul(inv, ModP.myNormalize(CurrRow[j])); in det()
586 return ModP.myModulus() - ModP.myExportNonNeg(DiagProd); in det()
[all …]
H A DSmallFqUtils.C51 SmallFpImpl ModP(p); in VectorToPoly()
58 … f += ModP.myExport(v[i]); // inefficient because it forces reduction mod p of result of myExport! in VectorToPoly()
63 void next(const SmallFpImpl& ModP, vector<SmallFpImpl::value>& v) in next() argument
68 v[i] = ModP.myAdd(v[i],one(SmallFp)); in next()
105 bool IsGroupGen(const SmallFpImpl& ModP, const std::vector<SmallFpImpl::value>& MinPoly) in IsGroupGen() argument
110 const long p = ModP.myModulus(); in IsGroupGen()
126 SmallFpImpl ModP(p); in FindGroupGenerator()
133 while (!IsGroupGen(ModP, f)) in FindGroupGenerator()
134 next(ModP,f); in FindGroupGenerator()
H A DSparsePolyOps-implicit.C985 SmallFpImpl ModP(p); in ImplicitByPoints2()
1048 const SmallFpImpl::value c2 = ModP.myNegate(ModP.myDiv(coordi, RowReducers2[i][i])); in ImplicitByPoints2()
1053 NewPolyx += ModP.myExportNonNeg(c2)*polyx[i]; in ImplicitByPoints2()
1061 if (IterCount == ModP.myMaxIters()) in ImplicitByPoints2()
1067 NewRow2[j] = ModP.myHalfNormalize(NewRow2[j]); in ImplicitByPoints2()
1116 SmallFpImpl ModP(p); in ImplicitByPoints3()
1149 QBvalue[0] = ModP.myReduce(1); in ImplicitByPoints3()
1158 const long ReduceNow = ModP.myMaxIters(); in ImplicitByPoints3()
1236 const SmallFpImpl::value q = ModP.myNegate(ModP.myDiv(coordi, RowReducers[i][i])); in ImplicitByPoints3()
1250 if (IterCount == ModP.myMaxIters()) in ImplicitByPoints3()
[all …]
H A DRingFqVec.C410 const SmallFpImpl& ModP(myImpl.myFpArith()); in myOutput()
412 out << "[" << ModP.myExport(v[0]); in myOutput()
414 out << ", " << ModP.myExport(v[i]); in myOutput()
/dports/math/cocoalib/CoCoALib-0.99712/examples/
H A Dex-SmallFp1.C33 SmallFpImpl ModP(p); in program()
35 a = ModP.myReduce(99); // a = 99; mod p in program()
36 b = ModP.myReduce(28); // b = 28; mod p in program()
37 c = ModP.myReduce(-3); // c = -3; mod p in program()
38 a = ModP.myAdd(b,c); // a = b+c; also mySub, myMul, myDiv in program()
39 a = ModP.myNegate(a); // a = -a; in program()
40 a = ModP.myRecip(a); // a = 1/a; in program()
42 b = ModP.myPower(a,p-1); // b = a^(p-1); where ^ means "power" in program()
45 a = ModP.myAddMul(a,b,c); // a = a+b*c; in program()
47 const long B = ModP.myExport(b); // deliver value of b as a long (see ex-SmallFp2) in program()
H A Dex-SmallFp2.C22 void PrintFpElems(const SmallFpImpl& ModP) in PrintFpElems() argument
24 cout << "Exported values from " << ModP << endl; in PrintFpElems()
28 cout << ModP.myExport(a) << " "; in PrintFpElems()
29 a = ModP.myAdd(a,one(SmallFp)); in PrintFpElems()
/dports/math/giacxcas/CoCoALib-0.99700/examples/
H A Dex-SmallFp1.C33 SmallFpImpl ModP(p); in program()
35 a = ModP.myReduce(99); // a = 99; mod p in program()
36 b = ModP.myReduce(28); // b = 28; mod p in program()
37 c = ModP.myReduce(-3); // c = -3; mod p in program()
38 a = ModP.myAdd(b,c); // a = b+c; also mySub, myMul, myDiv in program()
39 a = ModP.myNegate(a); // a = -a; in program()
40 a = ModP.myRecip(a); // a = 1/a; in program()
42 b = ModP.myPower(a,p-1); // b = a^(p-1); where ^ means "power" in program()
45 a = ModP.myAddMul(a,b,c); // a = a+b*c; in program()
47 const long B = ModP.myExport(b); // deliver value of b as a long (see ex-SmallFp2) in program()
H A Dex-SmallFp2.C22 void PrintFpElems(const SmallFpImpl& ModP) in PrintFpElems() argument
24 cout << "Exported values from " << ModP << endl; in PrintFpElems()
28 cout << ModP.myExport(a) << " "; in PrintFpElems()
29 a = ModP.myAdd(a,one(SmallFp)); in PrintFpElems()
/dports/math/cocoalib/CoCoALib-0.99712/src/tests/
H A Dtest-SmallFp2.C37 SmallFpImpl ModP(p); in OverFlowTest()
39 SmallFpImpl::value p1=ModP.myReduce(p-1); in OverFlowTest()
40 const long limit = ModP.myMaxIters(); in OverFlowTest()
43 SmallFpImpl::NonRedValue ans=ModP.myReduce(InitVal); in OverFlowTest()
50 ans = ModP.myHalfNormalize(ans); in OverFlowTest()
53 CoCoA_ASSERT_ALWAYS(ModP.myNormalize(ans) == ModP.myReduce(InitVal)); in OverFlowTest()
/dports/math/giacxcas/CoCoALib-0.99700/src/tests/
H A Dtest-SmallFp2.C37 SmallFpImpl ModP(p); in OverFlowTest()
39 SmallFpImpl::value p1=ModP.myReduce(p-1); in OverFlowTest()
40 const long limit = ModP.myMaxIters(); in OverFlowTest()
43 SmallFpImpl::NonRedValue ans=ModP.myReduce(InitVal); in OverFlowTest()
50 ans = ModP.myHalfNormalize(ans); in OverFlowTest()
53 CoCoA_ASSERT_ALWAYS(ModP.myNormalize(ans) == ModP.myReduce(InitVal)); in OverFlowTest()
/dports/security/putty/putty-0.76/test/
H A Deccref.py20 self.x = ModP(self.curve.p, args[0])
21 self.y = ModP(self.curve.p, args[1])
112 self.a = ModP(p, a)
113 self.b = ModP(p, b)
158 self.a = ModP(p, a)
159 self.b = ModP(p, b)
190 self.d = ModP(p, d)
191 self.a = ModP(p, a)
205 y = ModP(self.p, y)
H A Dnumbertheory.py186 class ModP(object): class
284 if isinstance(n, ModP):
287 if isinstance(m, ModP):
/dports/security/putty-nogtk/putty-0.76/test/
H A Deccref.py20 self.x = ModP(self.curve.p, args[0])
21 self.y = ModP(self.curve.p, args[1])
112 self.a = ModP(p, a)
113 self.b = ModP(p, b)
158 self.a = ModP(p, a)
159 self.b = ModP(p, b)
190 self.d = ModP(p, d)
191 self.a = ModP(p, a)
205 y = ModP(self.p, y)
H A Dnumbertheory.py186 class ModP(object): class
284 if isinstance(n, ModP):
287 if isinstance(m, ModP):
/dports/math/cocoalib/CoCoALib-0.99712/include/CoCoA/
H A DMatrixFp.H40 MatrixFp(const SmallFpImpl& ModP, int nrows, int ncols);
76 LinDepFp(const SmallFpImpl& ModP, long dim);
97 RowRednFp(const SmallFpImpl& ModP, long dim);
H A DDUPFp.H79 DUPFp ConvertToDUPFp(const SmallFpImpl& ModP, ConstRefRingElem f);
/dports/math/giacxcas/CoCoALib-0.99700/include/CoCoA/
H A DMatrixFp.H40 MatrixFp(const SmallFpImpl& ModP, int nrows, int ncols);
76 LinDepFp(const SmallFpImpl& ModP, long dim);
97 RowRednFp(const SmallFpImpl& ModP, long dim);
H A DDUPFp.H79 DUPFp ConvertToDUPFp(const SmallFpImpl& ModP, ConstRefRingElem f);
/dports/editors/texstudio/texstudio-4.1.2/completion/
H A Dcomplexity.cwl201 \ModP

12