Browse Source

RootFinding: simple usage in F# module should try the same algorithms as core

v2
Christoph Ruegg 13 years ago
parent
commit
36c29878a3
  1. 6
      src/FSharp/FindRoots.fs

6
src/FSharp/FindRoots.fs

@ -69,8 +69,10 @@ module FindRoots =
// simple usage
let ofFunction lowerBound upperBound (f:double->double) = brent 100 1e-8 lowerBound upperBound f
let ofFunction lowerBound upperBound (f:double->double) =
brent 100 1e-8 lowerBound upperBound f
|>| fun () -> bisection 100 1e-8 lowerBound upperBound f
let ofFunctionAndDerivative lowerBound upperBound (f:double->double) (df:double->double) =
newtonRaphsonRobust 100 20 1e-8 lowerBound upperBound f df
|>| fun () -> brent 100 1e-8 lowerBound upperBound f
|>| fun () -> bisection 100 1e-8 lowerBound upperBound f

Loading…
Cancel
Save