     //
     // Divide bb by this value
     //
-    _ = integerMultiplyByPowerOf10(&result, bb.pointee, maxpow10 - diffexp)
+    _ = integerMultiplyByPowerOf10(&result, bb.pointee, Int(maxpow10 - diffexp))
 
     bb.pointee.copyMantissa(from: result)
-    bb.pointee._exponent -= maxpow10 - diffexp;
+    bb.pointee._exponent -= Int32(maxpow10 - diffexp);
 
     //
     // If bb > 0 multiply aa by the same value

                if numeral == -1 {
                    break
                }
                exponent = 10 * exponent + numeral
                guard exponent <= 2*Int32(Int8.max) else {
                    return Decimal.nan
                }

     * accurate result later. I chose 19 arbitrarily
     * as half of the magic 38, so that normalization
     * doesn't always occur. */
    if (19 <= Int(a._exponent - b._exponent)) {
        _ = NSDecimalNormalize(&a, &b, roundingMode);
        /* We ignore the small loss of precision this may
         * induce in the individual operands. */
