#include "simplex.h" #define sqr(x) ((x) * (x)) sum_residual(x) double *x; { register int i; x[N-1] = 0.0; for (i=0 ; i 0 */ for (i=0 ; i< M ; i++) { if (x[i] < 0.0) x[N-1]= 9.999e99; } }