←back to thread

125 points mtantaoui | 1 comments | | HN request time: 0.2s | 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
cozzyd ◴[] No.42186272[source]
I don't see any explicit SIMD in here. Is the rust compiler able to emit SIMD instructions automatically in cases like this? (I guess I could compile and disassemble to check... )
replies(1): >>42186347 #
jvanderbot ◴[] No.42186347[source]
In my experience Rust is very good about using simd for loading and not great at using it automatically for math. This is from some experimentation at work and checking disassembly so ymmv

There are common library extensions for that.

replies(1): >>42190200 #
cozzyd ◴[] No.42190200[source]

    ymmv
Or zmmv if avx-512 is supported?
replies(1): >>42195786 #
1. jvanderbot ◴[] No.42195786[source]
This is a good joke, if anyone is wondering.