# \[ANN\] HAdaptiveIntegration.jl v1.0.0 - Adaptive numerical integration over simplices and orthotopes

**URL:** <https://discourse.julialang.org/t/ann-hadaptiveintegration-jl-v1-0-0-adaptive-numerical-integration-over-simplices-and-orthotopes/135309>\
**Category:** Package Announcements\
**Tags:** package, announcement, integral\
**Created:** [January 28, 2026, 3:11pm UTC](https://discourse.julialang.org/t/ann-hadaptiveintegration-jl-v1-0-0-adaptive-numerical-integration-over-simplices-and-orthotopes/135309 "2026-01-28T15:11:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zmoitier](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zmoitier/32/29102_2.png) [@zmoitier](https://discourse.julialang.org/u/zmoitier)\
**Post date:** [January 28, 2026, 3:11pm UTC](https://discourse.julialang.org/t/ann-hadaptiveintegration-jl-v1-0-0-adaptive-numerical-integration-over-simplices-and-orthotopes/135309/1 "2026-01-28T15:11:26Z")

</div>

The [`HAdaptiveIntegration.jl`](https://github.com/zmoitier/HAdaptiveIntegration.jl) package is designed for numerical integration over multidimensional domains. It computes integrals of the form I = \int\_{\Omega} f(x) \, \mathrm{d}x where f is any Julia function and \Omega represents domains such as simplices (triangles, tetrahedra, …) and axis-aligned orthotopes (rectangles, cuboids, …). The package employs an adaptive strategy, dynamically refining the integration domain as needed. Embedded cubature rules are used to provide error estimates, with the goal of achieving high accuracy while minimizing the number of function evaluations.

## Features include:

- Adaptive integration over simplices and orthotope of **any dimension** ,
- Utilization of **efficient tabulated cubatures** for low-dimensional simplices (triangles and tetrahedra) and orthotopes (rectangles and cuboids),
- Support for custom embedded cubature rules,
- Arbitrary precision arithmetic.

## Quick Examples

Below are simple examples demonstrating how to use `HAdaptiveIntegration` to compute integrals over the supported domains:

```julia
julia> using HAdaptiveIntegration

# Define a function
julia> f = x -> cis(sum(x)) / (sum(abs2, x) + 1e-2)

# Compute the integral and error estimate over a triangle and a rectangle
julia> I, E = integrate(f, Triangle((0, 0), (1, 0), (0, 1)))
(2.9073045602673253 + 1.2009254989232099im, 4.646511607369907e-8)

julia> I, E = integrate(f, Rectangle((0, 0), (1, 1)))
(3.061858492661162 + 1.7034087551176278im, 4.8525654841517435e-8)

# Compute the integral and error estimate over a tetrahedron and a cuboid
julia> I, E = integrate(f, Tetrahedron((0, 0, 0), (1, 0, 0), (0, 1, 0), (0, 0, 1)))
(0.6767480949657807 + 0.4437444630481043im, 1.2058253541977129e-8)

julia> I, E = integrate(f, Cuboid((0, 0, 0), (1, 1, 1)))
(0.7332718951640882 + 1.2361267744925115im, 2.083830752837712e-8)

```

Here, `I` denotes the estimated value of the integral and `E` the associated error estimate. The `integrate` function provides many additional options, and several other integration domains are supported. For further details, please refer to the [documentation](https://zmoitier.github.io/HAdaptiveIntegration.jl/stable/).

## Related packages

`HAdaptiveIntegration` is inspired by [`HCubature.jl`](https://github.com/JuliaMath/HCubature.jl), which implements a similar adaptive approach for integration over orthotopes of arbitrary dimension. The main differences are:

- `HAdaptiveIntegration` supports integration over simplices of any dimension, whereas `HCubature` focuses exclusively on orthotopes.
- For low-dimensional orthotopes such as rectangles and cuboids, `HAdaptiveIntegration` uses tabulated cubature rules for improved efficiency, allowing it to reach accuracy comparable to `HCubature` with fewer function evaluations.

Even if this package contains rule for an arbitrary `d`-dimensional simplex and orthotope:

- the dimension `d=1` (where both the `1`-simplex and `1`-orthotope reduce to a line segment) is supported, but we recommend using [`QuadGk.jl`](https://github.com/JuliaMath/QuadGK.jl) for one-dimensional integration;
- for large `d`-dimensional simplex or orthotope, the approach of this package will become slow. In such case, you should try to use stochastic method like in [`MCIntegration.jl`](https://github.com/numericalEFT/MCIntegration.jl) or [`Cuba.jl`](https://github.com/giordano/Cuba.jl).

---

<div class="post-metadata">

**Author:** ![pablosanjose](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pablosanjose/32/7006_2.png) [@pablosanjose](https://discourse.julialang.org/u/pablosanjose)\
**Post date:** [April 6, 2026, 9:10am UTC](https://discourse.julialang.org/t/ann-hadaptiveintegration-jl-v1-0-0-adaptive-numerical-integration-over-simplices-and-orthotopes/135309/2 "2026-04-06T09:10:39Z")

</div>

This package is great, thanks @zmoitier! For others watching, the v1.1.0 release now also supports Unitful.
