Trait malachite_base::num::arithmetic::traits::OverflowingAbs

source ·
pub trait OverflowingAbs {
    type Output;

    // Required method
    fn overflowing_abs(self) -> (Self::Output, bool);
}
Expand description

Takes the absolute value of a number.

Returns a tuple of the result along with a boolean indicating whether an arithmetic overflow occured. If an overflow occurred, then the wrapped number is returned.

Required Associated Types§

Required Methods§

source

fn overflowing_abs(self) -> (Self::Output, bool)

Implementations on Foreign Types§

source§

impl OverflowingAbs for i8

source§

fn overflowing_abs(self) -> (i8, bool)

This is a wrapper over the overflowing_abs functions in the standard library, for example this one.

§

type Output = i8

source§

impl OverflowingAbs for i16

source§

fn overflowing_abs(self) -> (i16, bool)

This is a wrapper over the overflowing_abs functions in the standard library, for example this one.

§

type Output = i16

source§

impl OverflowingAbs for i32

source§

fn overflowing_abs(self) -> (i32, bool)

This is a wrapper over the overflowing_abs functions in the standard library, for example this one.

§

type Output = i32

source§

impl OverflowingAbs for i64

source§

fn overflowing_abs(self) -> (i64, bool)

This is a wrapper over the overflowing_abs functions in the standard library, for example this one.

§

type Output = i64

source§

impl OverflowingAbs for i128

source§

fn overflowing_abs(self) -> (i128, bool)

This is a wrapper over the overflowing_abs functions in the standard library, for example this one.

§

type Output = i128

source§

impl OverflowingAbs for isize

source§

fn overflowing_abs(self) -> (isize, bool)

This is a wrapper over the overflowing_abs functions in the standard library, for example this one.

§

type Output = isize

Implementors§