All of the published solution I've checked (about 3 or 4) are wrong, they don't work for either extreme of the range 0 to 1000. Why is that ?