Sat, 10 Oct 2009 21:29:41 +0000, dsimcha thusly wrote: > I guess I could have implemented some of these suggestions, but the idea > was for this lib to be very simple (it's only about 300 lines of code so > far) and agnostic to the implementation of the integers it's working on > top of, with the caveat that, if you use something that's not arbitrary > precision, the onus is on you to make sure nothing overflows. If > anyone, for example, made a wrapper to the GNU multiprecision lib that > looked like a D struct w/ operator overloading, it would be able to plug > right into this library. If std.bigint improves, this library will > automatically benefit.
Now that's the most perfect way to test the modularity of the language -- does it allow implementing a rational library on top of any (arbitrary precision) number type, assuming we have a sane interface to work with.