~~I found it to be game.print causing the desync as opposed to the actual arithmetic. Floats seem to behave nicely, if you force crc after the calculation you dont get a desync. However if you print the variable it outputs different values for windows and linux.~~
Windows will output is 0

Linux will output is 5.6843418860808e-14 (exactly

**2^-44**)

Some caculations:

floor (log2(472.5)) = 8

==> exponent is 8

==> mantissa bits values are shifted by 8

smallest number that can be added to 2^8 is 2^(-52 + 8) =

**2^-44** = 5.6843419e-14

This number is

*exactly * of the number linux outputs, meaning the linux output is the expected one, while windows for some reason rounds 472.5 +

**2^-44** down to 472.5.

Meaning the linux output is the correct one as float_sub(

**2^-44** + 472.5, 472.5) ==

**2^-44** (No rounding errors)

Code: Select all

```
/c
local root2 = math.sqrt(2)
local x = -209.5 /root2
local y = 735.5/ root2
local angle = math.rad(45)
local qx = math.cos(angle)
local qy = math.sin(angle)
local rot_x = - qy * y + qx * x
res = rot_x + 472.5
game.force_crc()
--NO DESYNC UNTIL HERE
game.print(res)
```

**EDIT: I have updated my faulty math, i hope there are no errors now. It was late last night. **
EDIT2: Fixed: Smallest bit is 2^-52 not 2^-53