ceil 是“天花板"
floor 是 “地板”
一个靠上取值,另一个靠下取值,如同天花板,地板。
double ceil ( double x );
float ceil ( float x );
long double ceil ( long double x );
double floor ( double x );
float floor ( float x );
long double floor ( long double x );
参数是float,输出是float
参数是double,输出是double
参数是长double,输出是长double
printf("%f",ceil(3.865786));
printf("%lf",ceil(3.865786l));
标签:3.865786,floor,double,float,long,ceil,C++ From: https://blog.51cto.com/u_15896805/5897498