# std.math.big.int: Add Sqrt · gitcafe/zig

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

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

Visibility: public

Requested revision: 4422af8be96d243db7840b840737069c38be8afb

Requested commit: 4422af8be96d243db7840b840737069c38be8afb

Commit: 4422af8be96d243db7840b840737069c38be8afb

Tree: bc7105f165cb8877b9365498a440b81ea1f7f8de

Author: Mizuochi Keita

Committer: Veikka Tuominen

## Message

```
std.math.big.int: Add Sqrt

Implemented with reference to Modern Computer Arithmetic, Algorithm 1.13.
https://members.loria.fr/PZimmermann/mca/pub226.html

The below optimization ideas are derived from Go's big package.

* Minimize initial loop value
* Reuse loop values

math/big/int.go: https://cs.opensource.google/go/go/+/refs/tags/go1.20.4:src/math/big/int.go;l=1286

```

## Parents

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

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