]> Cypherpunks repositories - gostls13.git/commit
math: fix Pow10 loop
authorVolker Dobler <dr.volker.dobler@gmail.com>
Wed, 24 Aug 2011 17:59:52 +0000 (13:59 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 24 Aug 2011 17:59:52 +0000 (13:59 -0400)
commitf78e7d36a6808b1f45b05186f2d82805bdf72e77
treec1e917a0c73aaa2c6d278b6970f675f2dc825a33
parent80f79ad3056d244983ad42bdfeff6a24b2c30b5c
math: fix Pow10 loop

Pow10 failed for MinInt32 (endless loop until out of
memory).  Fix by returning 0 and +Inf for all arguments
where the result is not representable in a float64.
Fixes #2159.

R=rsc
CC=golang-dev
https://golang.org/cl/4930041
src/pkg/math/all_test.go
src/pkg/math/pow10.go