From fb7178e7cc219062efe7d5da5df4f85b01b0f8ac Mon Sep 17 00:00:00 2001 From: Caleb Spare Date: Fri, 23 Oct 2015 14:49:56 -0700 Subject: [PATCH] runtime: copy sqrt normalization bugfix from math This copies the change from CL 16158 (applied as 22d4c8bf13d5edf4670dbdaf0854d653d9c2b81a). Updates #13013 Change-Id: Id7d02e63d92806f06a4e064a91b2fb6574fe385f Reviewed-on: https://go-review.googlesource.com/16291 Reviewed-by: Minux Ma Run-TryBot: Minux Ma TryBot-Result: Gobot Gobot --- src/runtime/sqrt.go | 2 +- src/runtime/sqrt_test.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/runtime/sqrt.go b/src/runtime/sqrt.go index 7452a61f3c..1b130e3b01 100644 --- a/src/runtime/sqrt.go +++ b/src/runtime/sqrt.go @@ -117,7 +117,7 @@ func sqrt(ix uint64) uint64 { // normalize x exp := int((ix >> float64Shift) & float64Mask) if exp == 0 { // subnormal x - for ix&1<