1
0
mirror of https://github.com/golang/go synced 2024-11-21 22:54:40 -07:00

math: special cases for Pow10; delete BUG

R=rsc, golang-dev
CC=golang-dev
https://golang.org/cl/5477046
This commit is contained in:
Charles L. Dorian 2011-12-08 22:06:33 -05:00 committed by Russ Cox
parent a933635579
commit 2065b0a094
2 changed files with 4 additions and 2 deletions

View 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.

View 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