Since we now have “safe math by default”, one of the next long-standing items to tackle about arithmetic is fixed points. One fundamental drawback mentioned by 3sGgpQ8H on the OZ forum is that most of the time, you would use fixed points not as the main data type but rather as a factor, which does not go well with how Solidity assigns types to expressions:
uint weitAmount;
uint amountIncludingTag = weiAmount * 1.12;
The type of 1.12
is a fixed point type, so the type of weiAmount * 1.12
should also be a fixed point type.
Does anyone see a solution to this problem? Is it not a problem after all because the initial type can also just be a fixed point type?