DoubleDouble Root Finding Method Implements
.NET 8.0
DoubleDouble
// Newton-Raphson Method: solve x for x^3 = 2
static (ddouble v, ddouble d) f(ddouble x) {
return (x * x * x - 2, 3 * x * x);
}
ddouble y = NewtonRaphsonFinder.RootFind(f, x0: 2);
// Brent Method: solve x for x^3 = 2
static ddouble f(ddouble x) {
return x * x * x - 2;
}
ddouble y = BrentFinder.RootFind(f, x1: 1, x2: 2);