Compute any-Base Logarithm

Examples Filter
package main

import (
	"fmt"
	"math"
)

func LogAny(x, b float64) float64 {
  return math.Log(x) / math.Log(b)
}

func main() {
  fmt.Printf("%.1f", LogAny(27, 3))
}
Last Run  :
3.0