December 2017
Intermediate to advanced
386 pages
10h 42m
English
Mathematically, adding .005 should be enough so that the floor division in the next step correctly rounds to the nearest whole percentage. The trouble appears because of the inexactness of floating-point numbers:
.045 + .005 0.049999999999999996
There is an extra .00001 added to each number to ensure that the floating-point representation the same first four digits as the actual value. This works because the maximum precision of all the points in the dataset ...
Read now
Unlock full access