#include <stdio.h>

static const char* format = "%7.0e";

int main() {
  double a[] = {1, -0.60937, 0.60937, 0.009371, -0.009371,
		-1, -1.2e8, 1e-4, 1e-5, -1.5e-321, 0/.0, 1/0.};
  for (unsigned i = 0; i < sizeof(a) / sizeof(*a); ++i) {
    printf(format, a[i]);
    puts("");
    if (snprintf(0,0, format, a[i]) != 7)
      return 1;
  }
}
