Fixed undefined reference to ceil; used -lm at compilation