Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Complex Number Types

cpp_complex
mpc_complex
complex128
complex_adaptor

The following backends provide complex number arithmetic:

Backend Type

Header

Radix

Dependencies

Pros

Cons

cpp_complex

boost/multiprecision/cpp_complex.hpp

2

None

An all C++ Boost-licensed implementation.

Slower than MPC.

mpc

boost/multiprecision/mpc.hpp

2

MPC

Very fast and efficient back-end.

Dependency on LGLP-licensed [MPC] library.

compplex128

boost/multiprecision/complex128.hpp

2

float128 and libquadmath

Very fast and efficient number type.

128-bit precision only, and resticted to GCC.

complex_adaptor

boost/multiprecision/complex_adaptor.hpp

-

none

Can convert any backend type into a complex number backend.

Not a numbe rin it's own right, and hard to use as a result.


PrevUpHomeNext