fix-dodomath-precision
This commit is contained in:
@@ -187,6 +187,9 @@ library DODOMath {
|
|||||||
uint256 numerator;
|
uint256 numerator;
|
||||||
if (bSig) {
|
if (bSig) {
|
||||||
numerator = squareRoot.sub(bAbs);
|
numerator = squareRoot.sub(bAbs);
|
||||||
|
if (numerator == 0) {
|
||||||
|
revert("DODOMath: should not be zero");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
numerator = bAbs.add(squareRoot);
|
numerator = bAbs.add(squareRoot);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user