summaryrefslogtreecommitdiff
path: root/libgo/go/math/remainder.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2019-09-06 18:12:46 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2019-09-06 18:12:46 +0000
commitaa8901e9bb0399d2c16f988ba2fe46eb0c0c5d13 (patch)
tree7e63b06d1eec92beec6997c9d3ab47a5d6a835be /libgo/go/math/remainder.go
parent920ea3b8ba3164b61ac9490dfdfceb6936eda6dd (diff)
downloadgcc-aa8901e9bb0399d2c16f988ba2fe46eb0c0c5d13.tar.gz
libgo: update to Go 1.13beta1 release
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/193497 From-SVN: r275473
Diffstat (limited to 'libgo/go/math/remainder.go')
-rw-r--r--libgo/go/math/remainder.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/libgo/go/math/remainder.go b/libgo/go/math/remainder.go
index c6a4c7d741d..0e2903e109b 100644
--- a/libgo/go/math/remainder.go
+++ b/libgo/go/math/remainder.go
@@ -59,6 +59,10 @@ func remainder(x, y float64) float64 {
y = -y
}
if x == y {
+ if sign {
+ zero := 0.0
+ return -zero
+ }
return 0
}
if y <= HalfMax {