Complex floating-point type
A complex floating-point type represents complex numbers with real and imaginary components, using floating-point values for those components.
Modern C, Third Edition
A complex type is a C arithmetic type representing a complex number with real and imaginary components based on a corresponding real floating-point type.
- How it is used
- Classifies complex numbers as one of C’s four principal numeric classes and supports their construction and component access.
- How deep it goes
- Defines representation, construction, portability, and component access, but stops short of detailed complex arithmetic.
- Examples
- Uses CMPLX(0.5, 0.5), 0.5 + 0.5*I, creal, cimag, and the nonstandard 0.5i literal as concrete examples.
- What you can do after
- Constructs portable complex constants and extracts their real and imaginary components while recognizing platform and comparison constraints.
Read how Modern C, Third Edition explains complex floating-point type →
Modern C
A complex number is a number expressible as the sum of a real component and an imaginary component.
- How it is used
- Classifies floating-point values that carry real and imaginary components and provides syntax for constructing them.
- How deep it goes
- Defines the three complex precisions and demonstrates constant construction, but does not develop complex arithmetic functions.
- Examples
- Uses CMPLX, CMPLXF, CMPLXL, I, and expressions such as 0.5 + 0.5*I.
- What you can do after
- Apply it via C's complex.h macros to declare complex values and construct constants with selected precision.
The Quick Python Book, Fourth Edition
A complex number is a number consisting of a real component and an imaginary component, represented in Python with an imaginary component suffixed by j.
- How it is used
- Represents values with real and imaginary components and supports arithmetic or specialized numerical functions.
- How deep it goes
- Explains literal syntax, arithmetic, component attributes, object preservation, and cmath usage without formal mathematical treatment.
- Examples
- Demonstrates literals, multiplication, exponentiation, real and imaginary attributes, and cmath.sqrt(-1).
- What you can do after
- Apply complex arithmetic and inspect components, then call complex-capable functions through the cmath module.
Read how The Quick Python Book, Fourth Edition explains complex floating-point type →
Also covered in
- Geometry for Programmers
- Building Quantum Software with Python
- Rust in Action: Systems programming concepts and techniques
- Refactoring to Rust
- Go in Action, Second Edition
What to know first
- PythonPython is a high-level, general-purpose, dynamically typed programming language with readable syntax and support for multiple programming paradigms.
- arrayAn array is an ordered collection of elements organized in one or more dimensions and accessible by position or index.
- quantitative dataQuantitative data is information represented numerically as quantities, measurements, counts, or other values suitable for numerical interpretation or analysis.
Related concepts
- number typekind of · A numeric type is a type whose values represent numbers with a defined representation and support numerical operations.
- arrayequivalent to · An array is an ordered collection of elements organized in one or more dimensions and accessible by position or index.
Questions about complex floating-point type
What is complex floating-point type?
A complex floating-point type represents complex numbers with real and imaginary components, using floating-point values for those components.
Which Manning books explain complex floating-point type?
Modern C, Third Edition, Modern C and The Quick Python Book, Fourth Edition.
What should I know before learning complex floating-point type?
Manning books that teach complex floating-point type usually introduce Python, array, derived type and quantitative data first.
What is complex floating-point type a kind of?
Complex floating-point type is a kind of number type. A numeric type is a type whose values represent numbers with a defined representation and support numerical operations.
What are the parts of complex floating-point type?
Complex floating-point type includes imaginary part and real part.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


