From 54bbd92a17539992a180eeb0df90b91b4c06abd5 Mon Sep 17 00:00:00 2001 From: Patrick Kim Date: Fri, 4 Aug 2023 12:02:56 -0400 Subject: [PATCH] Update test/forge/Math.t.sol Co-authored-by: Romain Milon Signed-off-by: Patrick Kim --- test/forge/Math.t.sol | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/forge/Math.t.sol b/test/forge/Math.t.sol index b53fd285e..246069abd 100644 --- a/test/forge/Math.t.sol +++ b/test/forge/Math.t.sol @@ -8,7 +8,8 @@ import "src/libraries/FixedPointMathLib.sol"; contract MathTest is Test { using FixedPointMathLib for uint256; - function testTaylorSeriesExpansion(uint256 rate, uint256 timeElapsed) public { + function testWTaylorCompounded(uint256 rate, uint256 timeElapsed) public { + // Assume rate is less than a ~500% APY. (~180% APR) vm.assume(rate < (FixedPointMathLib.WAD / 20_000_000) && timeElapsed < 365 days); uint256 result = rate.wTaylorCompounded(timeElapsed) + FixedPointMathLib.WAD;