Skip to content

tk-yoshimura/MultiPrecisionODE

Repository files navigation

MultiPrecisionODE

MultiPrecision Ordinary Differential Equation Solver

Requirement

.NET 10.0
MultiPrecision

Install

Download DLL
Download Nuget

Usage

MultiPrecision<Pow2.N8> mu = 1.5;

DormandPrinceAdaptiveODESolver<Pow2.N8> solver = new(
    v: (0, 1),
    (x, y) => (y, mu * (1 - x * x) * y - x),
    abstol: "1e-20", reltol: "1e-20", maxdepth: 12
);

for (int i = 0; i <= 4096; i++) {
    Console.WriteLine($"{i / 256d},{solver.X},{solver.Y}");
    solver.Next(1d / 256);
}

Assert.IsTrue(solver.MaxError < 1e-14);

Licence

MIT

Author

T.Yoshimura

About

MultiPrecision Ordinary Differential Equation Solver

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages