c real function ceil(x) parameter (onemeps=1-1e-5) c real*4 onemeps,x if(x.ge.0) then ceil=int(x+onemeps) else ceil=int(x) endif return end