Skip to content

Add FastTanhSinhQuadrature.jl interface#310

Merged
ChrisRackauckas merged 5 commits into
SciML:masterfrom
ChrisRackauckas-Claude:add-fasttanhsinhquadrature-interface
Apr 4, 2026
Merged

Add FastTanhSinhQuadrature.jl interface#310
ChrisRackauckas merged 5 commits into
SciML:masterfrom
ChrisRackauckas-Claude:add-fasttanhsinhquadrature-interface

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor

Summary

  • Add support for FastTanhSinhQuadrature.jl as a new integration backend via package extension
  • FastTanhSinhQuadrature.jl provides high-performance SIMD-accelerated Tanh-Sinh (double exponential) quadrature
  • Supports 1D, 2D, and 3D integration

Related announcement: https://discourse.julialang.org/t/ann-fasttanhsinhquadrature-jl-high-performance-simd-accelerated-numerical-integration/135271

Changes

  • Add FastTanhSinhQuadratureJL algorithm struct with tol and max_levels parameters
  • Create IntegralsFastTanhSinhQuadratureExt extension module in ext/
  • Add to Project.toml: weakdeps, extensions, compat, extras, and test targets
  • Add to interface tests with appropriate capability flags (nout=Inf, min_dim=1, max_dim=3, allows_batch=false, allows_iip=false)
  • Export FastTanhSinhQuadratureJL from main module

Usage Example

using Integrals, FastTanhSinhQuadrature

# 1D integration
f(x, p) = cos(x)
prob = IntegralProblem(f, (0.0, 1.0))
sol = solve(prob, FastTanhSinhQuadratureJL())

# 2D integration
f2d(x, p) = x[1] * x[2]
prob2d = IntegralProblem(f2d, ([0.0, 0.0], [1.0, 1.0]))
sol2d = solve(prob2d, FastTanhSinhQuadratureJL(tol=1e-10))

Note

FastTanhSinhQuadrature.jl is not yet registered in the General registry. Users will need to add it from GitHub:

Pkg.add(url="https://github.com/svretina/FastTanhSinhQuadrature.jl")

Test plan

  • Verified 1D integration works correctly
  • Verified 2D integration works correctly
  • Verified 3D integration works correctly
  • Verified reltol parameter is passed through correctly
  • Interface tests pass (requires FastTanhSinhQuadrature.jl to be registered or manually added to CI)

🤖 Generated with Claude Code

@svretina

Copy link
Copy Markdown

the package has been merged to JuliaRegistries. Checks should now pass

@svretina

svretina commented Apr 2, 2026

Copy link
Copy Markdown

Hi @ChrisRackauckas ,

would it be possible to try again the checks ?

Add support for FastTanhSinhQuadrature.jl as a new integration backend via package extension.

FastTanhSinhQuadrature.jl provides high-performance SIMD-accelerated Tanh-Sinh
(double exponential) quadrature with support for 1D, 2D, and 3D integration.

Changes:
- Add FastTanhSinhQuadratureJL algorithm struct with tol and max_levels parameters
- Create IntegralsFastTanhSinhQuadratureExt extension module
- Add to Project.toml weakdeps, extensions, compat, extras, and test targets
- Add to interface tests with appropriate capability flags
- Export FastTanhSinhQuadratureJL from main module

Note: FastTanhSinhQuadrature.jl is not yet registered in the General registry.
Users can add it from: https://github.com/svretina/FastTanhSinhQuadrature.jl

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@ChrisRackauckas-Claude ChrisRackauckas-Claude force-pushed the add-fasttanhsinhquadrature-interface branch from d9e39fe to ed73616 Compare April 4, 2026 00:53
ChrisRackauckas and others added 4 commits April 3, 2026 21:22
The upstream master added a verbose keyword argument passed through the
IntegralCache fallback. The extension needs to accept it to avoid
MethodError on the kwarg mismatch.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
FastTanhSinhQuadrature.quad does not support vector-valued integrands
(it attempts scalar addition on vector results). Set nout = 1 to skip
vector integrand tests for this algorithm.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…d tests

Even nout=1 creates a length-1 Vector output which FastTanhSinhQuadrature.quad
cannot handle (it requires scalar return values). Setting nout=0 skips
all vector-valued integrand tests.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ChrisRackauckas ChrisRackauckas merged commit d485eb7 into SciML:master Apr 4, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants