diff --git a/src/float.rs b/src/float.rs index 275f85e..3ba0edd 100644 --- a/src/float.rs +++ b/src/float.rs @@ -1802,7 +1802,7 @@ pub trait Float: Num + Copy + NumCast + PartialOrd + Neg { /// assert!(n.imag() == 0.0f64); /// ``` fn imag(self) -> Self { - Self::zero() + self * Self::zero() } /// Returns the mantissa, base 2 exponent, and sign as integers, respectively.