What's going on here? added by sjamaan on Sun Apr 29 15:48:04 2012

$ cat test.c
#include <stdio.h>
#include <math.h>
int main(void) {

        double m1 = 1.0, m2 = -1.0/0.0;

        printf("directly: pow(%lf, %lf) = %lf\n", (double)1.0, (double)-1.0/0.0, pow(1.0, -1.0/0.0));
        printf("indirectly: pow(%lf, %lf) = %lf\n", m1, m2, pow(m1, m2));

        return 0;
}

$ gcc -lm test.c
$ ./a.out
directly: pow(1.000000, -inf) = 1.000000
indirectly: pow(1.000000, -inf) = nan