double gintegrand(double b,int x,int y,double *p2,double *nodes, double *phi_nodes,int nb_nodes,double scale) { double xpos,ypos,tmp,tmp2, phi_b,phip_b, u; double g_x,g_y,gprime_x,gprime_y; double integ=0; /* Spline interpolation of the ridge; computation of its derivative ---------------------------------------------------------------*/ splint2(nodes,phi_nodes,p2,nb_nodes,b,&phi_b,&phip_b); /* Evaluation of the integrand --------------------------*/ xpos = (x-b); g_x = gfunc(xpos,scale); gprime_x = gprime(xpos,scale); ypos = (y-b); g_y = gfunc(ypos,scale); gprime_y = gprime(ypos,scale); u = phi_b*(x-y); /* First part */ tmp= (phip_b*phip_b*xpos*ypos - phi_b*phip_b*(xpos+ypos)); tmp *= g_x*g_y; integ = tmp; tmp=gprime_x*gprime_y; integ += tmp; integ *= cos(u); /* Second part */ tmp2 = phip_b*xpos -phi_b; tmp2 *= (gprime_y*g_x); tmp = phip_b*ypos -phi_b; tmp *= (gprime_x*g_y); tmp2 -= tmp; tmp2 *= sin(u); integ += tmp2; return integ; }
static double g0(unsigned n, const double *x, double *grad, void *d_) { dual_data *d = (dual_data *) d_; d->count++; return gfunc(n, d->fval, d->dfdx, d->rho, d->sigma, d->x, d->pre, d->pre_data, d->scratch, x, grad); }
/*ARGSUSED1*/ static void key(unsigned char key, int x, int y) { switch(key) { case 'h': help(); break; case 'g': gfunc(); break; case 't': tfunc(); break; case 'z': zfunc(); break; case 'x': xfunc(); break; case 'p': pfunc(); break; case '\033': exit(EXIT_SUCCESS); break; default: break; } glutPostRedisplay(); }
static void gi(unsigned m, double *result, unsigned n, const double *x, double *grad, void *d_) { dual_data *d = (dual_data *) d_; unsigned i; for (i = 0; i < m; ++i) result[i] = gfunc(n, d->fcval[i], d->dfcdx + i*n, d->rhoc[i], d->sigma, d->x, d->prec ? d->prec[i] : NULL, d->prec_data ? d->prec_data[i] : NULL, d->scratch, x, grad); }
int branches (int y) { int z; for (z = y; z < y + 10; z++) { if (z & 0x1) { gfunc (z); } else { xfunc (z); } } }
int main(void){ int a; int* b; void* v; int c; int d; int e; int h; int i; int j; float f; float z; float x; float y; float* g; int zzz[20]; a=a/c*d/e*h/i/j; f=z*x**&y/f*f; a=*(b+a); a=zzz[23]; a=*(zzz+23); a=!a; if (!(a+b)) a=a; a=ffunc(a,b,f,g,v); a=gfunc(a,b,f,g); a=hfunc(a,b,f); a=ifunc(a,b); b=intstarfunc(a); g=floatstarfunc(f); v=voidstarfunc(v); return 1; /* g=g/g/g/g/g;*/ /* a=a+c; f=f+f; b=b+a; b=a+b; g=g+a; g=a+g; a=a-c; f=f-f; b=b-a; g=g-a; a=g-g; a=b-b;*/ }