(sign_field << sign_shift) | (exponent_field << exponent_shift) | mantissa_field,
)
}
+ fn with_exponent_field(self, exponent_field: Self::BitsType) -> Self {
+ let exponent_shift = self.ctx().make(Self::PrimFloat::EXPONENT_FIELD_SHIFT);
+ let not_exponent_mask = self.ctx().make(!Self::PrimFloat::EXPONENT_FIELD_MASK);
+ Self::from_bits((self.to_bits() & not_exponent_mask) | (exponent_field << exponent_shift))
+ }
+ fn with_exponent_unbiased(self, exponent: Self::SignedBitsType) -> Self {
+ self.with_exponent_field(Self::add_exponent_bias(exponent))
+ }
fn sub_exponent_bias(exponent_field: Self::BitsType) -> Self::SignedBitsType {
Self::SignedBitsType::cvt_from(exponent_field)
- exponent_field