Skip to content

Commit

Permalink
docs: improve explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulRBerg committed May 6, 2024
1 parent b67f0aa commit 3d05a0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sd59x18/Math.sol
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ function div(SD59x18 x, SD59x18 y) pure returns (SD59x18 result) {
function exp(SD59x18 x) pure returns (SD59x18 result) {
int256 xInt = x.unwrap();

// Any input less than the threshold will result in exp returning 0
// This also prevents an overflow later in the function for very small numbers
// Any input less than the threshold returns zero.
// This check also prevents an overflow for very small numbers.
if (xInt < uEXP_MIN_THRESHOLD) {
return ZERO;
}
Expand Down

0 comments on commit 3d05a0b

Please sign in to comment.