@skirpichev Yeah, I have to add a condition at the end of constant_renumber function to check the sign of constant and if it is negative then I will make it positive.
Since the renumbering would already been taken place so it will not cause the cancellation of terms, if it will be happening before like the case shown in issue.