Arbitrary-precision whole number. See also Integer.Morph
Arbitrary-precision integer, constructable from bits
RecordWithoutConstructorFunction { sign : Sign
, absolute : Natural.AtLeast1
}
Arbitrary-precision signed Integer
, constructable from a Sign
and Natural.AtLeast1
bits
fromInt : Basics.Int -> Integer
Convert from an Int
fromNatural : Natural -> Integer
Convert from a Natural
absolute : Integer -> Natural
Remove its Sign
negate : Integer -> Integer
Flip its Sign
toInt : Integer -> Basics.Int
Convert to an Int
Keep in mind that this can overflow
since Int
is fixed in bit size while Integer
is not.