Final published version
Licence: CC BY: Creative Commons Attribution 4.0 International License
Research output: Contribution to Journal/Magazine › Journal article › peer-review
Research output: Contribution to Journal/Magazine › Journal article › peer-review
}
TY - JOUR
T1 - lintegrate: A C/Python numerical integration library for working in log-space
AU - Pitkin, Matthew
PY - 2022/5/25
Y1 - 2022/5/25
N2 - There are many situations in which the integral of a function must be evaluated numerically between given limits. For C codes, there is a range of numerical integration (sometimes called numerical quadrature) functions provided within the GNU Scientific Library (GSL) (Galassi et al., 2009). However, in situations where the integrand has an extremely large dynamic range these GSL functions can fail due to numerical instability. One way to get around numerical instability issues is to work with the natural logarithm of the function. The logarithm of the function cannot simply be integrated as this will not produce the logarithm of the integralof the original function. lintegrate provides a range of C integration functions, equivalent to functions in GSL, that allow the integration of a function when only working with the natural logarithm of the function is computationally practical. The result that is returned is the natural logarithm of the integral of the underlying function. lintegrate also provides a Python (vanRossum, 1995) module for accessing some of these functions in Python.
AB - There are many situations in which the integral of a function must be evaluated numerically between given limits. For C codes, there is a range of numerical integration (sometimes called numerical quadrature) functions provided within the GNU Scientific Library (GSL) (Galassi et al., 2009). However, in situations where the integrand has an extremely large dynamic range these GSL functions can fail due to numerical instability. One way to get around numerical instability issues is to work with the natural logarithm of the function. The logarithm of the function cannot simply be integrated as this will not produce the logarithm of the integralof the original function. lintegrate provides a range of C integration functions, equivalent to functions in GSL, that allow the integration of a function when only working with the natural logarithm of the function is computationally practical. The result that is returned is the natural logarithm of the integral of the underlying function. lintegrate also provides a Python (vanRossum, 1995) module for accessing some of these functions in Python.
U2 - 10.21105/joss.04231
DO - 10.21105/joss.04231
M3 - Journal article
VL - 7
JO - Journal of Open Source Software
JF - Journal of Open Source Software
SN - 2475-9066
IS - 73
M1 - 4231
ER -