diff --git a/include/mcl/fp_tower.hpp b/include/mcl/fp_tower.hpp index 26d96e1..4c25e87 100644 --- a/include/mcl/fp_tower.hpp +++ b/include/mcl/fp_tower.hpp @@ -675,6 +675,7 @@ struct Fp2DblT { void operator-=(const Fp2DblT& x) { sub(*this, *this, x); } static void init() { + assert(!Fp::getOp().isFullBit); const mcl::fp::Op& op = Fp::getOp(); if (op.fp2Dbl_mulPreA_) { mulPre = fp::func_ptr_cast(op.fp2Dbl_mulPreA_); diff --git a/test/fp_tower_test.cpp b/test/fp_tower_test.cpp index 4576376..b5e77db 100644 --- a/test/fp_tower_test.cpp +++ b/test/fp_tower_test.cpp @@ -401,6 +401,7 @@ void test(const char *p, mcl::fp::Mode mode) const int xi_a = 1; Fp::init(xi_a, p, mode); printf("mode=%s\n", mcl::fp::ModeToStr(mode)); + if (Fp::getOp().isFullBit) return; Fp2::init(); printf("bitSize=%d\n", (int)Fp::getBitSize()); #if 0