use crate::Float106;
use core::fmt;
use core::fmt::{LowerExp, UpperExp};
impl fmt::Display for Float106 {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
if self.lo == 0.0 {
write!(f, "{}", self.hi)
} else {
write!(f, "{}+{}", self.hi, self.lo)
}
}
}
impl LowerExp for Float106 {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
LowerExp::fmt(&self.hi, f)
}
}
impl UpperExp for Float106 {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
UpperExp::fmt(&self.hi, f)
}
}