|
|
|
|
|
by joshAg
5050 days ago
|
|
even just addition and multiplication with floats make simple equivalence a horrible idea, due to uncertainty. For example: float a = 1.0;
float b = 1000.0;
for (int i = 0; i < 1000000; ++i)
a+=1.0;
b *= b;
There is no guarantee that a == b. Floats make everything more complicated, even simple addition: http://en.wikipedia.org/wiki/Kahan_summation_algorithm |
|