News for hackers. Stuff that matters.
Re:Show HN: A Mathematical Integration rust crate by mtantaoui on Tuesday November 19, 2024 @08:20AM (#42183106)
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.
Re:Show HN: A Mathematical Integration rust crate by antononcube on Tuesday November 19, 2024 @11:46AM (#42185440)
I think the project should be called "NIntegrate".

BTW, that is not a serious suggestion; it is just that Wolfram Language (aka Matheamtica) has both `Integrate` and `NIntegrate` for symbolic and numeric integration, respectively.

Re:Show HN: A Mathematical Integration rust crate by zppln on Tuesday November 19, 2024 @02:12PM (#42187011)
Fast, small, lightweight compared to what?
Re:Show HN: A Mathematical Integration rust crate by akkad33 on Tuesday November 19, 2024 @03:36PM (#42187833)
Those are adjectives not comparatives.
Re:Show HN: A Mathematical Integration rust crate by aDyslecticCrow on Wednesday November 20, 2024 @09:57AM (#42194434)
It's a minimal implementation (small, lightweight) of well-known and established algorithms (fast).
Re:Show HN: A Mathematical Integration rust crate by legobmw99 on Tuesday November 19, 2024 @03:57PM (#42188015)
Is there a technical reason to now allow closures as the integrand?
Re:Show HN: A Mathematical Integration rust crate by n_plus_1_acc on Tuesday November 19, 2024 @04:10PM (#42188132)
Mayve because they aren't guaranteed to be actual functions (in the mathematical sense) and could return random values
Re:Show HN: A Mathematical Integration rust crate by legobmw99 on Tuesday November 19, 2024 @04:17PM (#42188173)
The Fn trait could be used, which prevents mutation, but allows a lot of useful closures. I should note, a motivated user could provide a junk function no matter what the type accepted is