commit | 7eebd495df915ab87926b8dd88f554674cfdacea | [log] [tgz] |
---|---|---|
author | Ian Lance Taylor <iant@golang.org> | Sun Feb 04 21:26:51 2018 -0800 |
committer | Ian Lance Taylor <iant@golang.org> | Mon Feb 05 15:28:14 2018 +0000 |
tree | f754476b85bea731927a340a97fefdab5e54d45f | |
parent | 36594b69b94326014c331fe50a5a345ef4f8de16 [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: Iaf8221d40b8afb4318848990800d2ca2e43f0f8b Reviewed-on: https://go-review.googlesource.com/91915 Reviewed-by: Than McIntosh <thanm@google.com>