Re: [Mono-dev] Simple floating maths problem

2010-04-30 Thread Andreas Nahr
for integral types. Greetings Andreas -Ursprüngliche Nachricht- Von: mono-devel-list-boun...@lists.ximian.com [mailto:mono-devel-list-boun...@lists.ximian.com] Im Auftrag von Stuart Fraser Gesendet: Freitag, 30. April 2010 00:22 An: mono-devel-list@lists.ximian.com Betreff: [Mono-dev] Simple

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
. Rolf -Mensaje original- De: mono-devel-list-boun...@lists.ximian.com [mailto:mono-devel-list- boun...@lists.ximian.com] En nombre de Stuart Fraser Enviado el: viernes, 30 de abril de 2010 0:22 Para: mono-devel-list@lists.ximian.com Asunto: [Mono-dev] Simple floating maths problem

Re: [Mono-dev] Simple floating maths problem

2010-04-30 Thread Andreas Nahr
-devel-list-boun...@lists.ximian.com] Im Auftrag von Rolf Bjarne Kvinge Gesendet: Freitag, 30. April 2010 15:22 An: 'Stuart Fraser'; mono-devel-list@lists.ximian.com Betreff: Re: [Mono-dev] Simple floating maths problem Hi, Running this modified simple on x86 .NET: int fact

Re: [Mono-dev] Simple floating maths problem

2010-04-30 Thread Stuart Fraser
: 30 April 2010 21:16 To: 'Rolf Bjarne Kvinge'; Stuart Fraser; mono-devel-list@lists.ximian.com Subject: AW: [Mono-dev] Simple floating maths problem Sorry, somehow I got this wrong. So in fact I also get the 47931 = 47932 = 47932 for x86 .Net 3.5 (and Mono) and 47932 = 47932 = 47932

[Mono-dev] Simple floating maths problem

2010-04-29 Thread Stuart Fraser
HI All, I'm currently working on some code for HPC benchmarking using a number of languages and runtimes but am primarily focussing on C#. During my coding I have come across some inconsistencies between results between calculated in Mono vs .Net (and C /Java), there may be a number of reasons