deint 0.0.1

Double Exponential Numerical Integration Library


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

Double Exponential Numerical Integration Library

This library provide numerical integration method by Double Exponential (DE) formula.

For example:

// integration on [0, 1]
auto int01 = DEInt!real(0, 1);

// int_0^1 x dx = 0.5
assert(int01.integrate((real x) => x).approxEqual(0.5));

// int_0^1 x^^2 dx = 1/3
assert(int01.integrate((real x) => x^^2).approxEqual(1/3.0));


// integration on [-inf, inf]
auto intII = DEInt!real(-real.infinity, real.infinity);

// Gaussian integral
assert(intII.integrate((real x) => exp(-x^^2)).approxEqual(sqrt(PI)));

// integration int_1^inf x * exp(-x) dx = Gamma(2, 1)
auto intFI = DEInt!real(1, real.infinity, Yes.isExpType);

// incomplete gamma function
assert(intFI.integrate((real x) => x).approxEqual(gammaIncompleteCompl(2, 1) * gamma(2)));
Authors:
  • Kazuki Komatsu
Dependencies:
none
Versions:
0.3.3 2019-Jan-01
0.3.2 2018-Dec-17
0.3.1 2018-Dec-17
0.3.0 2018-Dec-17
0.2.0 2018-Aug-13
Show all 10 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 72 downloads total

Score:
0.8
Short URL:
deint.dub.pm