function _hypot (args) {
    // code based on `hypot` from es6-shim:
    // https://github.com/paulmillr/es6-shim/blob/master/es6-shim.js#L1619-L1633
    let result = 0
    let largest = 0

    for (let i = 0; i < args.length; i++) {
      if (isComplex(args[i])) {
        throw new TypeError('Unexpected type of argument to hypot')
      }
      const value = abs(args[i])
      if (smaller(largest, value)) {
        result = multiplyScalar(result,
          multiplyScalar(divideScalar(largest, value), divideScalar(largest, value)))
        result = addScalar(result, 1)
        largest = value
      } else {
        result = addScalar(result, isPositive(value)
          ? multiplyScalar(divideScalar(value, largest), divideScalar(value, largest))
          : value)
      }
    }

    return multiplyScalar(largest, sqrt(result))
  }
Calculate the hypotenuse for an Array with values
@param {Array.<number | BigNumber>} args
@return {number | BigNumber} Returns the result
@private