# Nat64

64-bit unsigned integers with checked arithmetic

Most operations are available as built-in operators (`1 + 1`).

## toNat

Conversion.

``let toNat : (Nat64) -> Nat``

## fromNat

Conversion. Traps on overflow/underflow.

``let fromNat : (Nat) -> Nat64``

## toText

Returns the Text representation of `x`.

``func toText(x : Nat64) : Text``

## min

Returns the minimum of `x` and `y`.

``func min(x : Nat64, y : Nat64) : Nat64``

## max

Returns the maximum of `x` and `y`.

``func max(x : Nat64, y : Nat64) : Nat64``

## equal

Returns `x == y`.

``func equal(x : Nat64, y : Nat64) : Bool``

## notEqual

Returns `x != y`.

``func notEqual(x : Nat64, y : Nat64) : Bool``

## less

Returns `x < y`.

``func less(x : Nat64, y : Nat64) : Bool``

## lessOrEqual

Returns `x ⇐ y`.

``func lessOrEqual(x : Nat64, y : Nat64) : Bool``

## greater

Returns `x > y`.

``func greater(x : Nat64, y : Nat64) : Bool``

## greaterOrEqual

Returns `x >= y`.

``func greaterOrEqual(x : Nat64, y : Nat64) : Bool``

## compare

Returns the order of `x` and `y`.

``func compare(x : Nat64, y : Nat64) : {#less : (); #equal : (); #greater : ()}``

Returns the sum of `x` and `y`, `x + y`. Traps on overflow.

``func add(x : Nat64, y : Nat64) : Nat64``

## sub

Returns the difference of `x` and `y`, `x - y`. Traps on underflow.

``func sub(x : Nat64, y : Nat64) : Nat64``

## mul

Returns the product of `x` and `y`, `x * y`. Traps on overflow.

``func mul(x : Nat64, y : Nat64) : Nat64``

## div

Returns the division of `x by y`, `x / y`. Traps on division by zero.

``func div(x : Nat64, y : Nat64) : Nat64``

## rem

Returns the remainder of `x` divided by `y`, `x % y`.

``func rem(x : Nat64, y : Nat64) : Nat64``

## pow

Returns `x` to the power of `y`, `x ** y`. Traps on overflow.

``func pow(x : Nat64, y : Nat64) : Nat64``