<br><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div link="blue" vlink="blue" lang="EN-US"><div><p><font face="Times New Roman" size="3">
<span style="font-size: 12pt;">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...<br>
<br>
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.<br>
<br>
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.<br>
<br>
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.<br>
<br>
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.
<br>
<br>
Do the Java and C# implementations give the same results when operating on 128
bit fp quantities?<br>
<br>
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 :)<br>
<br>
Eric</span></font></p><span class="q">
<div>
<div>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>
</div>
<div>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">> </span></font>Also, there is
currently no portable way to implement the 128 bit decimal type in SDL C++,
that I</p>
</div>
<div>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">> </span></font>know of, short of
bundling the GNU MP library.</p>
</div>
<div>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>
</div>
<div>
<p><font face="Times New Roman" size="3"><span style="font-size: 10pt; font-family: Arial; color: navy;">That's a tough one. Do any other
list members have suggestions? Eric? A description of the C#
decimal type is here: <a href="http://msdn2.microsoft.com/en-US/library/364x0z75.aspx" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://msdn2.microsoft.com/en-US/library/364x0z75.aspx</a></span>
<br><span style="font-size: 12pt;"><br>
<br></span></font></p>
</div></div>
</span>
</div>
</div>
</blockquote></div><br>I tried to compile the SDL C++ port on mono, and it got rather angry:<br>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()'<br>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()'<br>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()'<br>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()'
<br>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()'
<br><br>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.
<br clear="all"><br>-- <br>Jesse<br><br>-----------<br>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