Comments (4)
The solution that uses:
#if defined(EXPORT_REAL)
! export the single precision names (qag, etc.)
generic, public :: qag => dqag
generic, public :: qage => dqage
...
Works with fort, but not Gfortran. I think this may be a Fortran 2018 feature?
from quadpack.
Fixed in #4
from quadpack.
For the quad procedures, don't you need to (re)generate the weights of the Gauss-Kronrod quadrature with higher precision?
According to the comments in the original source code:
! gauss quadrature weights and kronrod quadrature abscissae and weights
! as evaluated with 80 decimal digit arithmetic by l. w. fullerton,
! bell labs, nov. 1981.
I'm not sure what 80-decimal digit arithmetic means exactly; do they mean 80-bit extended precision? The Wikipedia page on quad precision states:
The IEEE 754 standard specifies a binary128 as having:
- Sign bit: 1 bit
- Exponent width: 15 bits
- Significand precision: 113 bits (112 explicitly stored)
This gives from 33 to 36 significant decimal digits precision. [emphasis added] If a decimal string with at most 33 significant digits is converted to IEEE 754 quadruple-precision representation, and then converted back to a decimal string with the same number of digits, the final result should match the original string. If an IEEE 754 quadruple-precision number is converted to a decimal string with at least 36 significant digits, and then converted back to quadruple-precision representation, the final result must match the original number.
The current implementation provides the constants with 33 decimal digits (presumably all of which are correct?), however a few significant digits might be missing for the quad implementation.
The QUADPACK manual (Piessens et al., 1983, pg. 7) contains the paragraph:
In the single precision QUADPACK version, these constants are given to 16 figures. Two double precision versions are supplied with constants given to 16 or to 33 figures. With a few exceptions, the mathematically correct values are irrational and thus the tabulated data are only approximations. The formulae which use this data are thus incapable of providing accurate results to more than, say, 16 or 33 places even for a very simple integrand. This then, becomes a fundamental limitation of virtually all the QUADPACK routines.
There are some coefficient-based tests to verify the adequacy of a quadrature formula, see
Walter Gautschi, How and how not to check Gaussian quadrature formulae, Bit 23, 1983, 209-216. https://www.cs.purdue.edu/homes/wxg/selected_works/section_08/084.pdf
Alternatively, we could verify their precision by comparison with the results from numerical integration with arbitrary-precision ball arithmetic (Arb).
from quadpack.
Yes, we need to see about regenerating them with more precision. I haven't looked into it yet. I can open a new issue for that.
from quadpack.
Related Issues (18)
- Bug in dqawo
- dqng needs quad-precision coefficients
- Slatec routines
- tanh-sinh quadrature HOT 1
- Adaptive quadrature method from MATLAB HOT 3
- CQUAD doubly-adaptive integration HOT 1
- Add basic adaptive Simpson and Lobatto
- Multidimensional integration
- add topic fortran-package-manager
- Bug in dqnc79 routine HOT 2
- Tests on PowerPC: 1 abnormal return from dqag, 1 abnormal return from dqng
- C or cplusplus api request
- quadpack fails to build on Sonoma (x86_64, arm64): `<ERROR> error: Missing key for table header` HOT 5
- Replace linpack DGTSL with lapack DGTSV HOT 4
- Regenerate coefficients with more precision for quad precision version HOT 4
- Bug in weight value HOT 1
- Patterson method from NSCW library
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quadpack.