public function exponential(int $attempt) : float
    {
        if (!is_int($attempt)) {
            throw new InvalidArgumentException('Attempt must be an integer');
        }

        if ($attempt < 1) {
            throw new InvalidArgumentException('Attempt must be >= 1');
        }

        if ($this->maxAttempsExceeded($attempt)) {
            throw new BackoffException(
                sprintf(
                    "The number of max attempts (%s) was exceeded",
                    $this->options['maxAttempts']
                )
            );
        }

        $wait = (1 << ($attempt - 1)) * 1000;

        return ($this->options['cap'] < $wait) ? $this->options['cap'] : $wait;
    }