]> Cypherpunks repositories - gostls13.git/commit
math: fix Ldexp when result is below ldexp(2, -1075)
authorWèi Cōngruì <crvv.mail@gmail.com>
Thu, 11 Jan 2018 05:11:12 +0000 (13:11 +0800)
committerRobert Griesemer <gri@golang.org>
Thu, 29 Mar 2018 23:14:13 +0000 (23:14 +0000)
commit4b265fb74736ffaba2ad5cc96f43e442ae0d9850
treeee1fce462b2b29701791ca76dd19a3d271df7bab
parent9967582f770f62f72a349ec276e00dba8639aa26
math: fix Ldexp when result is below ldexp(2, -1075)

Before this change, the smallest result Ldexp can handle was
ldexp(2, -1075), which is SmallestNonzeroFloat64.
There are some numbers below it should also be rounded to
SmallestNonzeroFloat64. The change fixes this.

Fixes #23407

Change-Id: I76f4cb005a6e9ccdd95b5e5c734079fd5d29e4aa
Reviewed-on: https://go-review.googlesource.com/87338
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/math/all_test.go
src/math/ldexp.go