public function computeWithoutBcMath(DecimalNumber $a, DecimalNumber $b)
    {
        if ($a->isNegative()) {
            if ($b->isNegative()) {
                // if both minuend and subtrahend are negative
                // perform the subtraction with inverted coefficients position and sign
                // f(x, y) = |y| - |x|
                // eg. f(-1, -2) = |-2| - |-1| = 2 - 1 = 1
                // e.g. f(-2, -1) =  |-1| - |-2| = 1 - 2 = -1
                return $this->computeWithoutBcMath($b->toPositive(), $a->toPositive());
            } else {
                // if the minuend is negative and the subtrahend is positive,
                // we can just add them as positive numbers and then invert the sign
                // f(x, y) = -(|x| + y)
                // eg. f(1, 2) = -(|-1| + 2) = -3
                // eg. f(-2, 1) = -(|-2| + 1) = -3
                return $a
                    ->toPositive()
                    ->plus($b)
                    ->toNegative();
            }
        } else if ($b->isNegative()) {
            // if the minuend is positive subtrahend is negative, perform an addition
            // f(x, y) = x + |y|
            // eg. f(2, -1) = 2 + |-1| = 2 + 1 = 3
            return $a->plus($b->toPositive());
        }

        // optimization: 0 - x = -x
        if ('0' === (string) $a) {
            return (!$b->isNegative()) ? $b->toNegative() : $b;
        }

        // optimization: x - 0 = x
        if ('0' === (string) $b) {
            return $a;
        }

        // pad coefficients with leading/trailing zeroes
        list($coeff1, $coeff2) = $this->normalizeCoefficients($a, $b);

        // compute the coefficient subtraction
        if ($a->isGreaterThan($b)) {
            $sub = $this->subtractStrings($coeff1, $coeff2);
            $sign = '';
        } else {
            $sub = $this->subtractStrings($coeff2, $coeff1);
            $sign = '-';
        }

        // keep the bigger exponent
        $exponent = max($a->getExponent(), $b->getExponent());

        return new DecimalNumber($sign . $sub, $exponent);
    }