log10 function

num log10(
  1. num x
)

Implementation

num log10(num x) {
  if (x == 0) return 0;
  return (math.log(x) / math.log(10)).floor();
}