polynomial inversion fix

This commit is contained in:
Mirek Kratochvil 2012-04-16 12:15:44 +02:00
parent d23fd8f898
commit b09128c3aa

View file

@ -355,9 +355,8 @@ void polynomial::divmod (polynomial&d, polynomial&res, polynomial&rem, gf2m&fld)
void polynomial::inv (polynomial&m, gf2m&fld) void polynomial::inv (polynomial&m, gf2m&fld)
{ {
polynomial a = *this; polynomial a = *this;
this->resize (2); this->resize (1);
item (0) = 0; item (0) = 1;
item (1) = 1;
div (a, m, fld); div (a, m, fld);
} }