Int32
32-bit signed integers with checked arithmetic
Most operations are available as built-in operators (e.g. 1 + 1
).
toInt
let toInt : Int32 -> Int
Conversion.
fromInt
let fromInt : Int -> Int32
Conversion. Traps on overflow/underflow.
fromIntWrap
let fromIntWrap : Int -> Int32
Conversion. Wraps on overflow/underflow.
fromNat32
let fromNat32 : Nat32 -> Int32
Conversion. Wraps on overflow/underflow.
toNat32
let toNat32 : Int32 -> Nat32
Conversion. Wraps on overflow/underflow.
toText
func toText(x : Int32) : Text
Returns the Text representation of x
.
bittest
func bittest(x : Int32, p : Nat) : Bool
Returns the value of bit p mod 16
in x
, (x & 2^(p mod 16)) == 2^(p mod 16)
.