#complex-numbers

no-std num-complex

Complex numbers implementation for Rust

25 releases

0.4.6 May 7, 2024
0.4.5 Feb 6, 2024
0.4.4 Aug 13, 2023
0.4.3 Jan 19, 2023
0.1.33 Jul 12, 2016

#9 in Math

Download history 998961/week @ 2024-08-19 1006096/week @ 2024-08-26 1047663/week @ 2024-09-02 1024517/week @ 2024-09-09 932606/week @ 2024-09-16 1026678/week @ 2024-09-23 1014765/week @ 2024-09-30 1070618/week @ 2024-10-07 1142359/week @ 2024-10-14 1133556/week @ 2024-10-21 1037183/week @ 2024-10-28 1063562/week @ 2024-11-04 1081815/week @ 2024-11-11 1093543/week @ 2024-11-18 894631/week @ 2024-11-25 1049533/week @ 2024-12-02

4,165,332 downloads per month
Used in 9,426 crates (401 directly)

MIT/Apache

125KB
3K SLoC

num-complex

crate documentation minimum rustc 1.60 build status

Complex numbers for Rust.

Usage

Add this to your Cargo.toml:

[dependencies]
num-complex = "0.4"

Features

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

[dependencies.num-complex]
version = "0.4"
default-features = false

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

Releases

Release notes are available in RELEASES.md.

Compatibility

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

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~93–710KB
~14K SLoC