@Libman Whether it's important to you totally depends on what you are working 
on. I want to work on a (soft) real-time client/server (or more precisely 
client/distributed-server) simulation (aka "game"). And I only want to send the 
"commands" over the network, rather than every change that happens on the 
server (partly, because I want to use voxels, rather then the usual "static 
game map", and sending the voxels changes over the wire would be very 
expensive). So, given the same starting data, and a theoretically unlimited 
list of "commands", the state of the client must be the same as the state of 
the server after executing all those commands. I'll just call that 
_reproducibility_, although I think there's a better word that I can't remember 
right now. I haven't tried it yet, but I read a lot about it, and it's a lot 
harder then one would think.

When it comes to floating point, I must say that I normally program in Java (at 
work), and even "Write-Once-Run-Anywhere" Java tells you that floating-point 
operations cannot be expected to give the same results on different computers 
(which is why they have StrictMath too). So I'm really not going to assume that 
it "simply works" in C, which doesn't even try to give you such guaranties.

I don't need "arbitrary precision", luckily. I can live with "imprecise" 
results; I just need to get the same (imprecise) result all the time, 
everywhere. Atm, I don't think I'll need to do much non-integer math (with one 
major exception), so fixed-point will do nicely. And I think Nim can probably 
make the fixed-point usage trivial with a few templates/macros.

Apart the fact that I'd like to use a "physics engine" too (I'll never finish, 
if I write my own), I'd say that I'm confident I can get everything else to run 
"reproducibly" everywhere.

Reply via email to