diff options
Diffstat (limited to 'libgo/go/math/pow10.go')
-rw-r--r-- | libgo/go/math/pow10.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libgo/go/math/pow10.go b/libgo/go/math/pow10.go index bda2e82..20f91bc 100644 --- a/libgo/go/math/pow10.go +++ b/libgo/go/math/pow10.go @@ -10,6 +10,12 @@ var pow10tab [70]float64 // Pow10 returns 10**e, the base-10 exponential of e. func Pow10(e int) float64 { + if e <= -325 { + return 0 + } else if e > 309 { + return Inf(1) + } + if e < 0 { return 1 / Pow10(-e) } |