commit | 02f11a2d5cf0db2c2675c13d92bb69529f2175dd | [log] [tgz] |
---|---|---|
author | Ian Lance Taylor <iant@golang.org> | Mon Feb 05 16:59:23 2018 -0800 |
committer | Ian Lance Taylor <iant@golang.org> | Tue Feb 06 15:29:24 2018 +0000 |
tree | 07c5cabfd661889154efe82a91302ffae0a0f740 | |
parent | 1927b40e59e7c2067ecb03384b331d1be3cb5eea [diff] |
compiler: avoid negative zero in float constants Check for negative numbers with very small magnitudes that will round to negative zero, and force them to positive zero instead. This implements the spec clarification in https://golang.org/cl/14727. The test is in https://golang.org/cl/91895. Fixes golang/go#12621 Change-Id: Idb048465d6860d41df11434343b1b545a7db073a Reviewed-on: https://go-review.googlesource.com/92175 Reviewed-by: Than McIntosh <thanm@google.com>