function powNumber (x, y) {
  // x^Infinity === 0 if -1 < x < 1
  // A real number 0 is returned instead of complex(0)
  if ((x * x < 1 && y === Infinity) ||
    (x * x > 1 && y === -Infinity)) {
    return 0
  }

  return Math.pow(x, y)
}
Calculates the power of x to y, x^y, for two numbers.
@param {number} x
@param {number} y
@return {number} res