3/2 = 1, because it is an integer division, so what it actually does is compute 3 / 2 and then use it as a parameter in your ceil call. Use ceil ((double) 3 / 2);
EDIT: Now I see where your problem probably is :) it is (double) ... not double (...).
Glad you got it working. :) The difference between double (...) and (double) is just the priority of operators. when you have double (3 / 2), it first divides 3 by 2 (which is integer division) and then converts the result 1 to double (which is still 1, well, 1.0 to be precise). When you have (double) 3 / 2, then you tell the compiler to convert 3 to double first and then do 3.0 / 2, which is 1.5. :)
You can see for yourself that for example std::cout << (double (3) / 2) << endl; would result in 1.5, whereas std::cout << (double (3 / 2)) << endl; would result in 1.
I assumed that 3/2 would be automatically converted to the required type. So 3.0/2 would actually be 1.5. I'll watch out for that in the future! Thanks for the help. :)