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
Required Methods
fn mul_assign_round(&mut self, rhs: Rhs, round: Self::Round) -> Self::Ordering
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
impl MulAssignRound<Float> for Float
impl<'a> MulAssignRound<&'a Float> for Float
impl MulAssignRound<Integer> for Float
impl<'a> MulAssignRound<&'a Integer> for Float
impl MulAssignRound<Rational> for Float
impl<'a> MulAssignRound<&'a Rational> for Float
impl MulAssignRound<i32> for Float
impl MulAssignRound<u32> for Float
impl MulAssignRound<f32> for Float
impl MulAssignRound<f64> for Float
impl MulAssignRound<Complex> for Complex
impl<'a> MulAssignRound<&'a Complex> for Complex
impl MulAssignRound<Float> for Complex
impl<'a> MulAssignRound<&'a Float> for Complex
impl MulAssignRound<u32> for Complex
impl MulAssignRound<i32> for Complex