Test rounding correctness:
999.75 == 1111 1001 1111b
round even should give 1000.0
round odd should give 999.5
round up should give 1000.0
round down should give 999.5
Verified these as operating correctly.
Redoing this test
So, one of the following is true:
1) Round-nearest, not round-zero
2) (recast * n)/N, not recast * (n/N) [and round-zero]
Given that, can we determine if one or the other of those is the actual case?
Determination:
1) Round-zero + (recast * n)/N
2a) Round-nearest + (recast * n)/N [round 0.5 even]
3a) Round-nearest + recast * (n/N) [round 0.5 even]
2b) Round-nearest + (recast * n)/N [round 0.5 odd]
3b) Round-nearest + recast * (n/N) [round 0.5 odd]
2c) Round-nearest + (recast * n)/N [round 0.5 up]
3c) Round-nearest + recast * (n/N) [round 0.5 up]
2d) Round-nearest + (recast * n)/N [round 0.5 down]
3d) Round-nearest + recast * (n/N) [round 0.5 down]
Aero III @1% (Loq):
1: 24
2a: 25
3a: 25
2b: 25
3b: 24
2c: 25
3c: 25
2d: 25
3d: 24
Observed: 24
Valid:
1
3b
3d
Curaga IV @7% (/rdm):
1: 9
2a: 10
3a: 10
2b: 9
3b: 10
2c: 10
3c: 10
2d: 9
3d: 10
Observed: 9
Valid:
1
2b
2d
Aero III @5% (Teal set):
1: 23
2a: 23
3a: 24
2b: 23
3b: 23
2c: 23
3c: 24
2d: 23
3d: 23
Observed: 23
Valid:
1
2a
2b
2c
2d
3b
3d
Firaga II @ 14% (/rdm, Teal set, Loq, Prolix)
1: 19
2a: 20
3a: 19
2b: 19
3b: 19
2c: 20
3c: 19
2d: 19
3d: 19
Observed: 19
Valid:
1
2b
2d
3a
3b
3c
3d
In all cases, round-zero gives a correct result.
In each case, either 2b/2d or 3b/3d was correct. round-even showed fewer correct results, which is a bit disappointing since that's the recommended default method; would have made this easier.
I would go with round-odd (b) or round-down (d) if we could find some way to eliminate the problem with 2 vs 3 (order of operations). Otherwise that appears to be the primary limiting factor preventing round-nearest from being an option.
XI Wiki



