Trait malachite_base::num::arithmetic::traits::Abs

source ·
pub trait Abs {
    type Output;

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

Takes the absolute value of a number. Assumes that the number has a representable absolute number.

Required Associated Types§

Required Methods§

source

fn abs(self) -> Self::Output

Implementations on Foreign Types§

source§

impl Abs for f32

source§

fn abs(self) -> f32

This is a wrapper over the abs functions from libm.

§

type Output = f32

source§

impl Abs for f64

source§

fn abs(self) -> f64

This is a wrapper over the abs functions from libm.

§

type Output = f64

source§

impl Abs for i8

source§

fn abs(self) -> i8

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

§

type Output = i8

source§

impl Abs for i16

source§

fn abs(self) -> i16

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

§

type Output = i16

source§

impl Abs for i32

source§

fn abs(self) -> i32

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

§

type Output = i32

source§

impl Abs for i64

source§

fn abs(self) -> i64

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

§

type Output = i64

source§

impl Abs for i128

source§

fn abs(self) -> i128

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

§

type Output = i128

source§

impl Abs for isize

source§

fn abs(self) -> isize

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

§

type Output = isize

Implementors§