#root::numeric

N32 root/numeric/N32.vi

type N32;

Natural numbers represented with 32 bits of precision.

let x = 12 + 34;
x // 46

N32 values are always in the range [0, 2^32) = [0, 4_294_967_296).

impl

impl : Fork[N32];
impl : Drop[N32];
impl : Add[N32, N32, N32];
impl : Sub[N32, N32, N32];
impl : Mul[N32, N32, N32];
impl : Pow[N32, N32, N32];
impl : Div[N32, N32, N32];
impl : Rem[N32, N32, N32];
impl : Pos[N32, I32];
impl : Neg[N32, I32];
impl : BitAnd[N32, N32, N32];
impl : BitOr[N32, N32, N32];
impl : BitXor[N32, N32, N32];
impl : Shl[N32, N32, N32];
impl : Shr[N32, N32, N32];
impl : Not[N32, N32];
impl : Show[N32];
impl : Ord[N32];
impl : Eq[N32];

maximum root/numeric/N32.vi:20

const maximum: N32;

The maximum N32 value, 2^32 - 1.

div_rem root/numeric/N32.vi:69

fn div_rem(a: N32, b: N32) -> (N32, N32);

to_string root/numeric/N32.vi:121

impl to_string: Cast[N32, String];

to_binary_raw root/numeric/N32.vi:142

fn to_binary_raw(n: N32) -> String;

to_binary root/numeric/N32.vi:154

fn to_binary(n: N32) -> String;

to_hex_raw root/numeric/N32.vi:158

fn to_hex_raw(n: N32) -> String;

to_hex root/numeric/N32.vi:176

fn to_hex(n: N32) -> String;

parse root/numeric/N32.vi:180

fn parse(str: String) -> Option[N32];

rotate_left root/numeric/N32.vi:198

fn rotate_left(a: N32, b: N32) -> N32;

rotate_right root/numeric/N32.vi:202

fn rotate_right(a: N32, b: N32) -> N32;

min root/numeric/N32.vi:230

fn min(a: N32, b: N32) -> N32;

max root/numeric/N32.vi:238

fn max(a: N32, b: N32) -> N32;

diff root/numeric/N32.vi:246

fn diff(a: N32, b: N32) -> N32;

gcd root/numeric/N32.vi:254

fn gcd(a: N32, b: N32) -> N32;

sqrt root/numeric/N32.vi:261

fn sqrt(n: N32) -> N32;

log root/numeric/N32.vi:274

fn log(n: N32, b: N32) -> N32;

leading_zeros root/numeric/N32.vi:302

fn leading_zeros(n: N32) -> N32;

trailing_zeros root/numeric/N32.vi:311

fn trailing_zeros(n: N32) -> N32;