math/big: printing float is not respecting RoundingMode #18649
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?go version go1.7 darwin/amd64
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH=""
GORACE=""
GOROOT="/usr/local/go1.7"
GOTOOLDIR="/usr/local/go1.7/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
What did you do?
Rounded a big.Float using formatting and using SetPrec to the same precision and using the same RoundingMode.
https://play.golang.org/p/wqWAnOzf45
What did you expect to see?
I expected formatting of numbers should also respect the rounding mode.
Not sure if this was intentional, but putting it out there.
What did you see instead?
It does not.
The text was updated successfully, but these errors were encountered: