Re: [Mono-list] Why is 0.1f + 0.2f - 0.3f produces such a large error number?

2016-05-15 Thread Alan
At that level the rounding errors are down to how the compiler optimises the calculations, whether the calculations are performed as actual 32bit operations, or if they inflate to 64bit and then are rounded back to 32bit results, the order of the operations and the actual CPU instructions used to

[Mono-list] Why is 0.1f + 0.2f - 0.3f produces such a large error number?

2016-05-15 Thread MarLOne
Hi, I am using MonoDevelop 5.10 and the runtime Mono 4.2.3 (Stable 4.2.3.4/832de4b Wed Mar 16 13:19:08 UTC 20 in a Mint17 (64bit) environment. I am compiling the following code into .Net 4/4.5 and hence I believe I am using dmcs version 4.2.3.0 A friend posts me the following piece of code: