# std.math.big.int: address log2/log10 reviews · gitcafe/zig

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

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

Visibility: public

Requested revision: 74f361a5ce5212ce321fd0ebfa4c158468a161bb

Requested commit: 74f361a5ce5212ce321fd0ebfa4c158468a161bb

Commit: 74f361a5ce5212ce321fd0ebfa4c158468a161bb

Tree: 3393ffb47774c585151d655bf2de33462d6e7b6c

Author: hemisputnik

Committer: Andrew Kelley

## Message

```
std.math.big.int: address log2/log10 reviews

There were good reviews made after #31365 was merged, so this commit
addresses them separately.

1. Assert that the number is greater than zero
2. Use `constants` instead of calculating constants manually
3. Use `Const.bitCountAbs` for log2

```

## Parents

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

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