phobos/changelog/std-bigint-getDigit.dd
2018-01-03 15:08:50 -05:00

15 lines
398 B
Text

`getDigit` Was Added To `std.bigint`
$(REF getDigit, std, algorithm, BigInt) gives the `ulongs` or `uints`
that make up the underlying representation of the `BigInt`.
-----
import std.bigint;
auto a = BigInt("1000");
assert(a.getDigit(0) == 1000);
auto b = BigInt("2_000_000_000_000_000_000_000_000_000");
assert(b.getDigit(0) == 4584946418820579328);
assert(b.getDigit(1) == 108420217);
-----