Abstract
We develop efficient algorithms for reliable and accurate evaluatins of the complex arcsine and arccosine functions. A tight error bound is derived for each algorithm; the results are valid for all machine-representable points in the complex plane. The algorithms are presented in a pseudocode that has a convenient exception-handling facility. Corresponding Fortran 77 programs for an IEEE environment have also been developed to illustrate the practicality of the algorithms, and these programs have been tested very carefully to help confirm the correctness of the algorithms and their error bounds. The results of these tests are included in the article, but the Fortran 77 programs are not (these programs are available from Fairgrieve). Tests of other widely available programs fail at many points in the complex plane, and otherwise are slower and produce much less accurate results.
- ABRAMOWITZ, M. AND STEGUN, I. 1972. Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables. Applied Mathematics Series, vol. 55. 10th printing. National Bureau of Standards, Washington, D.C.]] Google Scholar
- ANSI. 1978. American National Standard programming language FORTRAN: ANSI X3.9- 1978. American National Standards Institute, New York, NY.]]Google Scholar
- CHURCHILL, R. V., BROWN, J. W., AND VERHEY, R. F. 1974. Complex Variables and Applications. 3rd ed. McGraw-Hill, Inc., New York, NY.]]Google Scholar
- CODY, W. J. 1988. Algorithm 665: MACHAR: A subroutine to dynamically determine machine parameters. ACM Trans. Math. Softw. 14, 4 (Dec.), 303-311.]] Google Scholar
- HULL, T. E., FAIRGRIEVE, T. F., AND TANG, P. T.P. 1994a. Implementing complex elementary functions using exception handling. ACM Trans. Math. Softw. 20, 2 (June), 215-244.]] Google Scholar
- HULL, T. E., FAIRGRIEVE, T. F., AND TANG, P. T. P. 1994b. Corrigenda: Implementing complex elementary functions using exception handling. ACM Trans. Math. Softw. 20, 4 (Dec.).]] Google Scholar
- IEEE. 1985. ANSI/IEEE standard for binary floating point arithmetic: Standard 754- 1985. IEEE Press, Piscataway, NJ.]]Google Scholar
- IFIP WORKING GROUP 2.5. 1993. The enable construct for exception handling in Fortran 90. SIGNUM Newsl. 28, 4 (Oct.), 7-16.]] Google Scholar
- INTERMETRICS. 1994. Ada 9X reference manual. Intermetrics, Inc., Burlington, MA.]]Google Scholar
- SUN MICROSYSTEMS. 1991. Numerical computations guide: Part number 800-5277-10, Revision A. Sun Microsystems, Incorporated, Mountain View, CA.]]Google Scholar
- TYDEMAN, F. J. 1992. Merging complex and IEEE-754. Rep. 92-061 of ANSI X3J11.1 (NCEG). American National Standards Institute, New York, NY.]]Google Scholar
Index Terms
- Implementing the complex arcsine and arccosine functions using exception handling
Recommendations
Implementing complex elementary functions using exception handling
Algorithms are developed for reliable and accurate evaluations of the complex elementary functions required in FORTRAN 77 and FORTRAN 9, namely, cabs, csqrt, cexp, clog, csin, and ccos. The algorithms are presented in a pseudocode that has a convenient ...
Efficient Java exception handling in just-in-time compilation
Research ArticlesJava uses exceptions to provide elegant error handling capabilities during program execution. However, the presence of exception handlers complicates the job of the just-in-time (JIT) compiler, while exceptions are rarely used in most programs. This ...
Comments