math::checked+x86_64 +linux

math::checked provides safe integer arithmetic functions that check for overflow.

Index

Functions

fn addi16(a: i16, b: i16) (i16, bool);
fn addi32(a: i32, b: i32) (i32, bool);
fn addi64(a: i64, b: i64) (i64, bool);
fn addi8(a: i8, b: i8) (i8, bool);
fn addu16(a: u16, b: u16) (u16, bool);
fn addu32(a: u32, b: u32) (u32, bool);
fn addu64(a: u64, b: u64) (u64, bool);
fn addu8(a: u8, b: u8) (u8, bool);
fn muli16(a: i16, b: i16) (i16, bool);
fn muli32(a: i32, b: i32) (i32, bool);
fn muli64(a: i64, b: i64) (i64, bool);
fn muli8(a: i8, b: i8) (i8, bool);
fn mulu16(a: u16, b: u16) (u16, bool);
fn mulu32(a: u32, b: u32) (u32, bool);
fn mulu64(a: u64, b: u64) (u64, bool);
fn mulu8(a: u8, b: u8) (u8, bool);
fn subi16(a: i16, b: i16) (i16, bool);
fn subi32(a: i32, b: i32) (i32, bool);
fn subi64(a: i64, b: i64) (i64, bool);
fn subi8(a: i8, b: i8) (i8, bool);
fn subu16(a: u16, b: u16) (u16, bool);
fn subu32(a: u32, b: u32) (u32, bool);
fn subu64(a: u64, b: u64) (u64, bool);
fn subu8(a: u8, b: u8) (u8, bool);

Functions

fn addi16[link]

fn addi16(a: i16, b: i16) (i16, bool);

Adds 'a' and 'b', returning the result and whether overflow occurred.

fn addi32[link]

fn addi32(a: i32, b: i32) (i32, bool);

Adds 'a' and 'b', returning the result and whether overflow occurred.

fn addi64[link]

fn addi64(a: i64, b: i64) (i64, bool);

Adds 'a' and 'b', returning the result and whether overflow occurred.

fn addi8[link]

fn addi8(a: i8, b: i8) (i8, bool);

Adds 'a' and 'b', returning the result and whether overflow occurred.

fn addu16[link]

fn addu16(a: u16, b: u16) (u16, bool);

Adds 'a' and 'b', returning the result and whether overflow occurred.

fn addu32[link]

fn addu32(a: u32, b: u32) (u32, bool);

Adds 'a' and 'b', returning the result and whether overflow occurred.

fn addu64[link]

fn addu64(a: u64, b: u64) (u64, bool);

Adds 'a' and 'b', returning the result and whether overflow occurred.

fn addu8[link]

fn addu8(a: u8, b: u8) (u8, bool);

Adds 'a' and 'b', returning the result and whether overflow occurred.

fn muli16[link]

fn muli16(a: i16, b: i16) (i16, bool);

Multiplies 'a' and 'b' returning the result and whether overflow occurred.

fn muli32[link]

fn muli32(a: i32, b: i32) (i32, bool);

Multiplies 'a' and 'b' returning the result and whether overflow occurred.

fn muli64[link]

fn muli64(a: i64, b: i64) (i64, bool);

Multiplies 'a' and 'b' returning the result and whether overflow occurred.

fn muli8[link]

fn muli8(a: i8, b: i8) (i8, bool);

Multiplies 'a' and 'b' returning the result and whether overflow occurred.

fn mulu16[link]

fn mulu16(a: u16, b: u16) (u16, bool);

Multiplies 'a' and 'b' returning the result and whether overflow occurred.

fn mulu32[link]

fn mulu32(a: u32, b: u32) (u32, bool);

Multiplies 'a' and 'b' returning the result and whether overflow occurred.

fn mulu64[link]

fn mulu64(a: u64, b: u64) (u64, bool);

Multiplies 'a' and 'b' returning the result and whether overflow occurred.

fn mulu8[link]

fn mulu8(a: u8, b: u8) (u8, bool);

Multiplies 'a' and 'b' returning the result and whether overflow occurred.

fn subi16[link]

fn subi16(a: i16, b: i16) (i16, bool);

Subtracts 'b' from 'a', returning the result and whether overflow occurred.

fn subi32[link]

fn subi32(a: i32, b: i32) (i32, bool);

Subtracts 'b' from 'a', returning the result and whether overflow occurred.

fn subi64[link]

fn subi64(a: i64, b: i64) (i64, bool);

Subtracts 'b' from 'a', returning the result and whether overflow occurred.

fn subi8[link]

fn subi8(a: i8, b: i8) (i8, bool);

Subtracts 'b' from 'a', returning the result and whether overflow occurred.

fn subu16[link]

fn subu16(a: u16, b: u16) (u16, bool);

Subtracts 'b' from 'a', returning the result and whether overflow occurred.

fn subu32[link]

fn subu32(a: u32, b: u32) (u32, bool);

Subtracts 'b' from 'a', returning the result and whether overflow occurred.

fn subu64[link]

fn subu64(a: u64, b: u64) (u64, bool);

Subtracts 'b' from 'a', returning the result and whether overflow occurred.

fn subu8[link]

fn subu8(a: u8, b: u8) (u8, bool);

Subtracts 'b' from 'a', returning the result and whether overflow occurred.