Paul D. Anderson wrote:
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.

Cool!

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.

I'm planning on replacing std.bigint with an upgraded version of tango.math.bigint. Haven't got around to it yet (distracted by fixing compiler bugs <g>, and anyway the new operator overloading syntax will appear in the next release). You should probably take a look at Tango bigint to get an idea of how it differs from the current std.bigint.
Eg, it supports efficient powers.

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.

Reply via email to