If you need to raise a number to a power in Golang, then you can use the math.Pow
function:
package main
import (
"math"
)
func main() {
var exponent, base float64
output := math.Pow(base, exponent)
}
If you need to raise a number to a power in Golang, then you can use the math.Pow
function:
package main
import (
"math"
)
func main() {
var exponent, base float64
output := math.Pow(base, exponent)
}