Trait malachite_base::num::arithmetic::traits::Square

source ·
pub trait Square {
    type Output;

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

Squares a number.

Required Associated Types§

Required Methods§

source

fn square(self) -> Self::Output

Implementations on Foreign Types§

source§

impl Square for f32

source§

fn square(self) -> f32

Squares a number.

$f(x) = x^2$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = f32

source§

impl Square for f64

source§

fn square(self) -> f64

Squares a number.

$f(x) = x^2$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = f64

source§

impl Square for i8

source§

fn square(self) -> i8

Squares a number.

$f(x) = x^2$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = i8

source§

impl Square for i16

source§

fn square(self) -> i16

Squares a number.

$f(x) = x^2$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = i16

source§

impl Square for i32

source§

fn square(self) -> i32

Squares a number.

$f(x) = x^2$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = i32

source§

impl Square for i64

source§

fn square(self) -> i64

Squares a number.

$f(x) = x^2$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = i64

source§

impl Square for i128

source§

fn square(self) -> i128

Squares a number.

$f(x) = x^2$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = i128

source§

impl Square for isize

source§

fn square(self) -> isize

Squares a number.

$f(x) = x^2$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = isize

source§

impl Square for u8

source§

fn square(self) -> u8

Squares a number.

$f(x) = x^2$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = u8

source§

impl Square for u16

source§

fn square(self) -> u16

Squares a number.

$f(x) = x^2$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = u16

source§

impl Square for u32

source§

fn square(self) -> u32

Squares a number.

$f(x) = x^2$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = u32

source§

impl Square for u64

source§

fn square(self) -> u64

Squares a number.

$f(x) = x^2$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = u64

source§

impl Square for u128

source§

fn square(self) -> u128

Squares a number.

$f(x) = x^2$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = u128

source§

impl Square for usize

source§

fn square(self) -> usize

Squares a number.

$f(x) = x^2$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = usize

Implementors§