public function intVal(): int
    {
        if (!isset($this->_intNum)) {
            $num = gmp_init($this->_num, 10);
            if (gmp_cmp($num, $this->_intMaxGmp()) > 0) {
                throw new \RuntimeException("Integer overflow.");
            }
            if (gmp_cmp($num, $this->_intMinGmp()) < 0) {
                throw new \RuntimeException("Integer underflow.");
            }
            $this->_intNum = gmp_intval($num);
        }
        return $this->_intNum;
    }