On Thu, Mar 12, 2015 at 5:43 PM, Matt Turner <mattst88@xxxxxxxxx> wrote: > Per IEEE-754 rounding rules. > > The round(3) page describes the behavior of rint and nearbyint in the > halfway cases by saying: > > These functions round x to the nearest integer, but round halfway > cases away from zero [...], instead of to the nearest even integer > like rint(3) > > Signed-off-by: Matt Turner <mattst88@xxxxxxxxx> > --- Sorry, this is not precise -- these functions round halfway cases to nearest even when the rounding mode is set to round-to-nearest. I'll send a revised patch. And for what it's worth, as far as I can tell this rounding behavior (halfway cases round to nearest even) is defined by IEEE-754 and not the C language spec. I don't know if that's worth mentioning. -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html