Newsgroups: comp.unix.ultrix Path: utzoo!utgpu!watserv1!idallen@watcgl.waterloo.edu From: idallen@watcgl.uwaterloo.ca (Ian! D. Allen [CGL]) Subject: Ultrix 3.1 VAX C Compiler blows up doing real math Message-ID: <9009120241.AA27417@watcgl.waterloo.edu> Sender: root@watserv1.waterloo.edu (Operator) Organization: University of Waterloo Date: Tue, 11 Sep 90 22:41:04 EDT Lines: 33 The following C++ function was generated by the local "Maple" symbolic computation language. See how the C Compiler gives up? Here we are in the 1990's and people still don't know how to write programs without artificial limits in them. Script started on Tue Sep 11 15:23:22 1990 % make CC +w -D__ATT2__ -I/usr/watcgl/projects/Splines/Code/CGL/include -I/p/Splines/Code/CGL/include/FuncBasis -L/usr/watcgl/projects/Splines/Code/CGL/lib -g -c Func3.cc CC +w Func3.cc: cc -c -L/usr/watcgl/projects/Splines/Code/CGL/lib -g Func3.c "Func3.cc", line 21: compiler error: out of tree space; simplify expression *** Error code 1 Stop. % more Func3.cc #include #include double f_3_1_0_0(DoubleVec& d, DGEMatrix *A) { double t1 = pow(d[2],2.0); double t2 = pow(d[0],2.0); double t3 = A[2][2][2]*d[2]; double t6 = A[2][2][1]*d[2]; double t14 = A[2][1][1]*A[2][2][2]*t1; double t18 = pow(d[1],2.0); double t27 = t18*d[1]; double t46 = d[1]*t14; double t74 = 2.0*t1/(4.0*t2*t3+2.0*t2*d[1]*t6+4.0*t2*d[1]*A[2][1][1]+4.0*d[0]*A [1][1][1]*t14+4.0*A[1][1][1]*t18*d[0]*t6+8.0*A[1][1][1]*t18*d[0]*A[2][1][1]+2.0*t27*A[1][2][2]*t6+4.0*t27*A[1][2][2]*A[2][1][1]+8.0*A[1][2][2]*d[2]*A[2][2][2] *t18+t27*d[0]*A[1][2][1]*t6+2.0*t27*d[0]*A[1][2][1]*A[2][1][1]+2.0*d[0]*A[1][2] [1]*t46+4.0*t18*d[0]*A[1][2][1]*t3+12.0*A[1][1][1]*d[1]*d[0]*t3+4.0*A[1][2][2]*t46)*A[2][2][2]*A[2][1][1]*(d[0]*A[1][2][1]*d[1]+2.0*A[1][2][2]*d[1]+2.0*d[0]*A[1][1][1]); return (t74); } % script done on Tue Sep 11 15:24:41 1990