Voting for Brian to go for GMP. because almost all linux distributions already contains GMP library. just like libc. so this cannot be considered as additional dependency. this is one of the heavily used library. well tested and stable. this way we can avoid reinventing the wheel.
if existing code is using string for this. its really bad. -Jobin On Sun, Nov 1, 2009 at 4:05 AM, Brian Aker <[email protected]> wrote: > Hi! > > On Oct 31, 2009, at 11:59 AM, John David Duncan wrote: > > The final result is not easy to grok. (Base 10^9?? One's complement!? And >> as Sheeri said, how big on disk??) But decimal.c is really only about 3,000 >> lines of code, including a 100-line comment on the SQL standard and a >> 200-line test suite. GMP is more like 50,000 lines. >> > > GMP can do a lot more feature-wise and can handle a much larger set of > numbers then what the hand written one can. > > So I'd like to make the case that it's pretty remarkable code. A database >> *must* have a fixed decimal type, this design has some real advantages over >> others, and there's nothing else out there that you can really just drop in >> to replace it. >> > > Looking at the code there really isn't much in the way of tests (200 lines > is pretty small). One of the other things I noticed was that when reading > the comments I found that it followed the standard bug for bug (aka... > behavior wise). Is that really way someone expects? > > I went and looked at the one PG is using. No limitations on size, doesn't > follow the SQL standard,... > > I'm not sure that I buy the disk format being the absolute best. Internally > when it was pushed several folks pointed out other solutions which, I have > no idea, might have been better then this one. What I do know though is that > it is not that complete. > > One question I ask myself... do we want to have to extend this library to > add additional functions? For that matter, what functions matter for a > database beyond comparison operations? There was a good argument to go with > the GMP since it was complete, widely used, and had a community that worked > on it. While right now? We will be stuck extending our own library, that > only we use. > > There is also the question of numerical constraint, what matters? > > I'm on the fence. I know this will go sometime, but I don't know when. I > hate creating upgrade paths though. > > Cheers, > -Brian > > >> I'd urge you folks to consider giving the decimal library a new lease on >> life by reusing it in drizzle. >> >> >> >> On Oct 30, 2009, at 11:44 AM, Brian Aker wrote: >> >> Hi! >>> >>> I'm working through some reference checking right now, and decided to >>> look at decimal. Just for those playing along at home, up until 5.0 MySQL >>> just stored DECIMAL as a string, mostly, and did all operations on it >>> through normal mathematical operations. Starting in 5.0 we switched to a >>> library and internal developer wrote which should mimic the SQL standard >>> (and if you read the header in the subject you can find out some of the >>> absurd bits it is doing). >>> >>> Would anyone care if we dropped this in favor of just using one of the >>> GNU based arbitrary libraries in the future? GMP perhaps (though it is not >>> quite the same)? I'm a minimalist when it comes to built in types so I tend >>> to favor this approach, but I would like to hear from others as well. >>> >>> Cheers, >>> -Brian >>> >>> BTW any thoughts on long double over our current use of double? It looks >>> like it would be a mess. >>> >>> _______________________________________________ >>> Mailing list: >>> https://launchpad.net/~drizzle-discuss<https://launchpad.net/%7Edrizzle-discuss> >>> Post to : [email protected] >>> Unsubscribe : >>> https://launchpad.net/~drizzle-discuss<https://launchpad.net/%7Edrizzle-discuss> >>> More help : https://help.launchpad.net/ListHelp >>> >> >> > > _______________________________________________ > Mailing list: > https://launchpad.net/~drizzle-discuss<https://launchpad.net/%7Edrizzle-discuss> > Post to : [email protected] > Unsubscribe : > https://launchpad.net/~drizzle-discuss<https://launchpad.net/%7Edrizzle-discuss> > More help : https://help.launchpad.net/ListHelp >
_______________________________________________ Mailing list: https://launchpad.net/~drizzle-discuss Post to : [email protected] Unsubscribe : https://launchpad.net/~drizzle-discuss More help : https://help.launchpad.net/ListHelp

