diff options
author | Keith Randall <khr@golang.org> | 2020-02-28 15:42:03 -0800 |
---|---|---|
committer | Keith Randall <khr@golang.org> | 2020-03-02 17:17:18 +0000 |
commit | d8bf079751cbdbebe8425be7c93b963dc0f31360 (patch) | |
tree | 4c7c99b6b47d00039246d0ac6c1c085a53bf0e78 /src/runtime/softfloat64.go | |
parent | bef0b4ea8fd0dbda6f29412a841c176d2fc2f2eb (diff) | |
download | go-d8bf079751cbdbebe8425be7c93b963dc0f31360.tar.gz go-d8bf079751cbdbebe8425be7c93b963dc0f31360.zip |
runtime: use quiet NaNs in softfloat implementation
Update #37455
Change-Id: Ieac0823aa398d73187c009037be15ba34c84f3d9
Reviewed-on: https://go-review.googlesource.com/c/go/+/221433
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/runtime/softfloat64.go')
-rw-r--r-- | src/runtime/softfloat64.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/softfloat64.go b/src/runtime/softfloat64.go index 8fde0feddc..13bee6c1d7 100644 --- a/src/runtime/softfloat64.go +++ b/src/runtime/softfloat64.go @@ -13,7 +13,7 @@ const ( expbits64 uint = 11 bias64 = -1<<(expbits64-1) + 1 - nan64 uint64 = (1<<expbits64-1)<<mantbits64 + 1 + nan64 uint64 = (1<<expbits64-1)<<mantbits64 + 1<<(mantbits64-1) // quiet NaN, 0 payload inf64 uint64 = (1<<expbits64 - 1) << mantbits64 neg64 uint64 = 1 << (expbits64 + mantbits64) @@ -21,7 +21,7 @@ const ( expbits32 uint = 8 bias32 = -1<<(expbits32-1) + 1 - nan32 uint32 = (1<<expbits32-1)<<mantbits32 + 1 + nan32 uint32 = (1<<expbits32-1)<<mantbits32 + 1<<(mantbits32-1) // quiet NaN, 0 payload inf32 uint32 = (1<<expbits32 - 1) << mantbits32 neg32 uint32 = 1 << (expbits32 + mantbits32) ) |