Bug 17249 – Make BigInt data visible (not modifiable!)
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-03-09T23:16:05Z
Last change time
2018-01-25T21:59:57Z
Assigned to
No Owner
Creator
Paul D. Anderson
Comments
Comment #0 by paul.d.anderson — 2017-03-09T23:16:05Z
Determining the number of decimal digits in a BigInt requires examination of the ulong/uint data. It would be useful to have a straightforward method of doing so.
I recommend making the std.internal.math.biguintcore functions peekUlong and peekUint visible at the std.bigint level by adding the following functions to std.bigint:
ulong ulongDigit(int n) pure nothrow const @safe @nogc
{
return data.peekUlong(n);
}
uint uintDigit(int n) pure nothrow const @safe @nogc
{
return data.peekUint(n);
}
I've readied a pull request to add these functions to std.bigint
Comment #1 by greeenify — 2017-07-17T11:21:49Z
> I've readied a pull request to add these functions to std.bigint
Are you still working on this?
Comment #2 by github-bugzilla — 2018-01-25T21:59:56Z