diff --git a/src/fp_proto.hpp b/src/fp_proto.hpp index 73fc272..6c54a74 100644 --- a/src/fp_proto.hpp +++ b/src/fp_proto.hpp @@ -146,7 +146,10 @@ struct MulPre { c -= SubPre::f(tmp, tmp, z + N); // c:tmp[N] = ad + bc c += AddPre::f(z + H, z + H, tmp); - AddUnitPre::f(z + N + H, H, c); + assert(c <= 1); + if (c) { + AddUnitPre::f(z + N + H, H, 1); + } } static inline void func(Unit *z, const Unit *x, const Unit *y) {