On 8/8/2011 3:02 PM, bearophile wrote:
Eric Poggel (JoeCoder):
determinism can be very important when it comes to
reducing network traffic. If you can achieve it, then you can make sure
all players have the same game state and then only send user input
commands over the network.
It seems a hard thing to obtain, but I agree that it gets useful.
For me having some FP determinism is useful for debugging: to avoid results
from changing randomly if I perform a tiny change in the source code that
triggers a change in what optimizations the compiler does.
But there are several situations (if I am writing a ray tracer?) where FP
determinism is not required in my release build. I was not arguing about
removing FP rules from the D compiler, just that there are situations where
relaxing those FP rules, on request, doesn't seem to harm. I am not expert
about the risks Walter was talking about, so maybe I'm just walking on thin ice
(but no one will get hurt if my little raytrcer produces some errors in its
images).
You don't come often in this newsgroup, thank you for the link :-)
Bye,
bearophile
You'd be surprised how much I lurk here. I agree there are some
interesting areas where fast floating point may indeed be worth it, but
I also don't know enough.
I've also wondered about creating a Fixed!(long, 8) struct that would
let me work with longs and 8 bits of precision after the decimal point
as a way of having equal precision anywhere in a large universe and
achieving determinism at the same time. But I don't know how
performance would compare vs floats or doubles.