Skip to content

Commit

Permalink
Merge pull request #4 from clarcharr/master
Browse files Browse the repository at this point in the history
Fix on nightly.
  • Loading branch information
Clar Roʒe authored Oct 2, 2017
2 parents d01ee22 + c9cf15a commit 83062b2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ pub trait Ieee754: Copy + PartialEq + PartialOrd {
///
/// ```rust
/// use ieee754::Ieee754;
/// assert_eq!(f32::from_bits(0xbf80_0000), -1.0);
/// let float: f32 = Ieee754::from_bits(0xbf80_0000);
/// assert_eq!(float, -1.0);
/// ```
fn from_bits(x: Self::Bits) -> Self;
/// Get the bias of the stored exponent.
Expand Down Expand Up @@ -414,7 +415,7 @@ macro_rules! mk_impl {
} else {
bits += 1
}
Self::from_bits(bits)
Ieee754::from_bits(bits)
}
#[inline]
fn prev(self) -> Self {
Expand All @@ -428,7 +429,7 @@ macro_rules! mk_impl {
} else {
bits -= 1;
}
Self::from_bits(bits)
Ieee754::from_bits(bits)
}

#[inline]
Expand All @@ -455,7 +456,7 @@ macro_rules! mk_impl {
}
#[inline]
fn recompose_raw(sign: bool, expn: Self::RawExponent, signif: Self::Significand) -> Self {
Self::from_bits(
Ieee754::from_bits(
unmask!(sign as Self::Bits => $expn_n, $signif_n) |
unmask!(expn as Self::Bits => $signif_n) |
unmask!(signif as Self::Bits => ))
Expand Down

0 comments on commit 83062b2

Please sign in to comment.