▲ | jandrese 3 days ago | |||||||||||||||||||||||||
> A nice thing about IEEE floats is that the rounding behavior is well defined. Until it isn't. I used to play the CodeWeavers port of Kohan and while the game would allow you to do crossplay between Windows and Linux, differences in how the two OSes rounded floats would cause the game to desynchronize after 15-20 minutes of play or so. Some unit's pathfinding algorithm would zig on Windows and zag on Linux, causing the state to diverge and end up kicking off one of the players. | ||||||||||||||||||||||||||
▲ | bee_rider 3 days ago | parent | next [-] | |||||||||||||||||||||||||
Is it possible that your different operating systems just had different mxcsr values? Or, since it was a port, maybe they were compiled with different optimizations. There are a lot of things happening under the hood but most of them should be deterministic. | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
▲ | jcranmer 2 days ago | parent | prev [-] | |||||||||||||||||||||||||
The differences are almost certainly not in how the two OSes rounded floats--the IEEE rounding modes are standard, and almost no one actually bothers to even change the rounding mode from the default. For cross-OS issues, the most likely culprit is that Windows and Linux are using different libm implementations, which means that the results of functions like sin or atan2 are going to be slightly different. | ||||||||||||||||||||||||||
|