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