I am confused with the conversion limitations between the three: ints, floats and double.
The question is whether the following operations give the same result or not (yield true or not).
For instance we have an integer x:
Would (Float)(x) == (float)(double)(x)
I believe that should be true, as the int would get converted into double perfectly. And similar rounding would take place in conversion between int-->float and double--->float. Yea, correct reasoning?
But what about between: (d is short for double)
1)(dx - dy) = double(x - y)
2)(dx * dy) * dz = dx * (dy * dz)
I know 2) is not true, as floating point numbers are not associative. But I can't think of an example where equation 2) shoudl return false and prove my answer.
Any help would be appreciated!