Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Natural
- integerToNatural :: Integer -> Natural
- naturalToInteger :: Natural -> Integer
Documentation
Type representing arbitrary-precision non-negative integers.
>>>
2^100 :: Natural
1267650600228229401496703205376
Operations whose result would be negative
,throw
(Underflow
:: ArithException
)
>>>
-1 :: Natural
*** Exception: arithmetic underflow
Since: base-4.8.0.0
Instances
integerToNatural :: Integer -> Natural #
naturalToInteger :: Natural -> Integer #