From abad4535237fc22f7ac5af99e249d9fa1fe31c0d Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Mon, 5 Sep 2022 08:41:33 +0200 Subject: [PATCH] fix: no small integration error --- .../src/rescript/FunctionRegistry/Library/FR_Danger.res | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Danger.res b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Danger.res index 16ea77d5..dde132f9 100644 --- a/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Danger.res +++ b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Danger.res @@ -220,8 +220,9 @@ let library = [ ~nameSpace, ~output=EvtArray, ~requiresNamespace=false, - ~examples=[`Danger.integrateFunctionBetweenWithIncrement({|x| x+1}, 1, 10, 1)`], // should be [x^2/2 + x]1_10 = (50 + 10) - (1 + 1) = 60 - 2 = 58 - // Some testing needed to see where the small deviation comes from. + ~examples=[`Danger.integrateFunctionBetweenWithIncrement({|x| x+1}, 1, 10, 1)`], + // should be [x^2/2 + x]1_10 = (100/2 + 10) - (1/2 + 1) = 60 - 1.5 = 58.5 + // https://www.wolframalpha.com/input?i=integrate+x%2B1+from+1+to+10 ~definitions=[ FnDefinition.make( ~name="integrateFunctionBetweenWithIncrement",