←back to thread

123 points mtantaoui | 1 comments | | HN request time: 0.213s | source

Integrate is a fast, small, lightweight Rust library for performing numerical integration of real-valued functions. It is designed to integrate functions, providing a simple and efficient way to approximate definite integrals using various numerical methods.

Integrate supports a variety of numerical integration techniques: - Newton-Cotes methods:

  - Rectangle Rule.
  - Trapezoidal Rule.
  - Simpson's Rule.
  - Newton's 3/8 Rule.
- Gauss quadrature methods:

  - Gauss-Legendre.
  - Gauss-Laguerre.
  - Gauss-Hermite.
  - Gauss-Chebyshev First Kind.
  - Gauss-Chebyshev Second Kind.
- Adaptive Methods:

  - Adaptive Simpson's method
- Romberg’s method.
Show context
wjholden ◴[] No.42184001[source]
I was always amazed that R can do:

  > integrate(dnorm, -Inf, +Inf)
  1 with absolute error < 9.4e-05
Can we do the same in this library?
replies(4): >>42184765 #>>42184870 #>>42185462 #>>42185618 #
1. antononcube ◴[] No.42185462[source]
You will be completely blown away, then, from what Wolfram Language (aka Mathematica) can do. (When it comes to numerical integration.)

https://reference.wolfram.com/language/tutorial/NIntegrateOv...