You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This loss of precision is intrinsically associated with integer division, and would be surprised to learn that someone understood the 'safe' part as being related to it. Besides, SafeMath's documentation makes it very clear that it has to do with overflow protection.
The name SafeMath can make developers use it without paying attention of problem of division losing precision https://consensys.github.io/smart-contract-best-practices/recommendations/#beware-rounding-with-integer-division
Maybe add a function "safediv" which also checks that precision wasn't lost and add in documentation of "div" that precision can be lost.
The text was updated successfully, but these errors were encountered: