subtraction32 method

dynamic subtraction32(
  1. int n1,
  2. int n2
)

Implementation

subtraction32(int n1,
    int n2) // emulates lowerflow of a c 32-bits unsiged integer variable, instead of the operator -. these both arguments must be non-negative integers expressible using unsigned 32 bits.
{
  return n1 < n2
      ? unsigned32((0x100000000 - (n2 - n1)) & 0xffffffff)
      : n1 - n2;
}