2 * Pareto distribution table generator
3 * Taken from the uncopyrighted NISTnet code.
10 #include <linux/types.h>
11 #include <linux/pkt_sched.h>
13 static const double a=3.0;
14 #define TABLESIZE 16384
15 #define TABLEFACTOR NETEM_DIST_SCALE
18 main(int argc, char **argv)
23 printf("# This is the distribution table for the pareto distribution.\n");
25 for (i = 65536, n = 0; i > 0; i -= 16) {
26 dvalue = (double)i/(double)65536;
27 dvalue = 1.0/pow(dvalue, 1.0/a);
29 dvalue *= (4.0/3.0)*(double)TABLEFACTOR;
33 printf(" %d", (int)rint(dvalue));