pub fn int_mul(self, rhs: Self, flags: IntFlags) -> Option<Number> {
        let layout = self.layout();
        assert_eq!(layout, rhs.layout(), "multiplying numbers with different layout");
        match (layout, flags.signed) {
            (Layout::Integer(IntLayout { bytes, .. }), true) => self
                .to_i1024_bytes()
                .checked_mul(rhs.to_i1024_bytes())
                .map(Number::from)
                .and_then(|n| n.reshaped(Layout::signed(n.layout().bytes()), true))
                .and_then(|mut n| (n.reshape(Layout::signed(bytes)) || flags.wrap).then(|| n)),
            (Layout::Integer(IntLayout { bytes, .. }), false) => self
                .to_u1024_bytes()
                .checked_mul(rhs.to_u1024_bytes())
                .map(Number::from)
                .and_then(|n| n.reshaped(Layout::unsigned(n.layout().bytes()), true))
                .and_then(|mut n| (n.reshape(Layout::unsigned(bytes)) || flags.wrap).then(|| n)),
            (Layout::Float(_), _) => panic!("integer multiplication of float numbers"),
        }
    }
/// Multiplication of two integers with configuration flags for overflow and signed format.
/// If `signed` flag is inconsistent with Number layout,
/// the layout will be discarded before computing.
///
/// # Panics
///
/// - if applied to float number layouts
/// - if numbers in arguments has different layout.
Multiplication of two integers with configuration flags for overflow and signed format.
If `signed` flag is inconsistent with Number layout,
the layout will be discarded before computing.
Multiplication of two integers with configuration flags for overflow and signed format . If ` signed ` flag is inconsistent with Number layout the layout will be discarded before computing .
pub fn int_mul(self, rhs: Self, flags: IntFlags) -> Option<Number> {
        let layout = self.layout();
        assert_eq!(layout, rhs.layout(), "multiplying numbers with different layout");
        match (layout, flags.signed) {
            (Layout::Integer(IntLayout { bytes, .. }), true) => self
                .to_i1024_bytes()
                .checked_mul(rhs.to_i1024_bytes())
                .map(Number::from)
                .and_then(|n| n.reshaped(Layout::signed(n.layout().bytes()), true))
                .and_then(|mut n| (n.reshape(Layout::signed(bytes)) || flags.wrap).then(|| n)),
            (Layout::Integer(IntLayout { bytes, .. }), false) => self
                .to_u1024_bytes()
                .checked_mul(rhs.to_u1024_bytes())
                .map(Number::from)
                .and_then(|n| n.reshaped(Layout::unsigned(n.layout().bytes()), true))
                .and_then(|mut n| (n.reshape(Layout::unsigned(bytes)) || flags.wrap).then(|| n)),
            (Layout::Float(_), _) => panic!("integer multiplication of float numbers"),
        }
    }
pub fn int_mul ( self , rhs : Self , flags : IntFlags ) -> Option < Number > { let layout = self . layout ( ) ; assert_eq ! ( layout rhs layout ( ) " " ) ; match ( layout , flags . signed ) { ( Layout :: Integer ( IntLayout { bytes , .. } ) , true ) => self . to_i1024_bytes ( ) . checked_mul ( rhs . to_i1024_bytes ( ) ) . map ( Number :: from ) . and_then ( | n | n . reshaped ( Layout :: signed ( n . layout ( ) . bytes ( ) ) , true ) ) . and_then ( | mut n | ( n . reshape ( Layout :: signed ( bytes ) ) || flags . wrap ) . then ( | | n ) ) , ( Layout :: Integer ( IntLayout { bytes , .. } ) , false ) => self . to_u1024_bytes ( ) . checked_mul ( rhs . to_u1024_bytes ( ) ) . map ( Number :: from ) . and_then ( | n | n . reshaped ( Layout :: unsigned ( n . layout ( ) . bytes ( ) ) , true ) ) . and_then ( | mut n | ( n . reshape ( Layout :: unsigned ( bytes ) ) || flags . wrap ) . then ( | | n ) ) , ( Layout :: Float ( _ ) , _ ) => panic ! ( " " ) , } }
Multiplication of two integers with configuration flags for overflow and signed format.
Multiplication of two integers with configuration flags for overflow and signed format .
self
rhs
Self
flags
IntFlags
self
rhs
Self
flags
IntFlags
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 .