I’ve just published new package malaire/elm-uint64 - 64-bit unsigned integer using wrapping overflow.

Some functions and optimizations are still missing, but enough is implemented to publish first version.

Includes for example bitwise functions like shifts and rotations:

```
UInt64.fromInt32s 0x11223344 0xAABBCCDD
|> UInt64.rotateRightBy 20
|> UInt64.toHexString
--> "BCCDD11223344AAB"
```

And math functions like subtraction, division with modulo, and exponentiation:

```
-- `0 - 0xFF` wraps around to `0xFFFFFFFFFFFFFF01`
UInt64.sub UInt64.zero (UInt64.fromInt 0xFF)
|> UInt64.toHexString
--> "FFFFFFFFFFFFFF01"
-- ( 0xFFFFFFFFFFFFFFFF / 1e10, 0xFFFFFFFFFFFFFFFF % 1e10 )
UInt64.divMod UInt64.maxValue (UInt64.floor 1e10)
|> Tuple.mapBoth UInt64.toFloat UInt64.toFloat
--> ( 1844674407, 3709551615 )
-- `(3 ^ 10000000000000000000) % 2^64`
UInt64.pow (UInt64.fromInt 10) (UInt64.fromInt 19)
|> UInt64.pow (UInt64.fromInt 3)
|> UInt64.toString
--> "12038004833498693633"
```

# Performance

Some quick benchmark results. As usual I’m not interested in proper benchmarking, so take these with `2^64`

grains of salt:

```
runs / second
pow : 64-bit number ^ 64-bit number: ~ 40 000
pow : 64-bit number ^ 251 : ~ 300 000
divMod: 64-bit number / 40-bit number: ~ 2 000 000
pow : 64-bit number ^ 16 : ~ 3 000 000
divMod: 64-bit number / 29-bit number: ~ 5 000 000
add, sub, mul : > 10 000 000
bitwise shift/rotate by 1 bit : ~ 20 000 000
```

Benchmarking was done with `elm make --optimize`

, Firefox 68, Debian Linux and Core i5 3570K 3.4 GHz.

# Testing

Every function is tested with at least one full-range fuzz test.