dry-analyzer icon indicating copy to clipboard operation
dry-analyzer copied to clipboard

Consider divide by zero

Open pirapira opened this issue 9 years ago • 1 comments

A division instruction should produce two behaviors, one for divide by zero and the other for divide by non-zero. (When the divisor is known to be non-zero, only one behavior is fine.)

Instructions involving division return zero when the divisor is zero. This should be taken into account for *DIV and *MOD instructions.

pirapira avatar Sep 05 '16 17:09 pirapira

Or, we can cut corners by saying "a / 0 = 0 for any a" (like in ssreflect).

pirapira avatar Sep 05 '16 17:09 pirapira