Closed
Description
The following two functions can be evaluated as true.
bool f(int a, int b)
{
return (-a * b) / (a * b);
}
bool g(int a, int b)
{
return (-a + b) / (a - b);
}
https://godbolt.org/z/sa5nTd9ob
https://alive2.llvm.org/ce/z/c5EBFp
GCC and MSVC can simplify the function f
.