Check out the MSDN documentation of
System.Collections.Specialized.OrderedDictionary,
you may want to use that.
---
Adar Wesley
On Fri, Apr 30, 2010 at 12:18 AM, Richard Kiene richard.ki...@logos.comwrote:
I have filed Bug 601101 https://bugzilla.novell.com/show_bug.cgi?id=601101 for
this
Just some guess:
When looking at the numbers it seems more likely that the issue is not
precision of the arithmetics, but rounding of the results for casting to
integer (for float it should round to nearest number (See C# spec. p139)).
Maybe mono just cuts for the conversion as it is done for
I just tried your sample and if you are looking for a quick workaround (for
yourself, not mono) remove the explicit int cast:
int fact = 5;
float[] tList = { 0.95864f, 0.89374f, 0.89092f, 0.89716f,
0.4191f, 0.79782f };
foreach (float val in tList)
On 30.04.2010 00:21, Stuart Fraser wrote:
Mono results:
0.95864 * 5 = 47931
0.89374 * 5 = 44686
0.89092 * 5 = 44545
0.89716 * 5 = 44857
0.4191 * 5 = 20954
0.79782 * 5 = 39890
.Net results :
0.95864 * 5 = 47932
0.89374 * 5 = 44687
0.89092 * 5 = 44546
Hi,
Running this modified simple on x86 .NET:
int fact = 5;
float [] tList = { 0.95864f, 0.89374f, 0.89092f,
0.89716f, 0.4191f, 0.79782f };
foreach (float val in tList) {
int comp = (int)
I've been running your modified sample under x86 .Net 3.5 and my result is:
0,95864 * 5 = 47932 = 47932 = 47932
0,89374 * 5 = 44687 = 44687 = 44687
0,89092 * 5 = 44546 = 44546 = 44546
0,89716 * 5 = 44858 = 44858 = 44858
0,4191 * 5 = 20955 = 20955 = 20955
0,79782 * 5 = 39891
Indeed, agreed on the floating point results but it would be nice to have some
consistency and preferably accuracy.
Currently I'm writing my dissertation for an MSc in HPC and trying to justify
the use of Mono C# for use in Scientific and HPC codes, the performance is
good across the three