.


           


begin

Extent_real := exp(x*ln(a))

end;

{----------------------------------------------------------------------------------------}

Function G(x, eps : real) : real;

var

n : longint;

g1, gg : real;

begin

n := 1; gg := Extent_real((n + 1)/n, x)/(x*(x + n));

repeat

n := n + 1;

gg := gg*n*Extent_real((n + 1)/n, x)/(x + n);

n := n + 1;

g1 := gg*n*Extent_real((n + 1)/n, x)/(x + n)

until abs(g1 - gg) < eps;

G := gg

end;

{----------------------------------------------------------------------------------------}

begin

write(' '); readln(x);

write(' '); readln(eps);

writeln(' - ', G(x, eps):6:t(eps))

end.

n-





,



:


, , , n.

- , (1; 2).

:

Function

Gamma(x, eps : real) : real;

begin

x := x - 1;

Gamma := x*G(x, eps)

end;

Program

Gamma_function;

uses WinCrt;

var

x, eps, gg : real;

{----------------------------------------------------------------------------------------}

{ - }

Function

t(eps : real) : integer;

var

k : integer;

begin