Getting the ceil value of a number in SQLite
This will give you the same answer more elegantly:
SELECT CAST(x+1-1e-n AS INT);
(assuming you won't have a precision greater than n decimal points)
How about this?
select (case when x = cast(x as int) then cast(x as int)
else 1 + cast(x as int)
end)