]> Cypherpunks repositories - gostls13.git/commitdiff
math: special cases for Pow10; delete BUG
authorCharles L. Dorian <cldorian@gmail.com>
Fri, 9 Dec 2011 03:06:33 +0000 (22:06 -0500)
committerRuss Cox <rsc@golang.org>
Fri, 9 Dec 2011 03:06:33 +0000 (22:06 -0500)
R=rsc, golang-dev
CC=golang-dev
https://golang.org/cl/5477046

src/pkg/math/const.go
src/pkg/math/pow10.go

index a108d3e294d9a0a8f54759ca2fad4ffd591a64a1..282561f98bbfb178767577b052b5c24bc06eadde 100644 (file)
@@ -49,5 +49,3 @@ const (
        MaxUint32 = 1<<32 - 1
        MaxUint64 = 1<<64 - 1
 )
-
-// BUG(rsc): The manual should define the special cases for all of these functions.
index 20f91bcb70cf281a13022d5ae3a7e931a23be113..f5ad28bb4b0305bfc58f5961087e58488582d035 100644 (file)
@@ -9,6 +9,10 @@ package math
 var pow10tab [70]float64
 
 // Pow10 returns 10**e, the base-10 exponential of e.
+//
+// Special cases are:
+//     Pow10(e) = +Inf for e > 309
+//     Pow10(e) = 0 for e < -324
 func Pow10(e int) float64 {
        if e <= -325 {
                return 0