Free Pascal
uses math;
var
x, y : double;
i : integer;
begin
i:=-10;
while i <= 15 do begin
x:=i/10;
y:=(cos(x)-sqrt(sqr(x)+1))/2;
Writeln('f[',x:2:2,']=',y:4:4);
inc(i,2);
end;
end.
Free Pascal
uses math;
var
x, y : double;
i : integer;
begin
i:=-10;
while i <= 15 do begin
x:=i/10;
y:=(cos(x)-sqrt(sqr(x)+1))/2;
Writeln('f[',x:2:2,']=',y:4:4);
inc(i,2);
end;
end.