IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /docs/manual/basics.md). For the complete Mojo documentation index, see llms.txt.
Skip to main content
Version: 1.0.0b1
For the complete Mojo documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /docs/manual/basics.md).

complex

Implements the Complex dtype.

You can import these APIs from the complex package. For example:

from std.complex import ComplexSIMD

comptime values

ComplexFloat32

comptime ComplexFloat32 = ComplexSIMD[DType.float32, 1]

A complex number with 32-bit floating point components.

ComplexFloat64

comptime ComplexFloat64 = ComplexSIMD[DType.float64, 1]

A complex number with 64-bit floating point components.

ComplexScalar

comptime ComplexScalar = ComplexSIMD[?, 1]

Represents a scalar complex value.

Structs

Functions

  • abs: Performs elementwise abs (norm) on each element of the complex value.