Annotation of coherent/d/usr/src/examples/cosh.c, revision 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: {
        !            17:        extern char *gets();
        !            18:        double x;
        !            19:        char string[64];
        !            20: 
        !            21:        for (;;) {
        !            22:                printf("Enter number: ");
        !            23:                if (gets(string) == NULL)
        !            24:                        break;
        !            25:                x = atof(string);
        !            26:                display(x);
        !            27:                display(cosh(x));
        !            28:                display(sinh(x));
        !            29:                display(tanh(x));
        !            30:        }
        !            31:        putchar('\n');
        !            32: }
        !            33: 

unix.superglobalmegacorp.com

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