mirror of
https://github.com/dlang/phobos.git
synced 2025-04-30 15:10:46 +03:00
15 lines
398 B
Text
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);
|
|
-----
|