# Add arbitrary-precision integer to std · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/dc8bda7e0203410132e0689b7561d9e8731176e9)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: dc8bda7e0203410132e0689b7561d9e8731176e9

Requested commit: dc8bda7e0203410132e0689b7561d9e8731176e9

Commit: dc8bda7e0203410132e0689b7561d9e8731176e9

Tree: 130a82f97f7b59279c15401a2442df8d1c7d87bc

Author: Marc Tiehuis

Committer: Marc Tiehuis

## Message

```
Add arbitrary-precision integer to std

A few notes on the implementation:

 - Any unsigned power of two integer type less than 64 bits in size is supported
 as a Limb type.
 - The algorithms used are kept simple for the moment. More complicated
 algorithms are generally only more useful as integer sizes increase a
 lot and I don't expect our current usage to be used for this purpose
 just yet.
 - All branches (practically) have been covered by tests.

See https://github.com/tiehuis/zig-bn/tree/986a2b3243d0454b8430a6adf4ad48611850c1b8/bench
for rough performance comparison numbers.

Closes #364.

```

## Parents

- [0a95b0f1ffeb8ae5ee317b02626890adebe5ec63](https://git.cafe/gitcafe/zig/commit/0a95b0f1ffeb8ae5ee317b02626890adebe5ec63?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/dc8bda7e0203410132e0689b7561d9e8731176e9?format=markdown)
