JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Studio 12.2: C++ User's Guide
search filter icon
search icon

Document Information

Preface

Part I C++ Compiler

1.  The C++ Compiler

2.  Using the C++ Compiler

3.  Using the C++ Compiler Options

Part II Writing C++ Programs

4.  Language Extensions

5.  Program Organization

6.  Creating and Using Templates

7.  Compiling Templates

8.  Exception Handling

9.  Improving Program Performance

10.  Building Multithreaded Programs

Part III Libraries

11.  Using Libraries

12.  Using The C++ Standard Library

13.  Using the Classic iostream Library

14.  Using the Complex Arithmetic Library

14.1 The Complex Library

14.1.1 Using the Complex Library

14.2 Type complex

14.2.1 Constructors of Class complex

14.2.2 Arithmetic Operators

14.3 Mathematical Functions

14.4 Error Handling

14.5 Input and Output

14.6 Mixed-Mode Arithmetic

14.7 Efficiency

14.8 Complex Man Pages

15.  Building Libraries

Part IV Appendixes

A.  C++ Compiler Options

B.  Pragmas

Glossary

Index

Chapter 14

Using the Complex Arithmetic Library

Complex numbers are numbers made up of a real part and an imaginary part. For example:

3.2 + 4i 1 + 3i 1 + 2.3i

In the degenerate case, 0 + 3i is an entirely imaginary number generally written as 3i, and 5 + 0i is an entirely real number generally written as 5. You can represent complex numbers using the complex data type.


Note - The complex arithmetic library ( libcomplex) is available only for compatibility mode ( -compat[ =4]). In standard mode (the default mode), complex number classes with similar functionality are included with the C++ Standard Library libCstd.