Trait rug::ops::MulAssignRound [] [src]

pub trait MulAssignRound<Rhs = Self> {
    type Round;
    type Ordering;
    fn mul_assign_round(
        &mut self,
        rhs: Rhs,
        round: Self::Round
    ) -> Self::Ordering; }

Compound multiplication and assignment with a specified rounding method.

Associated Types

The rounding method.

The direction from rounding.

Required Methods

Performs the multiplication.

Examples

use rug::Float;
use rug::float::Round;
use rug::ops::MulAssignRound;
use std::cmp::Ordering;
// only four significant bits
let mut f = Float::with_val(4, -3);
let dir = f.mul_assign_round(13, Round::Nearest);
// -39 rounded down to -40
assert_eq!(f, -40);
assert_eq!(dir, Ordering::Less);

Implementors