Skip to content
Complex numbers for Rust
Rust Shell
Branch: master
Clone or download
bors and dingelish Merge #67
67: Compatible with cargo --remap-path-prefix r=cuviper a=dingelish

As discussed in [num-traits issue 139](rust-num/num-traits#139).

Co-authored-by: Yu Ding <>
Latest commit 9fbb92a Nov 6, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
ci Release 0.2.0 May 25, 2018
src test_const Jul 27, 2019
.gitignore Update num-macros to Rust master May 14, 2015
.travis.yml bump autocfg to fix no_std probing May 22, 2019
Cargo.toml Release 0.2.3 Jun 11, 2019
LICENSE-APACHE Initial seeding from rust repo Sep 16, 2014
LICENSE-MIT Initial seeding from rust repo Sep 16, 2014 Release 0.2.0 May 25, 2018 Release 0.2.3 Jun 11, 2019
bors.toml Enable bors-ng Jul 9, 2017 Compatible with cargo --remap-path-prefix Nov 3, 2019


crate documentation minimum rustc 1.15 Travis status

Complex numbers for Rust.


Add this to your Cargo.toml:

num-complex = "0.2"

and this to your crate root:

extern crate num_complex;


This crate can be used without the standard library (#![no_std]) by disabling the default std feature. Use this in Cargo.toml:

version = "0.2"
default-features = false

Features based on Float types are only available when std is enabled. Where possible, FloatCore is used instead. Formatting complex numbers only supports format width when std is enabled.

Implementations for i128 and u128 are only available with Rust 1.26 and later. The build script automatically detects this, but you can make it mandatory by enabling the i128 crate feature.


Release notes are available in


The num-complex crate is tested for rustc 1.15 and greater.

You can’t perform that action at this time.