4
1.476
1.478
1.480
0.8856616058
0.8856432994
0.8856284520
0.8856170571
0.8856091082
0.8856045988
0.8856035228
0.8856058736
0.8856116452
0.8856208314
0.8856334260
0.8856494230
0.8856688165
0.8856916004
0.8857177690
В
ДОДАТОК 3
# include
# include
# include
# include
# include
# define CN 8
static double cof [CN] = {
2.5066282746310005,
1.0000000000190015,
76.18009172947146,
-86.50532032941677,
24.01409824083091,
-1.231739572450155,
0.1208650973866179e-2,
-0.5395239384953e-5,
};
double GammLn (double x) {
double lg, lg1;
lg = (x +0.5) * log (x +5.5) - (x +5.5) + lg1;
return lg;
}
double Gamma (double x) {p> return (exp (GammLn (x)));
}
void main ()
{
double x [8], g [8];
int i, j;
clrscr ();
cout <<"vvedite x [1]";
cin>> x [1];
printf (" n t t t_________________________________________");
printf (" n t t t | x | Gamma (x) |");
printf (" n t t t_________________________________________");
for (i = 1; i <= 8; i + +)
{
x [i +1] = x [i] +0.5;
g [i] = Gamma (x [i]);
printf (" n t t t | % F |% f | ", x [i], g [i]);
}
printf (" n t t t_________________________________________");
printf (" n Dlia vuhoda iz programmu najmite lybyiy klavishy ");
getch ();
}
ДОДАТОК 4
# include
# include
# include
# include
Double gam (double x, double eps)
{
Int I, j, n, nb;
Double dze [5] = {1.6449340668422643647,
1.20205690315959428540,
1.08232323371113819152,
1.03692775514336992633,
1.01734306198444913971};
Double a = x, y, fc = 1.0, s, s1, b;
If (x <= 0)
{
Printf ("ви ввели неправильні дані, спробуйте знову n "); return -1.0;
}
If (x
{
A = x +1.0;
Fc = 1.0/x;
}
While (a> = 2)
{
A = a-1.0;
Fc = fc * a;
}
A = a-1.0;
If (a == 0) return fc;
B = a * a;
S = 0;
For (i = 0; i <5; i + +)
{
S = s + b * dze [i]/(i +2.0);
B =-b * a;
}
Nb = exp ((i...