[Paper Review] Software for Computing the Spheroidal Wave Functions Using Arbitrary Precision Arithmetic
This paper presents a high-accuracy software library called 'spheroidal' for computing prolate and oblate spheroidal wave functions using arbitrary precision arithmetic in C++ and MATLAB. It employs adaptive coefficient selection, Wronskian-based method switching for radial functions, and optimized recurrence relations to achieve superior numerical stability and accuracy, especially at high frequencies and modes.
The spheroidal wave functions, which are the solutions to the Helmholtz equation in spheroidal coordinates, are notoriously difficult to compute. Because of this, practically no programming language comes equipped with the means to compute them. This makes problems that require their use hard to tackle. We have developed computational software for calculating these special functions. Our software is called spheroidal and includes several novel features, such as: using arbitrary precision arithmetic; adaptively choosing the number of expansion coefficients to compute and use; and using the Wronskian to choose from several different methods for computing the spheroidal radial functions to improve their accuracy. There are two types of spheroidal wave functions: the prolate kind when prolate spheroidal coordinates are used; and the oblate kind when oblate spheroidal coordinate are used. In this paper, we describe both, methods for computing them, and our software. We have made our software freely available on our webpage.
Motivation & Objective
- Address the lack of reliable, high-accuracy implementations for spheroidal wave functions in standard programming languages.
- Overcome numerical instability and precision loss in double-precision computations, especially for high-frequency and high-mode-number problems.
- Provide a flexible, extensible software library that supports both prolate and oblate spheroidal wave functions with customizable precision and expansion coefficient control.
- Improve computational accuracy by using arbitrary precision arithmetic and Wronskian-based method selection for radial functions.
- Enable efficient and reproducible computation through persistent storage of intermediate expansion coefficients and optimized recurrence evaluation.
Proposed method
- Utilizes the GNU MPFR library to perform arbitrary precision arithmetic, allowing user-defined precision levels at each computational step.
- Employs two modes for expansion coefficient selection: fixed user-specified number or adaptive computation until coefficients fall below a user-defined threshold (e.g., 10⁻²⁰⁰).
- Applies forward recurrence for growing sequences (e.g., spherical Neumann functions) and continued fractions for decaying sequences to maintain numerical stability.
- Uses the tridiagonal matrix method to solve nonhomogeneous recurrence relations, particularly for coefficients that initially grow then decay (e.g., $ B_{2r}^{mn}(-ic) $).
- Optimizes factorial and rising Pochhammer symbol computations via recursive factorization, reducing O(n²) operations to O(1) per term through incremental updates.
- Selects the most accurate method for computing spheroidal radial functions by minimizing the error in the Wronskian, ensuring consistency and reliability.
Experimental results
Research questions
- RQ1How can spheroidal wave functions be computed with high accuracy when standard double-precision arithmetic fails, especially at high wavenumbers and modes?
- RQ2What computational strategies can ensure numerical stability when solving recurrence relations that grow and then decay?
- RQ3How can arbitrary precision arithmetic be effectively integrated into a software library for special functions with minimal performance overhead?
- RQ4What criteria can be used to automatically select the most accurate method for computing spheroidal radial functions?
- RQ5To what extent can factorization of factorial and Pochhammer symbol terms improve computational efficiency in series expansions?
Key findings
- The software achieves significantly higher accuracy than double-precision implementations, particularly for high-frequency and high-mode-number problems.
- Adaptive coefficient selection ensures that expansion coefficients are computed only to the required precision, reducing unnecessary computation while maintaining accuracy.
- The use of arbitrary precision arithmetic with user-defined precision levels allows for reliable computation across a wide range of physical parameters.
- The Wronskian-based method selection reduces error in radial function computation by dynamically choosing the most accurate algorithmic path.
- Recursive optimization of factorial and Pochhammer symbol terms reduces computational complexity from O(n²) to O(1) per term, drastically improving performance in series expansions.
- The software is freely available and includes persistent storage of computed coefficients, enabling reuse and reproducibility across multiple computations.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.