pub fn float_sub(self, rhs: Self, flag: RoundingFlag) -> MaybeNumber {
        let layout = self.layout();
        assert_eq!(layout, rhs.layout(), "subtracting numbers with different layout");
        match layout {
            Layout::Float(FloatLayout::BFloat16) => (bf16::from(self) - bf16::from(rhs)).into(),
            Layout::Float(FloatLayout::IeeeHalf) => {
                ieee::Half::from(self).sub_r(rhs.into(), flag.into()).into()
            }
            Layout::Float(FloatLayout::IeeeSingle) => {
                ieee::Single::from(self).sub_r(rhs.into(), flag.into()).into()
            }
            Layout::Float(FloatLayout::IeeeDouble) => {
                ieee::Double::from(self).sub_r(rhs.into(), flag.into()).into()
            }
            Layout::Float(FloatLayout::IeeeQuad) => {
                ieee::Quad::from(self).sub_r(rhs.into(), flag.into()).into()
            }
            Layout::Float(FloatLayout::X87DoubleExt) => {
                ieee::X87DoubleExtended::from(self).sub_r(rhs.into(), flag.into()).into()
            }
            Layout::Float(FloatLayout::IeeeOct) => {
                ieee::Oct::from(self).sub_r(rhs.into(), flag.into()).into()
            }
            Layout::Float(FloatLayout::FloatTapered) => todo!("(#5) tapered float subtraction"),
            Layout::Integer(_) => panic!("float subtraction of integer numbers"),
        }
    }
/// Subtraction of two floats with configuration flags for rounding.
///
/// # Panics
///
/// - if applied to float number layouts
/// - if numbers in arguments has different layout.
Subtraction of two floats with configuration flags for rounding.
Subtraction of two floats with configuration flags for rounding .
pub fn float_sub(self, rhs: Self, flag: RoundingFlag) -> MaybeNumber {
        let layout = self.layout();
        assert_eq!(layout, rhs.layout(), "subtracting numbers with different layout");
        match layout {
            Layout::Float(FloatLayout::BFloat16) => (bf16::from(self) - bf16::from(rhs)).into(),
            Layout::Float(FloatLayout::IeeeHalf) => {
                ieee::Half::from(self).sub_r(rhs.into(), flag.into()).into()
            }
            Layout::Float(FloatLayout::IeeeSingle) => {
                ieee::Single::from(self).sub_r(rhs.into(), flag.into()).into()
            }
            Layout::Float(FloatLayout::IeeeDouble) => {
                ieee::Double::from(self).sub_r(rhs.into(), flag.into()).into()
            }
            Layout::Float(FloatLayout::IeeeQuad) => {
                ieee::Quad::from(self).sub_r(rhs.into(), flag.into()).into()
            }
            Layout::Float(FloatLayout::X87DoubleExt) => {
                ieee::X87DoubleExtended::from(self).sub_r(rhs.into(), flag.into()).into()
            }
            Layout::Float(FloatLayout::IeeeOct) => {
                ieee::Oct::from(self).sub_r(rhs.into(), flag.into()).into()
            }
            Layout::Float(FloatLayout::FloatTapered) => todo!("(#5) tapered float subtraction"),
            Layout::Integer(_) => panic!("float subtraction of integer numbers"),
        }
    }
pub fn float_sub ( self , rhs : Self , flag : RoundingFlag ) -> MaybeNumber { let layout = self . layout ( ) ; assert_eq ! ( layout rhs layout ( ) " " ) ; match layout { Layout :: Float ( FloatLayout :: BFloat16 ) => ( bf16 :: from ( self ) - bf16 :: from ( rhs ) ) . into ( ) , Layout :: Float ( FloatLayout :: IeeeHalf ) => { ieee :: Half :: from ( self ) . sub_r ( rhs . into ( ) , flag . into ( ) ) . into ( ) } Layout :: Float ( FloatLayout :: IeeeSingle ) => { ieee :: Single :: from ( self ) . sub_r ( rhs . into ( ) , flag . into ( ) ) . into ( ) } Layout :: Float ( FloatLayout :: IeeeDouble ) => { ieee :: Double :: from ( self ) . sub_r ( rhs . into ( ) , flag . into ( ) ) . into ( ) } Layout :: Float ( FloatLayout :: IeeeQuad ) => { ieee :: Quad :: from ( self ) . sub_r ( rhs . into ( ) , flag . into ( ) ) . into ( ) } Layout :: Float ( FloatLayout :: X87DoubleExt ) => { ieee :: X87DoubleExtended :: from ( self ) . sub_r ( rhs . into ( ) , flag . into ( ) ) . into ( ) } Layout :: Float ( FloatLayout :: IeeeOct ) => { ieee :: Oct :: from ( self ) . sub_r ( rhs . into ( ) , flag . into ( ) ) . into ( ) } Layout :: Float ( FloatLayout :: FloatTapered ) => todo ! ( " " ) , Layout :: Integer ( _ ) => panic ! ( " " ) , } }
Subtraction of two floats with configuration flags for rounding.
Subtraction of two floats with configuration flags for rounding .
self
rhs
Self
flag
RoundingFlag
self
rhs
Self
flag
RoundingFlag
panics
if applied to float number layouts
if numbers in arguments has different layout.
if applied to float number layouts if numbers in arguments has different layout .