Skip to content

Commit a6e2912

Browse files
committed
Update doc strings to clarify which numbers are recoverable
1 parent 6d33cdb commit a6e2912

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/float.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,9 @@ pub trait FloatCore: Num + NumCast + Neg<Output = Self> + PartialOrd + Copy {
775775
fn to_radians(self) -> Self;
776776

777777
/// Returns the mantissa, base 2 exponent, and sign as integers, respectively.
778+
///
778779
/// The original number can be recovered by `sign * mantissa * 2 ^ exponent`.
780+
/// This formula only works for zero, normal, and infinite numbers (per `classify()`)
779781
///
780782
/// # Examples
781783
///
@@ -1861,7 +1863,9 @@ pub trait Float: Num + Copy + NumCast + PartialOrd + Neg<Output = Self> {
18611863
fn atanh(self) -> Self;
18621864

18631865
/// Returns the mantissa, base 2 exponent, and sign as integers, respectively.
1866+
///
18641867
/// The original number can be recovered by `sign * mantissa * 2 ^ exponent`.
1868+
/// This formula only works for zero, normal, and infinite numbers (per `classify()`)
18651869
///
18661870
/// ```
18671871
/// use num_traits::Float;

0 commit comments

Comments
 (0)