Expand description
Lean’s Int: an integer of any size.
An integer that fits 32 bits is stored in the pointer bits; anything else is the same
heap object a large Nat uses, with a sign. As in lean.h, arguments are borrowed and
results are owned unless noted.
Functions§
- float_
scaleb ⚠ a * 2^b.- int8_
of_ ⚠int - An
Intreduced to a fixed width, as its bits. - int8_
to_ int - A fixed-width signed integer, given as its bits, as an
Int. - int16_
of_ ⚠int - int16_
to_ int - int32_
of_ ⚠int - int32_
to_ int - int64_
of_ ⚠int - int64_
to_ int_ sint - int_add⚠
- int_
dec_ ⚠eq - int_
dec_ ⚠le - int_
dec_ ⚠lt - int_
dec_ ⚠nonneg - int_div⚠
- Division rounding toward zero; zero when the divisor is zero.
- int_
div_ ⚠exact - int_
ediv ⚠ - Euclidean division: the remainder is never negative. Zero when the divisor is zero.
- int_
emod ⚠ - The remainder of Euclidean division; the dividend when the divisor is zero.
- int_mod⚠
- Remainder with the sign of the dividend; the dividend when the divisor is zero.
- int_mul⚠
- int_neg⚠
- int_
neg_ ⚠succ_ of_ nat -(n + 1)for aNatn. Consumesn.- int_sub⚠
- int_
to_ ⚠nat - A non-negative
Intas aNat. Consumesa. - isize_
of_ ⚠int - isize_
to_ int - nat_abs⚠
- The absolute value, as a
Nat. - nat_
to_ ⚠int - A
Natas anInt. Consumesa.