/* * powga1 - generate a table of powers 2 ** (1/16) for pow */ /*)BUILD $(LIBS) = {c:cminit} $(POSTFIX) = {run powga1} */ #include static double x[17]; main() { double sqrt(); int i; cmathe(1); x[1] = 1.0 / sqrt(sqrt(sqrt(sqrt(2.0)))); x[2] = x[1] * x[1]; x[3] = x[2] * x[1]; x[4] = x[2] * x[2]; x[5] = x[4] * x[1]; x[6] = x[4] * x[2]; x[7] = x[4] * x[3]; x[8] = x[4] * x[4]; x[9] = x[8] * x[1]; x[10] = x[8] * x[2]; x[11] = x[8] * x[3]; x[12] = x[8] * x[4]; x[13] = x[8] * x[5]; x[14] = x[8] * x[6]; x[15] = x[8] * x[7]; x[16] = x[8] * x[8]; for (i = 0; i < 17; i++) printf("%d %25.17f\n", i, x[i]); }