|
#define register
#define ITERATIONS 1000
#define PNT5MINUS 0.499975
#define PNT5PLUS 0.50025
#define TWO 2.0
#include int main(void) /* Establish execution frequencies */ mod1freq = 0 * ITERATIONS; /* MODULE 1: simple identifiers */ real1 = 1.0; /* MODULE 2: array elements */ ary[0] = 1.0; /* MODULE 3: array as parameter (see program at end) */ for (cntr = 1; cntr <= mod3freq; cntr++) /* MODULE 4: conditional jumps */ int1 = 1; if (int1 > 2) if (int1 < 1 ) /* MODULE 6: integer arithmetic using arrays*/ int1 = 1; ary[int3 - 1] = int1 + int2 + int3; /* MODULE 7: trigonometric. functions */ real1 = 0.5; /* MODULE 8: procedure calls */ real1 = real2 = real3 = 1.0; /* MODULE9: array references */ int1 = 1; for(cntr = 1; cntr <= mod9freq; cntr++) /* MODULE10: integer arithmetic */ int1 = 2; /* MODULE11: standard functions */ real1 = 0.75; /* end of main program */ /* Module 3 routine */ void mod3 (float a[4]) /* Module 8 routine */ void mod8(float r1, float r2, float *r3) tmp1 = r1;
E-mail:
info@telesys.ru
void mod8(float r1, float r2, float *r3);
void mod3 (float a[4]);
{
static int mod1freq, mod2freq, mod3freq, mod4freq, mod6freq;
static int mod7freq, mod8freq, mod9freq, mod10freq, mod11freq;
static float ary[4];
static float real1, real2, real3, real4;
register int cntr;
register int int1, int2, int3;
mod2freq = 12 * ITERATIONS;
mod3freq = 14 * ITERATIONS;
mod4freq = 345 * ITERATIONS;
mod6freq = 210 * ITERATIONS;
mod7freq = 32 * ITERATIONS;
mod8freq = 899 * ITERATIONS;
mod9freq = 616 * ITERATIONS;
mod10freq = 0 * ITERATIONS;
mod11freq = 93 * ITERATIONS;
real2 = -1.0;
real3 = -1.0;
real4 = -1.0;
for(cntr = 1; cntr <= mod1freq; cntr++)
{
real1 = ( real1 + real2 + real3 - real4 ) * PNT5MINUS;
real2 = ( real1 + real2 - real3 - real4 ) * PNT5MINUS;
real3 = ( real1 - real2 + real3 + real4 ) * PNT5MINUS;
real4 = ( real2 - real1 + real3 + real4 ) * PNT5MINUS;
} /* for */
ary[1] = -1.0;
ary[2] = -1.0;
ary[3] = -1.0;
for (cntr = 1; cntr <= mod2freq; cntr++)
{
ary[0] = ( ary[0] + ary[1] + ary[2] - ary[3] ) * PNT5MINUS;
ary[1] = ( ary[0] + ary[1] - ary[2] + ary[3] ) * PNT5MINUS;
ary[2] = ( ary[0] - ary[1] + ary[2] + ary[3] ) * PNT5MINUS;
ary[3] = ( ary[1] - ary[0] + ary[2] + ary[3] ) * PNT5MINUS;
} /* for */
mod3(ary);
for (cntr = 1; cntr <= mod4freq; cntr++)
{
if (int1 == 1)
int1 = 2;
else
int1 = 3;
int1 = 0;
else
int1 = 1;
int1 = 1;
else
int1 = 0;
} /* for */
int2 = 2;
int3 = 3;
for (cntr = 1; cntr <= mod6freq; cntr++)
{
int1 = int1 * (int2 - int1) * (int3 -int2);
int2 = int3 * int2 - (int3 - int1) * int2;
int3 = (int3 - int2) * (int2 + int1);
ary[int2 - 1] = int1 * int2 * int3;
}
real2 = 0.5;
for(cntr = 1; cntr <= mod7freq; cntr +=1)
{
real1 = atan(TWO * sin(real1) * cos(real1) / (cos(real1 + real2) +
cos(real1 - real2) - 1.0)) * PNT5MINUS;
real2 = atan(TWO * sin(real2) * cos(real2) / (cos(real1 + real2) +
cos(real1 - real2) - 1.0)) * PNT5MINUS;
} /* for */
for (cntr = 1; cntr <= mod8freq; cntr +=1)
mod8(real1, real2, &real3);
int2 = 2;
int3 = 3;
ary[1] = 1.0;
ary[2] = 2.0;
ary[3] = 3.0;
{
ary[int1] = ary[int2];
ary[int2] = ary[int3];
ary[int3] = ary[int1];
}
int2 = 3;
for(cntr = 1; cntr <= mod10freq; cntr +=1)
{
int1 = int1 + int2;
int2 = int1 + int2;
int1 = int2 - int1;
int2 = int2 - int1 - int1;
}
for(cntr = 1; cntr <= mod11freq; cntr +=1)
real1 = sqrt( exp( log(real1) / PNT5PLUS));
return 0;
}
{
int cntr;
for (cntr = 0; cntr <= 6; cntr +=1)
{
a[0] = (a[0] + a[1] + a[2] - a[3] ) * PNT5MINUS;
a[1] = (a[0] + a[1] - a[2] + a[3] ) * PNT5MINUS;
a[2] = (a[0] - a[1] + a[2] + a[3] ) * PNT5MINUS;
a[3] = (-a[0] + a[1] + a[2] + a[3] ) / TWO;
}
}
{
float tmp1, tmp2;
tmp2 = r2;
tmp1 = PNT5MINUS * (tmp1 + tmp2);
tmp2 = PNT5MINUS * (tmp1 + tmp2);
*r3 = (tmp1 + tmp2) / TWO;
}
Ответы