Annotation of coherent/d/usr/src/examples/j0.c, revision 1.1.1.1

1.1       root        1: #include <math.h>
                      2: #include <stdio.h>
                      3: #define display(x) dodisplay((double)(x), #x)
                      4: 
                      5: dodisplay(value, name)
                      6: double value; char *name;
                      7: {
                      8:        if (errno)
                      9:                perror(name);
                     10:        else
                     11:                printf("%10g %s\n", value, name);
                     12:        errno = 0;
                     13: }
                     14: 
                     15: main() {
                     16:        extern char *gets();
                     17:        double x;
                     18:        char string[64];
                     19: 
                     20:        for (;;) {
                     21:                printf("Enter number: ");
                     22:                if (gets(string) == NULL)
                     23:                        break;
                     24:                x = atof(string);
                     25: 
                     26:                display(x);
                     27:                display(j0(x));
                     28:                display(j1(x));
                     29:                display(jn(0,x));
                     30:                display(jn(1,x));
                     31:                display(jn(2,x));
                     32:                display(jn(3,x));
                     33:        }
                     34:        putchar('\n');
                     35: }
                     36: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.