Quote:
Originally Posted by sng_jason
-using a square root function as the point of comparison possibly has some extra complications because of implementation. There are several different common ways to implement a square root on intel cpus... full IEEE sqrt microcoded instruction, reciprocal sqrt + division, reciprocal approximate + some cycles of newton-raphson, etc... the implementations for c# and java might be different (I dont know... and might also differ depending on level of optimization).
The implementations very much are different. You can see the OpenJDK implementation (some lovely hand-optimized C code)
here, while C# should eventually compile Math.Sqrt() to an fsqrt assembly instruction, as you can see
here.