function logNumber (x, y) {
  if (y) { return Math.log(x) / Math.log(y) }
  return Math.log(x)
}
Calculate the logarithm of a value, optionally to a given base.
@param {number} x
@param {number | null | undefined} base
@return {number}