fortran-lang / stdlib

Fortran Standard Library
https://stdlib.fortran-lang.org
MIT License
1.07k stars 166 forks source link

Addition to the quadrature module: quadrature based on the tanh-sinh transform #612

Open arjenmarkus opened 2 years ago

arjenmarkus commented 2 years ago

I am working on a Fortran version of the quadrature method via the tanh-sinh transform as described by Bailey et al. Experimental Mathematics in Action . Its properties are:

Would this be a suitable addition to the standard library?

jvdp1 commented 2 years ago

I believe so, yes. Thank you.

arjenmarkus commented 2 years ago

I have attached a very first version of the module - quadrature_tanh_sinh.f90.txt

ivan-pi commented 2 years ago

@arjenmarkus, I've found a good-looking Fortran implementation of the tanh-sinh quadrature, originally called double-exponential quadrature, made available here by Takuya Ooura from Kyoto University.

[Edit: I've found at least one paper which references the code, stating the code is both efficient and accurate]

Wikipedia also links to a page from John Cook who published a C++ implementation: "Double Exponential Integration" with source code.

[Edit: apparently the code from John Cook is not available anymore at the original website, but I've found a copy on GitHub by searching for the header file "DEIntegrator.h"].