G
garazy
Hi Lazyweb,
This is probably something I should have remembered from college.
On 'calc.exe'
( ( 10^15 - 0.1 ) % 2) = 1.9
In C#
double result = 1E+15;
result -= 0.1;
result % 2.0
The result is 1.875
Why does this occur?
Secondly,
Why do numbers bigger than 10^15 when 0.1 is subtracted then modulus 2
always return zero? The same when using IEEERemainder ?
Thanks,
Gary
This is probably something I should have remembered from college.
On 'calc.exe'
( ( 10^15 - 0.1 ) % 2) = 1.9
In C#
double result = 1E+15;
result -= 0.1;
result % 2.0
The result is 1.875
Why does this occur?
Secondly,
Why do numbers bigger than 10^15 when 0.1 is subtracted then modulus 2
always return zero? The same when using IEEERemainder ?
Thanks,
Gary