Java double precision math -
I am modifying a bit for a popular game and I have seen these rows in the area's generation , / P>
double D4 = 1.0D; D4 * = D4; D4 * = D4; D4 = 1.0 D - D4; Double D5 = (noise 1 [L1] + 256D) / 512D; D5 * = D4; I was wondering what was the point of d4 , because on the fourth row it would always be 0, is not it? Yes, it will be guaranteed to be at least 0 in Java.
Floating binary point arithmetic for all errors, 1.0 can actually be presented properly, and the result of multiplying it manually will always return to 1.0.
Are you sure there is no other place to make it slightly 1.0d different from? Or perhaps it was historically a value other than 0.1?
Comments
Post a Comment