From 65aafdd66df5ced405702c03a3ab02090e539ccb Mon Sep 17 00:00:00 2001 From: Julia Schor Date: Sat, 8 Jan 2022 20:22:06 -0500 Subject: [PATCH] fixed deriv test --- test/propeller/tools/calculus_test.cljc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/propeller/tools/calculus_test.cljc b/test/propeller/tools/calculus_test.cljc index bec84f1..6300479 100644 --- a/test/propeller/tools/calculus_test.cljc +++ b/test/propeller/tools/calculus_test.cljc @@ -3,6 +3,7 @@ [propeller.tools.calculus :as c])) (t/deftest deriv_test (t/is (letfn [(cubic [x] (let [a (double x)] (* a a a)))] - (= (c/deriv (cubic 2)) 2.0)) + (< (max (- (c/deriv cubic 2) 12) (- (- (c/deriv cubic 2) 12))) 0.001) + ) ) )