]> Cypherpunks repositories - gostls13.git/commit
math: Add Round function (ties away from zero)
authorMark Pulford <mark@kyne.com.au>
Thu, 18 May 2017 12:15:18 +0000 (22:15 +1000)
committerRobert Griesemer <gri@golang.org>
Sat, 2 Sep 2017 21:00:08 +0000 (21:00 +0000)
commit03c3bb5f843cbda7382b5618de82a74adb779393
treefbbaf318260547a8afe6830f9b4954a562270c51
parentdbe3522c7f45771bbd12228b7f17a3fc5ac9d7c7
math: Add Round function (ties away from zero)

This function avoids subtle faults found in many ad-hoc implementations,
and is simple enough to be inlined by the compiler.

Fixes #20100

Change-Id: Ib320254e9b1f1f798c6ef906b116f63bc29e8d08
Reviewed-on: https://go-review.googlesource.com/43652
Reviewed-by: Robert Griesemer <gri@golang.org>
src/math/all_test.go
src/math/floor.go