<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
/* List Definitions */
@list l0
        {mso-list-id:1326930576;
        mso-list-type:hybrid;
        mso-list-template-ids:-542969514 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Hi Jesse,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>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.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Re: I would think that a 32-bit integer
and a 64-bit floating point would be enough.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>The two options I would consider are:<o:p></o:p></span></font></p>
<ol style='margin-top:0in' start=1 type=1>
<li class=MsoNormal style='color:navy;mso-list:l0 level1 lfo1'><font size=2
color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial'>Make
the 128 bit decimal type an optional feature.<o:p></o:p></span></font></li>
<li class=MsoNormal style='color:navy;mso-list:l0 level1 lfo1'><font size=2
color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial'>Redefine
decimal as the most accurate decimal type available on the platform.<o:p></o:p></span></font></li>
</ol>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I am leaning strongly towards one because
I don’t like the notion of something having significantly different meaning
on different platforms. Any objections?<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Dan<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> Jesse Weaver
[mailto:pianohacker@gmail.com] <br>
<b><span style='font-weight:bold'>Sent:</span></b> Sunday, November 12, 2006
12:35 PM<br>
<b><span style='font-weight:bold'>To:</span></b> <st1:PersonName w:st="on">sdl-developers@ikayzo.org</st1:PersonName><br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: FW: Couple of things</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<div>
<blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;
margin-left:4.8pt;margin-right:0in'>
<div link=blue vlink=blue>
<div>
<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>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<o:p></o:p></span></font></p>
<div>
<div>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'> </span></font><o:p></o:p></p>
</div>
<div>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;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<o:p></o:p></p>
</div>
<div>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>> </span></font>know of, short of bundling the GNU MP
library.<o:p></o:p></p>
</div>
<div>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'> </span></font><o:p></o:p></p>
</div>
<div>
<p style='margin-bottom:12.0pt'><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;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">http://msdn2.microsoft.com/en-US/library/364x0z75.aspx</a></span></font>
<br>
<br>
<o:p></o:p></p>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><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 <o:p></o:p></span></font></p>
</div>
</div>
</body>
</html>