In Solidity, I want to check that the numerator and denominator passed to my function evaluate to 0% < num / denom < 100%.
I tried the most direct approach:
num / denom > 0 && num / denom < 1 but e.g. 1% (
1 / 100 > 0 && 1 / 100 < 1) evaluates to false, because Solidity doesn't have decimals.
My other idea is
num > 0 && num < denom. Can it be formally proven that that is always the same as 0% < num / denom < 100%?