for (int i = start; i < bitWidth; i++)
{
BBNode n = nf->CreateNode(AND, y[c], multiplier);
- products[i].push(n);
+ if (n!= nf->getFalse())
+ products[i].push(n);
c++;
}
}
{
support.insert(nf->CreateNode(NOT, carry));
}
- else if (i + 1 != bitWidth)
+ else if (i + 1 != bitWidth && carry != BBFalse)
{
products[i + 1].push(carry);
}
for (int i =0 ; i < bitWidth;i++)
{
- products[i].push(BBFalse);
+ assert(products[i].size() == 0);
}
BBNodeVec notY;
pushP(products,i,y,x[i],nf);
}
- if (xt[i] == MINUS_ONE_MT)
+ else if (xt[i] == MINUS_ONE_MT)
{
pushP(products,i,notY,BBTrue,nf);
products[i].push(BBTrue);
}
- if (xt[i] == ONE_MT)
+ else if (xt[i] == ONE_MT)
{
pushP(products,i,y,BBTrue,nf);
}
+
+ else if (products[i].size() == 0)
+ products[i].push(BBFalse);
}
}