You are expecting far too much precision. The single data type can store just seven significant digits (though internally nine are used). The two values you quote, 1371818.28 and 1371818.29, are the same to seven significant digits (1371818), and are only different at the very end of the internally-used range, nine digits.

Please note that you have posted two different versions of the numbers concerned, one with 7 digits before the decimal point (quoted above) and your code with six digits before the point. If your code is correct the same problem is arising - you are using eight significant digits in a type which can only represent seven digits reasonably accurately.

Like all floating-point systems, there are approximations used in representing numbers internally, and as you are using more digits than the type can represent accurately you are getting noticeable rounding errors in the values concerned.

Why would you convert to single first? Why don't you just convert straight to double? Double can represent 15 significant digits, and is subject to far smaller rounding errors than single is.

-Stewart