home *** CD-ROM | disk | FTP | other *** search
- main() /* log.c -- prints (short) table of natural logarithms */
-
- {
- double n, ln;
-
- printf(" n\t\t\t ln(n)\n");
- for (n = 1.0; n < 1.5; n += 0.01) {
- ln = log(n);
- printf("%.2f\t\t\t%.5f\n",n,ln);
- }
- puts("Correct last two lines:");
- puts("1.48\t\t\t0.39204");
- puts("1.49\t\t\t0.39878");
- }