bin/eval.c File Reference

Compute averages and stdev over results.Assuming the number of trials is always greater than two, this program takes in the timing results of a number of 't' trials, throws away the best and the worst performing and computes the average (and stdev) of the remaining t-2 trials. More...

#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <math.h>

Functions

int main (int argc, char **argv)
 Launcher for code.

Variables

static char buf [1024]
 scratch input, long enough for a single line
static char * expanded = "%.6f %.6f\n"
 prepared format of output.


Detailed Description

Compute averages and stdev over results.Assuming the number of trials is always greater than two, this program takes in the timing results of a number of 't' trials, throws away the best and the worst performing and computes the average (and stdev) of the remaining t-2 trials.

All input from stdin is of the form:

   numberOfTrials
   trial-1
   trial-2
   ...
   trial-n
   

eval throws away LOW and HIGH as outliers and outputs on a single line:

   average stdev
   

Author:
George Heineman
Date:
6/15/08

Function Documentation

int main ( int  argc,
char **  argv 
)

Launcher for code.

All input comes from stdin.


Variable Documentation

char buf[1024] [static]

scratch input, long enough for a single line

char* expanded = "%.6f %.6f\n" [static]

prepared format of output.

Algorithm Development Kit 1.0