Quote:
|
Originally Posted by Matt Leese
I don't think this is a casting error. Assuming there's some optimization in the compiler, the compiler will do the math before hand (because it can) and save the cycles on the processor. However, the compiler is incorrectly calculating the output. I don't have the compiled version handy to check the assembly but I may check that tomorrow afternoon.
Matt
|
I wouldn't call it an error on your part, but rather an eccentricity of the compiler. I too have noticed any number of weird losses of precision or other unexpected results. I sure can't read assembly, but I'll be interested to hear what you turn up tomorrow.