private function getDecimal(array $number)
    {
        if ($this->isStandardBase($this->source->getDigitList())) {
            return gmp_init(implode('', $this->source->canonizeDigits($number)), $this->source->getRadix());
        }

        $number = $this->source->getValues($number);
        $decimal = gmp_init('0');
        $count = count($number);
        $radix = gmp_init($this->source->getRadix());

        for ($i = 0; $i < $count; $i++) {
            $decimal = gmp_add($decimal, gmp_mul(gmp_init($number[$i]), gmp_pow($radix, $count - $i - 1)));
        }

        return $decimal;
    }