format output of timing demo
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
diff --git a/demo/timing.c b/demo/timing.c
index d22e471..1b72a00 100644
--- a/demo/timing.c
+++ b/demo/timing.c
@@ -137,7 +137,7 @@ int main(void)
} while (++rr < 100000u);
printf("Adding\t\t%4d-bit => %9" PRIu64 "/sec, %9" PRIu64 " cycles\n",
mp_count_bits(&a), CLK_PER_SEC / tt, tt);
- FPRINTF(log, "%d %9" PRIu64 "\n", cnt * DIGIT_BIT, tt);
+ FPRINTF(log, "%6d %9" PRIu64 "\n", cnt * DIGIT_BIT, tt);
FFLUSH(log);
}
FCLOSE(log);
@@ -159,7 +159,7 @@ int main(void)
printf("Subtracting\t\t%4d-bit => %9" PRIu64 "/sec, %9" PRIu64 " cycles\n",
mp_count_bits(&a), CLK_PER_SEC / tt, tt);
- FPRINTF(log, "%d %9" PRIu64 "\n", cnt * DIGIT_BIT, tt);
+ FPRINTF(log, "%6d %9" PRIu64 "\n", cnt * DIGIT_BIT, tt);
FFLUSH(log);
}
FCLOSE(log);
@@ -194,7 +194,7 @@ int main(void)
} while (++rr < 100u);
printf("Multiplying\t%4d-bit => %9" PRIu64 "/sec, %9" PRIu64 " cycles\n",
mp_count_bits(&a), CLK_PER_SEC / tt, tt);
- FPRINTF(log, "%d %9" PRIu64 "\n", mp_count_bits(&a), tt);
+ FPRINTF(log, "%6d %9" PRIu64 "\n", mp_count_bits(&a), tt);
FFLUSH(log);
}
FCLOSE(log);
@@ -214,7 +214,7 @@ int main(void)
} while (++rr < 100u);
printf("Squaring\t%4d-bit => %9" PRIu64 "/sec, %9" PRIu64 " cycles\n",
mp_count_bits(&a), CLK_PER_SEC / tt, tt);
- FPRINTF(log, "%d %9" PRIu64 "\n", mp_count_bits(&a), tt);
+ FPRINTF(log, "%6d %9" PRIu64 "\n", mp_count_bits(&a), tt);
FFLUSH(log);
}
FCLOSE(log);
@@ -291,7 +291,7 @@ int main(void)
printf("Exponentiating\t%4d-bit => %9" PRIu64 "/sec, %9" PRIu64 " cycles\n",
mp_count_bits(&a), CLK_PER_SEC / tt, tt);
FPRINTF((n < 4) ? logd : (n < 9) ? logc : (n < 16) ? logb : log,
- "%d %9" PRIu64 "\n", mp_count_bits(&a), tt);
+ "%6d %9" PRIu64 "\n", mp_count_bits(&a), tt);
}
}
FCLOSE(log);
@@ -326,7 +326,7 @@ int main(void)
}
printf("Inverting mod\t%4d-bit => %9" PRIu64 "/sec, %9" PRIu64 " cycles\n",
mp_count_bits(&a), CLK_PER_SEC / tt, tt);
- FPRINTF(log, "%d %9" PRIu64 "\n", cnt * DIGIT_BIT, tt);
+ FPRINTF(log, "%6d %9" PRIu64 "\n", cnt * DIGIT_BIT, tt);
}
FCLOSE(log);