gobase-conversion

Golang number base conversion


I was wondering, how do you convert a base10 number from one base to another without usage of strconv in Golang ?

Could you please give me some advice ?


Solution

  • Use the math package and a log identify:

    log_77(x) = log(x) / log(77)