diff --git a/include/mcl/fp_tower.hpp b/include/mcl/fp_tower.hpp index 417db26..5f2fa59 100644 --- a/include/mcl/fp_tower.hpp +++ b/include/mcl/fp_tower.hpp @@ -872,7 +872,12 @@ struct Fp6T : public fp::Serializable, Fp6Dbl::sqrPre(XX, x); Fp6Dbl::mod(y, XX); } - static inline void mul(Fp6T& z, const Fp6T& x, const Fp6T& y); + static inline void mul(Fp6T& z, const Fp6T& x, const Fp6T& y) + { + Fp6Dbl XY; + Fp6Dbl::mulPre(XY, x, y); + Fp6Dbl::mod(z, XY); + } /* x = a + bv + cv^2, v^3 = xi y = 1/x = p/q where @@ -1026,14 +1031,6 @@ struct Fp6DblT { } }; -template -inline void Fp6T::mul(Fp6T& z, const Fp6T& x, const Fp6T& y) -{ - Fp6DblT Z; - Fp6DblT::mulPre(Z, x, y); - Fp6DblT::mod(z, Z); -} - /* Fp12T = Fp6[w] / (w^2 - v) x = a + b w