commit | 2043b3b47b3ca76d8ce44f05a77e48d2291b6fc6 | [log] [tgz] |
---|---|---|
author | Keith Randall <khr@golang.org> | Wed Oct 06 14:53:32 2021 -0700 |
committer | Keith Randall <khr@golang.org> | Thu Oct 07 18:34:24 2021 +0000 |
tree | f79c8afe98db2f4ec23f2a332abfdb23b8528b8b | |
parent | 4607ebc7d897c36687ae4ede3cfd4939c6dd0a54 [diff] |
cmd/compile,runtime: implement uint64->float32 correctly on 32-bit archs The old way of implementing it, float32(float64(x)), involves 2 roundings which can cause accuracy errors in some strange cases. Implement a runtime version of [u]int64tofloat32 which only does one rounding. Fixes #48807 Change-Id: Ie580be480bee4f3a479e58ef8dce23032f231704 Reviewed-on: https://go-review.googlesource.com/c/go/+/354429 Trust: Keith Randall <khr@golang.org> Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://golang.org/dl/.
After downloading a binary release, visit https://golang.org/doc/install for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://golang.org/doc/install/source for source installation instructions.
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines at https://golang.org/doc/contribute.
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://golang.org/wiki/Questions for a list of places to ask questions about the Go language.