fix bit operation error in doSimplication method for factoring