/****************************************************************************** * FILE: arit01.c * DESCRIPTION: * Demonstrates Horner's Rule of Polynomial Evaluation ******************************************************************************/ #include #include #include #define ARRAY_SIZE 10000 #define SEED 1995 float a[ARRAY_SIZE], aa[ARRAY_SIZE]; float b[ARRAY_SIZE], bb[ARRAY_SIZE]; float c[ARRAY_SIZE], cc[ARRAY_SIZE]; float d[ARRAY_SIZE], dd[ARRAY_SIZE]; float e[ARRAY_SIZE], ee[ARRAY_SIZE]; float f[ARRAY_SIZE], ff[ARRAY_SIZE]; float x, xx; struct timeval start_time, end_time; main() { int i; initialize_data(); /*****************************************************************************/ /* Untuned Loop */ /*****************************************************************************/ gettimeofday(&start_time, (struct timeval*)0); for(i=0;i