diff --git a/src/cast.rs b/src/cast.rs index 6774b39..ee0b38f 100644 --- a/src/cast.rs +++ b/src/cast.rs @@ -157,7 +157,7 @@ impl Float { } } - fn from_bits(sem: Semantics, float: u64) -> Self { + pub fn from_bits(sem: Semantics, float: u64) -> Self { // Extract the biased exponent (wipe the sign and mantissa). let biased_exp = ((float >> sem.get_mantissa_len()) & mask(sem.get_exponent_len()) as u64) @@ -225,7 +225,7 @@ impl Float { self.cast_with_rm(to, self.get_rounding_mode()) } - fn as_native_float(&self) -> u64 { + pub fn as_native_float(&self) -> u64 { // https://en.wikipedia.org/wiki/IEEE_754 let mantissa: u64; let mut exp: u64;