Int too large issue when x-divisor getting too small