1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
7 // This table might overflow 127-bit exponent representations.
8 // In that case, truncate it after 1.0e38.
9 var pow10tab
[70]float64
11 // Pow10 returns 10**e, the base-10 exponential of e.
14 // Pow10(e) = +Inf for e > 309
15 // Pow10(e) = 0 for e < -324
16 func Pow10(e
int) float64 {
26 if e
< len(pow10tab
) {
30 return Pow10(m
) * Pow10(e
-m
)
36 for i
:= 2; i
< len(pow10tab
); i
++ {
38 pow10tab
[i
] = pow10tab
[m
] * pow10tab
[i
-m
]