Discussion: FW: Couple of things
FW: Couple of things
E MMon Nov 13 23:03:24 HST 2006
- Previous message: FW: Couple of things
- Next message: FW: Couple of things
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ top page ]
This is an interesting point. Both Java and C(++) would by definition use libraries for this 128 bit fp data type and operations. Even if C#'s decimal type is supported by the language, it is not supported by any piece of hardware and is therefore implicitly library based. GMP, an example of a world class Big Number library, wouldn't be any less consistent than probably already exists between C# and Java. Especially since BigDecimal is NOT based upon fp operations. It would actually be very interesting (though off topic) to write the native code to integrate GMP into Java, and then test how close a mpf_t with mantissa=96 approximates the behavior of BigDecimal as used in Java SDL. If anyone ever wants to do this, consider me a volunteer for the project :) Eric "J. David Beutel" <jdb at getsu.com> wrote: Is the issue here that the 128-bit decimal number is inconsistent in the C++ library? If so, then another option is to support it but just let it be inconsistent. Or does SDL have a use-case for inter-platform communication? Unless all of the application's math remains inside SDL, such inconsistency seems inevitable with mixed languages and platforms. Is it better to have consistency within a given platform? Cheers, 11011011 "Daniel Leuck" wrote on Monday, November 13, 2006 09:38:27: > > So you vote for #2? Does anyone else have an opinion? > > > > BTW- I included decimal because two of our users in the finance sector > wanted a type accurate enough to handle currency. In Java this means > BigDecimal. In C# "decimal" is used. > > > > ------------------------------------------------------------------------ > > *From:* Jesse Weaver [mailto:pianohacker at gmail.com] > *Sent:* Monday, November 13, 2006 8:52 AM > *To:* sdl-developers at ikayzo.org > *Subject:* Re: FW: Couple of things > > > > > > On 11/13/06, *Daniel Leuck* > > wrote: > > Hi Jesse, > > > > The Mono issue appears to be a bug with the Mono compiler (those two > interface methods are not ambiguous), but I will look into what can be > done. > > Re: I would think that a 32-bit integer and a 64-bit floating > point would be enough. > > > > The two options I would consider are: > > 1. Make the 128 bit decimal type an optional feature. > 2. Redefine decimal as the most accurate decimal type available > on the platform. > > > > I am leaning strongly towards one because I don't like the notion > of something having significantly different meaning on different > platforms. Any objections? > > > > Dan > > > > > Well, there is one problem: right now, Java and C# support the 128-bit > number, and C++ won't. This effectively means that we'll have two > versions of the SDL language. Since the decimal type is probably only > needed for special uses, this should be okay, but it could lead to > problems down the road. > > -- > Jesse > > ----------- > There is a theory which states that if anybody ever discovers exactly > what the Universe is for and why it is here, it will instantly > disappear and be replaced by something even more bizarre and > inexplicable. There is another theory which states that this has > already happened. - Douglas Adams, author of Hitchhiker's Guide to the > Galaxy > "Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety." -- B. Franklin -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://ml.ikayzo.org/pipermail/sdl-developers/attachments/20061114/19041db7/attachment.htm>
- Previous message: FW: Couple of things
- Next message: FW: Couple of things
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ top page ]










