Discussion: FW: Couple of things
FW: Couple of things
Jesse WeaverSun Nov 12 07:35:06 HST 2006
- Previous message: FW: Couple of things
- Next message: FW: Couple of things
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ top page ]
> I am not an expert on numerical analysis, and have not worked on SDL. I > wrote some code which used and compared GMP and OpenSSL BigNum libraries, > which is my only hook into this thread... > > 29 decimal digits of precision is equivalent to 96 binary digits of > precision. Therefore it seems reasonable to use GMP (or appropriate > equivalent) with precision set to 0x60. > > However, the exponent in GMP is always a word--32 or 64 bits, where the > "decimal" type is claiming 32 bits (128 - 96). So GMP in this case would > only be equivalent on 32 bit systems. > > GMP does not claim to conform to any specific floating point standard > (much less THE gold standard IEEE754). Nor does GMP even claim that the > same operations will give the same results on architectures with different > native word sizes. > > This might be a minor point if the implementation of SDL allows platforms > to do calculations to the best of their abilities, instead of with exact > equivalency. > > Do the Java and C# implementations give the same results when operating on > 128 bit fp quantities? > > One route could be to restrict SDL to floats and doubles, and make this > 128 bit (C#) fp operation an extension. That way the C++ port gets off the > ground without having to worry about it :) > > Eric > > > > > Also, there is currently no portable way to implement the 128 bit > decimal type in SDL C++, that I > > > know of, short of bundling the GNU MP library. > > > > That's a tough one. Do any other list members have suggestions? Eric? A > description of the C# decimal type is here: > http://msdn2.microsoft.com/en-US/library/364x0z75.aspx > > > I tried to compile the SDL C++ port on mono, and it got rather angry: Ikayzo/SDL/Tag.cs(345,7): warning CS0278: `System.Collections.Generic.IList<Ikayzo.SDL.Tag>' contains ambiguous implementation of `enumerable' pattern. Method `System.Collections.IEnumerable.GetEnumerator()' is ambiguous with method `System.Collections.Generic.IEnumerable<Ikayzo.SDL.Tag>.GetEnumerator()' Ikayzo/SDL/Tag.cs(431,13): warning CS0278: `System.Collections.Generic.IList<Ikayzo.SDL.Tag>' contains ambiguous implementation of `enumerable' pattern. Method `System.Collections.IEnumerable.GetEnumerator()' is ambiguous with method `System.Collections.Generic.IEnumerable<Ikayzo.SDL.Tag>.GetEnumerator()' Ikayzo/SDL/Tag.cs(554,7): warning CS0278: `System.Collections.Generic.IList<Ikayzo.SDL.Tag>' contains ambiguous implementation of `enumerable' pattern. Method `System.Collections.IEnumerable.GetEnumerator()' is ambiguous with method `System.Collections.Generic.IEnumerable<Ikayzo.SDL.Tag>.GetEnumerator()' Ikayzo/SDL/Tag.cs(168,17): warning CS0278: `System.Collections.Generic.IList<object>' contains ambiguous implementation of `enumerable' pattern. Method `System.Collections.IEnumerable.GetEnumerator()' is ambiguous with method `System.Collections.Generic.IEnumerable<object>.GetEnumerator()' Ikayzo/SDL/Tag.cs(195,17): warning CS0278: `System.Collections.Generic.ICollection<string>' contains ambiguous implementation of `enumerable' pattern. Method `System.Collections.IEnumerable.GetEnumerator()' is ambiguous with method `System.Collections.Generic.IEnumerable<string>.GetEnumerator()' Also, the openSSL bignum library doesn't seem to be distributed separately, making that option difficult. Does anyone know if we really need as many number types as we have? I would think that a 32-bit integer and a 64-bit floating point would be enough. -- 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://ml.ikayzo.org/pipermail/sdl-developers/attachments/20061112/9728478e/attachment.htm>
- Previous message: FW: Couple of things
- Next message: FW: Couple of things
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ top page ]










