We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0534a95 commit 55f739eCopy full SHA for 55f739e
cp-algo/number_theory/nimber.hpp
@@ -109,12 +109,11 @@ namespace cp_algo::math::nimber {
109
110
// Public nimber product via isomorphism (no recursion, no Gauss at runtime)
111
[[gnu::always_inline]]
112
- inline uint64_t nim_mul(uint64_t a, uint64_t b) {
113
- uint64_t pa = nim_to_poly(a);
114
- uint64_t pb = nim_to_poly(b);
115
- auto prod = clmul(pa, pb);
116
- uint64_t red = reduce_mod(prod);
117
- return poly_to_nim(red);
+ inline uint64_t nim_product(uint64_t a, uint64_t b) {
+ return poly_to_nim(reduce_mod(clmul(
+ nim_to_poly(a),
+ nim_to_poly(b)
+ )));
118
}
119
120
0 commit comments