Standard library / math

math.Pow10()

Ten raised to integer n; sufficiently large exponents overflow or underflow. Expected stdout: '0.01\n'.

Formal Syntax & Structure

go syntaxgo
func Pow10(n int) float64

Parameters & Attributes

NameTypeDescription
nintInteger count, exponent or order as specified.

Return Value

float64

Ten raised to integer n; sufficiently large exponents overflow or underflow.

Working Example

Example Snippetgo
package main
import (  "fmt"  "math")
func main() {  fmt.Println(math.Pow10(-2))}
Go Reference