data _null_;
x=15.63;
y=15.13;
xx=ceil(x);
yy=ceil(y);
put xx= yy=;
xx=floor(x);
yy=floor(y);
put xx= yy=;
xx=int(x);
yy=int(y);
put xx= yy=;
xx=round(x,0.1);
yy=round(y,0.1);
put xx= yy=;
z=trunc(1/3,3);*按3个字节存储;
put z=;
本博客所有内容是原创,如果转载请注明来源
z=trunc(1/3,6);*按6个字节存储;
put z=;
run;
输出:
xx=16 yy=16
xx=15 yy=15
xx=15 yy=15
xx=15.6 yy=15.1
z=0.3333129883
z=0.3333333333
data _null_;
x=abs(-124);
put x=;
x=exp(12.14);*e^12.14;
put x=;
x=LOG(8);
put x=;
x=log10(158);
put x=;
x=sqrt(9);*取余;
put x=;
x=mod(52,9);*取余;
put x=;
x=sqrt();
run;
输出
x=124
x=187212.57221
x=2.0794415417
x=2.198657087
x=3
x=7
NOTE: “DATA 语句”所用时间(总处理时间):
实际时间 0.01 秒
CPU 时间 0.01 秒