Re: [Mono-dev] GroupBy Bug (Bug 601101)

2010-04-30 Thread Adar Wesley
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

Re: [Mono-dev] Simple floating maths problem

2010-04-30 Thread Andreas Nahr
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

Re: [Mono-dev] Simple floating maths problem

2010-04-30 Thread Andreas Nahr
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)

Re: [Mono-dev] Simple floating maths problem

2010-04-30 Thread Robert Jordan
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

Re: [Mono-dev] Simple floating maths problem

2010-04-30 Thread Rolf Bjarne Kvinge
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)

Re: [Mono-dev] Simple floating maths problem

2010-04-30 Thread Andreas Nahr
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

Re: [Mono-dev] Simple floating maths problem

2010-04-30 Thread Stuart Fraser
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