[Paper Review] A Robust Complex Division in Scilab
This paper presents a simplified, robust complex division algorithm for double-precision floating-point arithmetic that improves upon Smith’s 1962 method by avoiding overflow and underflow in intermediate computations. The authors prove the algorithm’s robustness and demonstrate via numerical simulations that it is significantly more reliable than Smith’s method and comparable to Stewart’s more complex algorithm, with failure rates up to 4 orders of magnitude lower than naive implementations.
The most widely used algorithm for floating point complex division, known as Smith's method, may fail more often than expected. This document presents two improved complex division algorithms. We present a proof of the robustness of the first improved algorithm. Numerical simulations show that this algorithm performs well in practice and is significantly more robust than other known implementations. By combining additionnal scaling methods with this first algorithm, we were able to create a second algorithm, which rarely fails.
Motivation & Objective
- To address the frequent failure of Smith’s complex division algorithm due to overflow and underflow in intermediate terms like $c^2 + d^2$.
- To develop a simpler yet more robust alternative to Stewart’s complex product-computation method, which requires testing all three ways of multiplying three terms.
- To provide a provably robust algorithm that maintains high accuracy even near the underflow threshold.
- To evaluate and compare the numerical robustness and performance of the proposed algorithm against existing methods using extensive randomized testing.
Proposed method
- The improved algorithm uses a modified formula that avoids the problematic $c^2 + d^2$ term by reorganizing the complex division expression to reduce intermediate overflow and underflow risks.
- It selects the optimal multiplication order for three-term products based on magnitude, eliminating one of the three possible orders as unnecessary, thus simplifying implementation.
- The algorithm detects underflow conditions and switches to a safer expression form, such as $e = a*t + (b*t)*r$, where both terms may underflow individually but their sum remains accurate.
- A second, more robust variant combines scaling techniques with the improved algorithm to handle cases where results are near the underflow threshold $\alpha$.
- The authors implemented and benchmarked all algorithms in ANSI C and Scilab, using a dataset of 1,574,802 random complex divisions to measure performance and accuracy.
- The robustness was evaluated through randomized numerical experiments, focusing on failure rates and digit accuracy in results.
Experimental results
Research questions
- RQ1Can a simpler complex division algorithm achieve robustness comparable to Stewart’s method without requiring all three ways of computing a three-term product?
- RQ2How frequently does Smith’s method fail in practice, and can these failures be systematically identified and mitigated?
- RQ3To what extent can scaling and expression reorganization improve accuracy near the underflow threshold in complex division?
- RQ4What is the performance overhead of increased robustness in complex division algorithms, and is it acceptable in practice?
Key findings
- The improved algorithm reduces failure rates by up to four orders of magnitude compared to naive implementations and two orders of magnitude compared to other known implementations.
- The improved algorithm achieves robustness comparable to Stewart’s method, with a failure rate that is significantly lower than Smith’s, Priest’s, Li et al.’s, and C99 algorithms.
- The robust variant of the algorithm produces more than 52 significant digits in both real and imaginary parts in most cases, even when results are near the underflow threshold $\alpha$.
- Performance measurements show the compiled improved algorithm runs at 5.0 MCDPS, slightly faster than Scilab’s native 4.7 MCDPS, while the robust version runs at 3.2 MCDPS, reflecting its higher complexity.
- The algorithm detects underflow in intermediate terms and switches to a safer expression, preserving accuracy even when individual terms are subnormal.
- Numerical experiments confirm that the algorithm fails only in rare cases where the exact result is extremely close to the underflow threshold, and even then, the magnitude is preserved correctly.
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.