Does std.bigint compile under D2.40?
Paul D. Anderson
paul.d.removethis.anderson at comcast.andthis.net
Tue Feb 16 11:06:37 PST 2010
I'm close to wrapping up a decimal (bigfloat) module for D (coming soon to dsource!) and, as you might imagine, it uses std.bigint heavily.
I upgraded my compiler from D2.30 to D2.40 and got error messages regarding conflicts between struct constructors and struct initializers. I cleaned up my code, but when I tried to compile again it complained about struct initializers in std.bigint.
I'm away from my home computer, so I can't give specifics on the error(s), but I know bigint is overdue for a rework, and that it has been missing from the phobos documentation for a long time. My question is whether anyone else is using std.bigint and has experienced this problem.
For what it's worth, there are several features that I wish were present in std.bigint, mostly dealing with decimal representation:
1. Return the number of decimal digits are in a given bigint.
2. Return the first or last decimal digits in a bigint.
3. Some sort of decimal shift; divide/multiply by a given power or ten.
For the time being I've implemented these in my Decimal class, but are they of wider use to anyone else? (Note: I'm sure there are more efficient ways to implement these functions, and including them in std.bigint may allow these efficiency gaings.)
More information about the Digitalmars-d
mailing list