After giving you time to ponder my last post and, not receiving a reply.
A rhetorical question first: "have you figured it out, by now?"
(obvious answer, seems to be: NO)
And, as proof of concept, my figures from a -5.0 to +5.0 range, with Doubles,
of course and, the value the result referres to (no useless frills attached):
Code: Select all
-5 4999118
-4.9 4999118
-4.800000000000001 4999118
-4.700000000000001 4999118
-4.600000000000001 4999118
-4.500000000000002 4999118
-4.400000000000002 10002651
-4.300000000000003 10002651
-4.200000000000003 10002651
-4.100000000000003 10002651
-4.000000000000004 10002651
-3.900000000000004 10002651
-3.800000000000003 10002651
-3.700000000000003 10002651
-3.600000000000003 10002651
-3.500000000000003 10002651
-3.400000000000003 9999430
-3.300000000000003 9999430
-3.200000000000003 9999430
-3.100000000000003 9999430
-3.000000000000003 9999430
-2.900000000000003 9999430
-2.800000000000003 9999430
-2.700000000000002 9999430
-2.600000000000002 9999430
-2.500000000000002 9999430
-2.400000000000002 9997659
-2.300000000000002 9997659
-2.200000000000002 9997659
-2.100000000000002 9997659
-2.000000000000002 9997659
-1.900000000000002 9997659
-1.800000000000002 9997659
-1.700000000000002 9997659
-1.600000000000001 9997659
-1.500000000000001 9997659
-1.400000000000001 10000457
-1.300000000000001 10000457
-1.200000000000001 10000457
-1.100000000000001 10000457
-1.000000000000001 10000457
-0.9000000000000009 10000457
-0.8000000000000009 10000457
-0.700000000000001 10000457
-0.600000000000001 10000457
-0.500000000000001 10000457
-0.400000000000001 10005042
-0.300000000000001 10005042
-0.200000000000001 10005042
-0.100000000000001 10005042
-1.02695629777827e-015 10005042
0.09999999999999898 10005042
0.199999999999999 10005042
0.299999999999999 10005042
0.399999999999999 10005042
0.499999999999999 10005042
0.599999999999999 10000432
0.699999999999999 10000432
0.7999999999999989 10000432
0.8999999999999989 10000432
0.9999999999999989 10000432
1.099999999999999 10000432
1.199999999999999 10000432
1.299999999999999 10000432
1.399999999999999 10000432
1.499999999999999 10000432
1.599999999999999 10004424
1.7 10004424
1.8 10004424
1.9 10004424
2 10004424
2.1 10004424
2.2 10004424
2.3 10004424
2.4 10004424
2.5 10004424
2.6 9997372
2.7 9997372
2.8 9997372
2.9 9997372
3 9997372
3.100000000000001 9997372
3.200000000000001 9997372
3.300000000000001 9997372
3.400000000000001 9997372
3.500000000000001 9994098
3.600000000000001 9994098
3.700000000000001 9994098
3.800000000000001 9994098
3.900000000000001 9994098
4.000000000000001 9994098
4.100000000000001 9994098
4.2 9994098
4.3 9994098
4.4 9994098
4.499999999999999 9994098
4.599999999999999 4999317
4.699999999999998 4999317
4.799999999999998 4999317
4.899999999999998 4999317
4.999999999999997 4999317
to high: 0 to low: 0 count: 100000000
out of range: 0
press a key to EXIT ...
It also proofes, the Banker's rounding problem, affecting the distribution.
Cheers.