[comp.sys.sgi] Problem with pow function on PI

SOFGBOS@VM.UOGUELPH.CA (Gerrit) (11/30/90)

The following C program produces erroneous results on one of our Irises:

#include <math.h>

main ()
{
double  n = 5.0;

printf("n: %f (n^3: %f; %f)\n", n, pow(n, 3), pow(n, 3));
}

The result looks like this on our six other machines:

n: 5.000000 (n^3: 125.000000; 125.000000)

and on the machine that is exhibiting the problem:

n: 5.000000 (n^3: 125.000000; 189.088738)


Since nothing else seems to be wrong with this machine, what seems to be
the problem. (other than... the results are different :-)  Is it a chip
problem, compiler problem or what?    Thanks in advance.... Gerrit

(GB
                        -------------------------------
Herblock's Law: if it is good, they will stop making it.