Since monetary values are stored as float, use the method intented for float comparison using the maximum number of digits a currency can use. Until V9, the number of digits used was fetched from table decimal.precision, but as of V9, the accounting module stopped using it in favour of the digits number defined on currencies.