2 ms·
>Not if they come in as integers that have to be coerced at some point. In which case you can calculate the determinant exactly with your own roll, but a libra
by NohatCoder 7y ago
>Not if they come in as integers that have to be coerced at some point.
In which case you can calculate the determinant exactly with your own roll, but a library will likely force you to convert everything to doubles.
>Compare ad to bc instead of ad - bc to zero, for one.
That is the same thing, a compare instruction is basically just a subtract that doesn't write the output, so you get zero/equality in exactly the same cases. Most compilers will probably turn your code into doing just one subtract and then check the flags, no matter which version you write.