- Upgrade to 2021 edition, MSRV 1.60
- Add
const ZERO
/ONE
/I
and implementConstZero
andConstOne
- Add
c32
andc64
functions to help constructComplex
values
Contributors: @cuviper
Contributors: @cuviper, @WalterSmuts
Contributors: @cuviper, @domna
Contributors: @cuviper, @zyansheep
- The new
ComplexFloat
trait provides a generic abstraction between floating-pointT
andComplex<T>
. Complex::exp
now handles edge cases with NaN and infinite parts.
Contributors: @cuviper, @JorisDeRidder, @obsgolem, @YakoYakoYokuYoku
Complex::from_str_radix
now returns an error for radix > 18, because 'i' and 'j' as digits are ambiguous with i or j imaginary parts.Complex<T>
now implementsbytemuck
traits whenT
does.Complex::cis
creates a complex with the given phase, ei θ.
Contributors: @bluss, @bradleyharden, @cuviper, @rayhem
rand
support has been updated to 0.8, requiring Rust 1.36.
Contributors: @cuviper
- Clarify the license specification as "MIT OR Apache-2.0".
Contributors: @cuviper
- The new "libm" feature passes through to
num-traits
, enablingFloat
features on no-std
builds.
num-complex
now requires Rust 1.31 or greater.- The "i128" opt-in feature was removed, now always available.
- Updated public dependences:
rand
support has been updated to 0.7, requiring Rust 1.32.
- Methods for
T: Float
now take values instead of references, most notably affecting the constructorfrom_polar
.
Contributors: @cuviper, @SOF3, @vks
Complex::new
is now aconst fn
for Rust 1.31 and later.- Updated the
autocfg
build dependency to 1.0.
Contributors: @burrbull, @cuviper, @dingelish
Complex::sqrt()
is now more accurate for negative reals.Complex::cbrt()
computes the principal cube root.
Contributors: @cuviper
Complex::l1_norm()
computes the Manhattan distance from the origin.Complex::fdiv()
andfinv()
use floating-point for inversion, which may avoid overflows for some inputs, at the cost of trigonometric rounding.Complex
now implementsnum_traits::MulAdd
andMulAddAssign
.Complex
now implementsZero::set_zero
andOne::set_one
.Complex
now implementsnum_traits::Pow
and addspowi
andpowu
.
Contributors: @adamnemecek, @cuviper, @ignatenkobrain, @Schultzer
Contributors: @cuviper, @termoshtt
Complex
now implementsnum_traits::Inv
andOne::is_one
.Complex
now implementsSum
andProduct
.Complex
now supportsi128
andu128
components with Rust 1.26+.Complex
now optionally supportsrand
0.5, implementing theStandard
distribution and a genericComplexDistribution
.Rem
with a scalar divisor now avoidsnorm_sqr
overflow.
num-complex
now requires rustc 1.15 or greater.- There is now a
std
feature, enabled by default, along with the implication that building without this feature makes this a#![no_std]
crate. A few methods now requireFloatCore
, and the remaining methods based onFloat
are only supported withstd
. - The
serde
dependency has been updated to 1.0, andrustc-serialize
is no longer supported bynum-complex
.
Contributors: @clarcharr, @cuviper, @shingtaklam1324, @termoshtt
Contributors: @shingtaklam1324
Contributors: @cuviper
No prior release notes were kept. Thanks all the same to the many contributors that have made this crate what it is!