Here you can find the source of divCeil(int a, int b)
public static int divCeil(int a, int b)
//package com.java2s; public class Main { public static int divCeil(int a, int b) { if (b < 0) return divCeil(-a, -b); else if (b > 0) { if (a >= 0) return ((a + b - 1) / b); else// w ww. j a va 2s . c o m return a / b; } else assert (b == 0); return Integer.MIN_VALUE; } }