function IRND(real) c returns the nearest integer to the given real number c num=int(real) rem=real-float(num) if (real.lt.0.0) go to 10 if (rem.ge.0.5) num=num+1 go to 20 10 if (rem.le.-0.5) num=num-1 20 irnd=num end