Skip to content

Commit 96ff359

Browse files
committed
Return [0, 2mod) in getr_direct
1 parent b925fb8 commit 96ff359

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cp-algo/linalg/vector.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ namespace cp_algo::linalg {
132132
for(; i < size(*this); i++) {
133133
(*this)[i].add_unsafe(scaler * b[i].getr_direct());
134134
}
135-
if(++counter == 8) {
135+
if(++counter == 4) {
136136
for(auto &it: *this) {
137137
it.pseudonormalize();
138138
}

cp-algo/number_theory/modint.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ namespace cp_algo::math {
9999
return std::min(res, res - mod());
100100
}
101101
void setr_direct(uint64_t rr) {r = rr;}
102-
uint64_t getr_direct() const {return std::min(r, r - mod());}
102+
uint64_t getr_direct() const {return r;}
103103
private:
104104
uint64_t r;
105105
modint& to_modint() {return static_cast<modint&>(*this);}

0 commit comments

Comments
 (0)