In the code below I am adding together 865398.78 and -865398.78. I expect to get 0, but instead I get -0.03.
The number 865398.78 is represented in single precision in your code. Single precision can handle about 7 significant digits, while your number has 8. You can make it double precision by writing
x=x+865398.78_8