A02 Chapter Contents
A02 Chapter Introduction (PDF version)
NAG Library Manual

NAG Library Chapter Introduction

A02 – Complex Arithmetic

+ Contents

1  Scope of the Chapter

This chapter provides facilities for arithmetic operations involving complex numbers.

2  Background to the Problems

Of the several representations used for complex numbers, perhaps the most common is a+ib, where a and b are real numbers, and i represents the imaginary number -1. The number a is the real part, and ib the imaginary part.
For the basic arithmetic operations of addition, subtraction and multiplication, the inclusion of routines was not considered worthwhile. Their coding would be short and no special techniques need be used.
In complex number operations of a more complicated nature, special precautions may have to be taken to avoid unnecessary overflow and underflow at intermediate stages of the computation. This has led to the inclusion of routines in this chapter.

3  Recommendations on Choice and Use of Available Routines

The routines were originally written for use by NAG Library routines which compute eigensystems of real and complex matrices (see Chapter F02). They may, however, be of general use to programmers using complex numbers.
Fortran programmers may prefer to use the COMPLEX facilities in that language rather than carrying the real and imaginary parts of the numbers in different variables.

4  Functionality Index

Complex numbers, 
    division A02ACF
    modulus A02ABF
    square root A02AAF

5  Auxiliary Routines Associated with Library Routine Parameters

None.

6  Routines Withdrawn or Scheduled for Withdrawal

None.

A02 Chapter Contents
A02 Chapter Introduction (PDF version)
NAG Library Manual

© The Numerical Algorithms Group Ltd, Oxford, UK. 2012