diff --git a/src_matrix/MAT_Matrix_SubsetSolver.h b/src_matrix/MAT_Matrix_SubsetSolver.h index 4bcc673..a64be3a 100644 --- a/src_matrix/MAT_Matrix_SubsetSolver.h +++ b/src_matrix/MAT_Matrix_SubsetSolver.h @@ -56,7 +56,6 @@ struct SubsetRankOneSolver_Acceleration { // // Faster modular version of EXT_red // - std::cerr << "SubsetRankOneSolver_Acceleration, constructor, step 1\n"; max_bits = 0; EXT_fast = MyMatrix(nbRow, nbCol); EXT_lift = MyMatrix(nbRow, nbCol); @@ -70,16 +69,13 @@ struct SubsetRankOneSolver_Acceleration { } try_int = (max_bits <= 30); max_bits += get_bit(static_cast(nbCol)); - std::cerr << "SubsetRankOneSolver_Acceleration, constructor, step 2\n"; } MyVector GetKernelVector(Face const& sInc) { - std::cerr << "SubsetRankOneSolver_Acceleration, GetKernelVector, step 1\n"; size_t nb = sInc.count(); MyVector Vkernel(nbCol); bool failed_int = false; if (try_int) { - std::cerr << "SubsetRankOneSolver_Acceleration, GetKernelVector, step 2\n"; boost::dynamic_bitset<>::size_type jRow = sInc.find_first(); auto f = [&](MyMatrix &M, size_t eRank, [[maybe_unused]] size_t iRow) -> void { @@ -88,7 +84,6 @@ struct SubsetRankOneSolver_Acceleration { }; MyVector Vzero_Tfast = NullspaceTrMatTargetOne_Kernel(nb, nbCol, f); - std::cerr << "SubsetRankOneSolver_Acceleration, GetKernelVector, step 3\n"; // check result at full precision in case of overflows bool allzero = true; for (int iCol = 0; iCol < nbCol; iCol++) { @@ -97,28 +92,23 @@ struct SubsetRankOneSolver_Acceleration { break; } } - std::cerr << "SubsetRankOneSolver_Acceleration, GetKernelVector, step 4\n"; if (allzero) { failed_int = true; } else { - std::cerr << "SubsetRankOneSolver_Acceleration, GetKernelVector, step 5\n"; MyVector VZ_lift(nbCol); // reconstruct the vector size_t max_bits_NSP = 0; - std::cerr << "nbCol=" << nbCol << " |Vzero_Tfast|=" << Vzero_Tfast.size() << " |lifts|=" << lifts.size() << "\n"; lifts[0] = Vzero_Tfast(0, 0).rational_lift(); Tlift lcm = lifts[0].second; for (int iCol = 1; iCol < nbCol; iCol++) { lifts[iCol] = Vzero_Tfast(iCol).rational_lift(); lcm = LCMpair(lcm, lifts[iCol].second); } - std::cerr << "SubsetRankOneSolver_Acceleration, GetKernelVector, step 6\n"; for (int iCol = 0; iCol < nbCol; iCol++) { VZ_lift(iCol) = lifts[iCol].first * (lcm / lifts[iCol].second); Vkernel(iCol) = UniversalScalarConversion(VZ_lift(iCol)); max_bits_NSP = std::max(max_bits_NSP, get_bit(VZ_lift(iCol))); } - std::cerr << "SubsetRankOneSolver_Acceleration, GetKernelVector, step 7\n"; // check if elements are small enough to do computation in if (max_bits + max_bits_NSP <= 60) { // check if part of kernel @@ -134,7 +124,6 @@ struct SubsetRankOneSolver_Acceleration { } jRow = sInc.find_next(jRow); } - std::cerr << "SubsetRankOneSolver_Acceleration, GetKernelVector, step 8\n"; } else { failed_int = true; } diff --git a/src_number/NumberTheoryGmp.h b/src_number/NumberTheoryGmp.h index 046b5ae..974d93d 100644 --- a/src_number/NumberTheoryGmp.h +++ b/src_number/NumberTheoryGmp.h @@ -462,7 +462,7 @@ mpz_class convert_mpz_class_int64_t(int64_t const& val) { if (val > 0) { return convert_mpz_class_uint64_t(val); } - return convert_mpz_class_uint64_t(-val); + return -convert_mpz_class_uint64_t(-val); } #ifdef __APPLE__