diff options
author | Remco Bloemen <remco@wicked.ventures> | 2018-08-25 05:11:45 +0800 |
---|---|---|
committer | Remco Bloemen <remco@wicked.ventures> | 2018-08-25 05:11:45 +0800 |
commit | f6080367fe3a90762afea76a653c5df1315c45fa (patch) | |
tree | 1250fe47eeb29bed770e352b672b275a81fe8f68 /packages/contracts/src/2.0.0/protocol | |
parent | 7f78d7da9dd13d1f0068a292bcd1ee3c5439d5a8 (diff) | |
download | dexon-sol-tools-f6080367fe3a90762afea76a653c5df1315c45fa.tar dexon-sol-tools-f6080367fe3a90762afea76a653c5df1315c45fa.tar.gz dexon-sol-tools-f6080367fe3a90762afea76a653c5df1315c45fa.tar.bz2 dexon-sol-tools-f6080367fe3a90762afea76a653c5df1315c45fa.tar.lz dexon-sol-tools-f6080367fe3a90762afea76a653c5df1315c45fa.tar.xz dexon-sol-tools-f6080367fe3a90762afea76a653c5df1315c45fa.tar.zst dexon-sol-tools-f6080367fe3a90762afea76a653c5df1315c45fa.zip |
Disambiguate the operator precedence
Diffstat (limited to 'packages/contracts/src/2.0.0/protocol')
-rw-r--r-- | packages/contracts/src/2.0.0/protocol/Exchange/libs/LibMath.sol | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/contracts/src/2.0.0/protocol/Exchange/libs/LibMath.sol b/packages/contracts/src/2.0.0/protocol/Exchange/libs/LibMath.sol index 8a1444af1..90ec9e2b6 100644 --- a/packages/contracts/src/2.0.0/protocol/Exchange/libs/LibMath.sol +++ b/packages/contracts/src/2.0.0/protocol/Exchange/libs/LibMath.sol @@ -109,9 +109,9 @@ contract LibMath is // Otherwise, we want the relative rounding error to be strictly // less than 0.1%. - // The relative error is `remainder / numerator * target`. + // The relative error is `remainder / (numerator * target)`. // We want the relative error less than 1 / 1000: - // remainder / numerator * denominator < 1 / 1000 + // remainder / (numerator * denominator) < 1 / 1000 // or equivalently: // 1000 * remainder < numerator * target // so we have a rounding error iff: |