Annotation of coherent/d/usr/src/examples/frexp.c, revision 1.1

1.1     ! root        1: #include <stdio.h>
        !             2: 
        !             3: main()
        !             4: {
        !             5:        extern char *gets();
        !             6:        extern double frexp(), atof();
        !             7:        double real, fraction;
        !             8:        int ep;
        !             9: 
        !            10:        char string[64];
        !            11: 
        !            12:        for (;;) {
        !            13:                printf("Enter number: ");
        !            14:                if (gets(string) == NULL)
        !            15:                        break;
        !            16: 
        !            17:                real = atof(string);
        !            18:                fraction = frexp(real, &ep);
        !            19:                printf("%lf is the fraction of %lf\n",
        !            20:                        fraction, real);
        !            21:                printf("%d is the binary exponent of %lf\n",
        !            22:                        ep, real);
        !            23:        }
        !            24:        putchar('\n');
        !            25: }
        !            26: 

unix.superglobalmegacorp.com

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