PetscDTTanhSinhIntegrateMPFR — PETSc 3.25.2 documentation

Skip to main content
`Ctrl`+`K`

# PetscDTTanhSinhIntegrateMPFR

High-precision version of `PetscDTTanhSinhIntegrate()` that uses the MPFR arbitrary-precision library to evaluate the quadrature

## Synopsis

    #include "petscdt.h"
    #if defined(PETSC_HAVE_MPFR)
    PetscErrorCode PetscDTTanhSinhIntegrateMPFR(void (*func)(const PetscReal[], PetscCtx, PetscReal *), PetscReal a, PetscReal b, PetscInt digits, PetscCtx ctx, PetscReal *sol)

Not Collective; No Fortran Support

## Input Parameters

- func - the integrand callback (`func(x, ctx, &value)` evaluates the integrand at point `x`)

- a - lower limit of integration

- b - upper limit of integration

- digits - target number of correct decimal digits (also drives the working MPFR precision)

- ctx - optional user context passed to `func`

## Output Parameter

- sol - the approximate value of the integral

## Note

Requires PETSc to be configured with `--with-mpfr`; otherwise an error is raised.

## See Also

`PetscDTTanhSinhIntegrate()`, `PetscDTGaussQuadrature()`

## Level

developer

## Location

src/dm/dt/interface/dt.c

Index of all DT routines
Table of Contents for all manual pages
Index of all manual pages