Fixes #6899
R=golang-dev, r, cshapiro, iant, rsc
CC=golang-dev
https://golang.org/cl/
38120043
n = 7; // digits printed
e = 0; // exp
s = 0; // sign
- if(v != 0) {
+ if(v == 0) {
+ if(1/v == runtime·neginf)
+ s = 1;
+ } else {
// sign
if(v < 0) {
v = -v;
--- /dev/null
+// cmpout
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import "math"
+
+func main() {
+ println(math.Copysign(0, -1))
+}
--- /dev/null
+-0.000000e+000