#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

#8 in Math

Download history 1003633/week @ 2024-08-04 1027029/week @ 2024-08-11 1002297/week @ 2024-08-18 1011773/week @ 2024-08-25 1047458/week @ 2024-09-01 1023477/week @ 2024-09-08 931652/week @ 2024-09-15 1026265/week @ 2024-09-22 1013536/week @ 2024-09-29 1070997/week @ 2024-10-06 1142046/week @ 2024-10-13 1135096/week @ 2024-10-20 1037753/week @ 2024-10-27 1066369/week @ 2024-11-03 1080394/week @ 2024-11-10 1040085/week @ 2024-11-17

4,278,373 downloads per month
Used in 9,322 crates (397 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

~0.1–0.8MB
~17K SLoC