Open TuyetTDuong opened 11 months ago
+1 Tried to reproduce it and this bug is still not resolved. @alrubio please have a look.
Reason: when perform "/" operation using idiv function, we only check if denominator is non-zero when both numerator and denominator are numbers. instead we should check if denominator is number and numerator can be anything then, always make sure denominator is non-zero.
In fact, If no one is working on this, please assign this issue to me. I will solve it and open a pull request.
I'm using circom 2.1.4. c <-- b/a where a === 0 returns c = 0, while c <-- b/0 throws division by 0 error. Since Zero has no modular multiplicative inverse, both cases should throw runtime error.
Here is a test example