program ARCCOT ; var J : integer ; x, y, z : extended ; BEGIN Writeln('ARCCOT.PAS') ; Writeln(' J x=J/3 arctan(x) arctan(1/x) '+ 'Pi/2-arctan(x) difference') ; for J := -10 to 10 do begin x := J/3 ; Write(J:4, x:9:3, arctan(x):12:6) ; if J<>0 then begin y := arctan(1/x) ; Write(y:14:6) end else Write('---------':14) ; z := 0.5*Pi-arctan(x) ; Write(z:17:6) ; if J<>0 then Write(y-z:12:6) ; Writeln end ; Readln ; END. N.B. z is better than y, because it is continuous across the range. See FPATAN2.PAS for a better ARCTAN. www.merlyn.demon.co.uk