pub fn coerce(self, other: SafasNumber) -> (SafasNumber, SafasNumber) {
        use self::SafasNumber::*;

        match (self, other) {
            (SignedBitNumber(_, _), _)  => (self, SignedBitNumber(other.bits(), other.to_i128())),
            (_, SignedBitNumber(_, _))  => (SignedBitNumber(self.bits(), self.to_i128()), other),
            (BitNumber(_, _), _)        => (self, BitNumber(other.bits(), other.to_u128())),
            (_, BitNumber(_, _))        => (BitNumber(self.bits(), self.to_u128()), other),
            (Plain(_), _)               => (self, Plain(other.to_u128()))
        }
    }
///
/// Coerces this and another number to be the same type
///
Coerces this and another number to be the same type
Coerces this and another number to be the same type
pub fn coerce(self, other: SafasNumber) -> (SafasNumber, SafasNumber) {
        use self::SafasNumber::*;
        match (self, other) {
            (SignedBitNumber(_, _), _)  => (self, SignedBitNumber(other.bits(), other.to_i128())),
            (_, SignedBitNumber(_, _))  => (SignedBitNumber(self.bits(), self.to_i128()), other),
            (BitNumber(_, _), _)        => (self, BitNumber(other.bits(), other.to_u128())),
            (_, BitNumber(_, _))        => (BitNumber(self.bits(), self.to_u128()), other),
            (Plain(_), _)               => (self, Plain(other.to_u128()))
        }
    }
pub fn coerce ( self , other : SafasNumber ) -> ( SafasNumber , SafasNumber ) { use self :: SafasNumber :: * ; match ( self , other ) { ( SignedBitNumber ( _ , _ ) , _ ) => ( self , SignedBitNumber ( other . bits ( ) , other . to_i128 ( ) ) ) , ( _ , SignedBitNumber ( _ , _ ) ) => ( SignedBitNumber ( self . bits ( ) , self . to_i128 ( ) ) , other ) , ( BitNumber ( _ , _ ) , _ ) => ( self , BitNumber ( other . bits ( ) , other . to_u128 ( ) ) ) , ( _ , BitNumber ( _ , _ ) ) => ( BitNumber ( self . bits ( ) , self . to_u128 ( ) ) , other ) , ( Plain ( _ ) , _ ) => ( self , Plain ( other . to_u128 ( ) ) ) } }
Coerces this and another number to be the same type
Coerces this and another number to be the same type
self
other
SafasNumber
self
other
SafasNumber