Markus Himmel
784444c7a9
feat: IntX.minValue, IntX.maxValue, IntX.ofIntLE, IntX.ofIntTruncate ( #7081 )
...
This PR adds functions `IntX.ofIntLE`, `IntX.ofIntTruncate`, which are
analogous to the unsigned counterparts `UIntX.ofNatLT` and
`UInt.ofNatTruncate`.
2025-02-14 11:59:37 +00:00
Markus Himmel
4a900cc65c
chore: rename IntX.toNat -> IntX.toNatClampNeg ( #7066 )
...
This PR renames `IntX.toNat` to `IntX.toNatClampNeg` (to reduce
surprises) and sets up a deprecation.
2025-02-13 12:14:28 +00:00
Markus Himmel
a3fd2eb0fe
chore: make IntX constructor private, provide UIntX.toIntX ( #7062 )
...
This PR introduces the functions `UIntX.toIntX` as the public API to
obtain the `IntX` that is 2's complement equivalent to a given `UIntX`.
2025-02-13 11:29:31 +00:00
Markus Himmel
04fe72fee0
feat: missing conversion functions for ISize ( #7063 )
...
This PR adds `ISize.toInt8`, `ISize.toInt16`, `Int8.toISize`,
`Int16.toISize`.
2025-02-13 11:02:00 +00:00
Markus Himmel
b08fc5dfda
feat: IntX.ofBitVec ( #7048 )
...
This PR adds the functions `IntX.ofBitVec`.
2025-02-12 14:49:31 +00:00
Henrik Böving
f721f94045
feat: Bool.to(U)IntX ( #6060 )
...
This PR implements conversion functions from `Bool` to all `UIntX` and
`IntX` types.
Note that `Bool.toUInt64` already existed in previous versions of Lean.
2024-11-13 15:49:16 +00:00
Henrik Böving
c77b6a2c64
feat: define ISize and basic operations on it ( #5961 )
2024-11-05 15:08:19 +00:00
Henrik Böving
93dd6f2b36
feat: add Int16/Int32/Int64 ( #5885 )
...
This adds all fixed width integers with the exception of `ssize_t` so
the code is quick to review as everything just behaves the same.
2024-11-04 13:18:05 +00:00
Henrik Böving
193b6f2bec
feat: define Int8 ( #5790 )
2024-10-25 06:06:40 +00:00