Principal values and branch cuts in complex APL

  • Authors:
  • Paul Penfield, Jr.

  • Affiliations:
  • Department of Electrical Engineering and Computer Science, Massachusetts Institute of Technology, Cambridge, MA

  • Venue:
  • APL '81 Proceedings of the international conference on APL
  • Year:
  • 1981

Quantified Score

Hi-index 0.00

Visualization

Abstract

Complex numbers are useful in science and engineering and, through analogy to the complex plane, in two-dimensional graphics, such as those for integrated-circuit layouts. The extension of APL to complex numbers requires many decisions. Almost all have been discussed in detail in a recent series of papers. One topic requiring further discussion is the choice of branch cuts and principal values for the primitive APL functions that require them. Conventional mathematical notation and the experience of other computer languages are of only moderate help. For example, one cannot find in the mathematics or computer-science literature a definitive value for the principal value of the arcsin of 3. The extension of APL to the complex domain presents a unique opportunity to define a set of choices that will best serve APL and other languages. This paper recommends locations of all branch cuts, directions of continuity of the branch cuts, and values at the branch points. It also recommends that comparison tolerance be used in the selection of principal values. The results apply to APL, other languages, applications packages, and VLSI hardware for complex calculations.