static int idiv_round(int a, int b) { ret (a+b/2)/b; } static int idiv_round(double a, double b) { ret iround(a/b); }