If you mean round-half-to-even, it is orthogonal to effective vs notational rounding.  1.15 in binary floating point number is not on a midpoint of 1.1 and 1.2, so no need of tie-breaking.
If you mean always round to even, the result would be consistent across implementations,  We could list that (though it's different behavior than Scheme's "round"; the difference is apparent when precision is 0).

The description of Common Lisp's ~f is actually read as a tie-breaking rule ("equidistant from the scaled value"), so it doesn't address the different interpretation we're talking.  If we don't want to go into too much details, we could say something like "If the argument is close to the midpoint of round-up value and round-down value the implementation choose either one."

I do think it would be handy if there's a way to guarantee notational rounding; if the implementation happens to provide only effective rounding and the user needs notational rounding, she has to roll her own and it's not trivial to nail all the corner cases.  The reference implementation looks like it's using notational rounding, right? In that case the implementation doesn't need any extra code.

(But then we need to start worry about round-half-to-even vs round-half-to-infinity, too---because if an application does require notational rounding, it's likely that it's also picky about it.  So sure it's a slippery slope.  I raise it since I've been bitten and I've seen others bitten by half-baked notational rounding code.)


On Fri, Oct 27, 2017 at 5:03 AM, Alex Shinn <xxxxxx@gmail.com> wrote:
On Fri, Oct 27, 2017 at 6:43 AM, Shiro Kawai <xxxxxx@gmail.com> wrote:
This is regarding 'precision' state variable and floating point numbers.

When we round, say, a floating point number 1.15 in 100th place (round to nearest 10th), there can be two interpretations.

* Look at the floating point number represented by 1.15 and see if it's closer to 1.1 or 1.2. If we use binary flonums, the flonum represented by 1.15 is smaller than 115/100, so we print 1.1.
  Let's call this effective rounding.
* Take the notation 1.15 itself and apply elementary math.  We print 1.2.
  Let's call this notational rounding.

Thanks for bringing this up.  There's a third option, round-to-even,
which is more consistent with Scheme's `round'.  We may still want
to leave this implementation-defined, but should definitely include
a note.

-- 
Alex