/* This program demonstrates that acos(x) is not portable across implementations. */ #include #include #include int main() { double x; int i; srand48(100); for (i = 0; i < 10000 ; i++) { x = 1 - drand48() * 2.0; printf("%.15lf\n", acos(x)); } return 0; }