public function computeWithoutBcMath(DecimalNumber $a, DecimalNumber $b, $precision = self::DEFAULT_PRECISION)
    {
        $bString = (string) $b;
        if ('0' === $bString) {
            throw new DivisionByZeroException();
        }

        $aString = (string) $a;

        // 0 as dividend always yields 0
        if ('0' === $aString) {
            return $a;
        }

        // 1 as divisor always yields the dividend
        if ('1' === $bString) {
            return $a;
        }

        // -1 as divisor always yields the the inverted dividend
        if ('-1' === $bString) {
            return $a->invert();
        }

        // if dividend and divisor are equal, the result is always 1
        if ($a->equals($b)) {
            return new DecimalNumber('1');
        }

        $aPrecision = $a->getPrecision();
        $bPrecision = $b->getPrecision();

        $maxPrecision = max($aPrecision, $bPrecision);

        if ($maxPrecision > 0) {
            // make $a and $b integers by multiplying both by 10^(maximum number of decimals)
            $a = $a->toMagnitude($maxPrecision);
            $b = $b->toMagnitude($maxPrecision);
        }

        $result = $this->integerDivision($a, $b, max($precision, $aPrecision));

        return $result;
    }