35 double temp0_2 = temp0*temp0;
37 double temp1_2 = temp1*
temp1;
39 double sqrt_pi_o_2 = 0x1.40d931ff627059657ca41fae722cep0;
40 double sqrt_1_o_2 = 0xb.504f333f9de6484597d89b3754abep-4;
42 val = sqrt_pi_o_2*
x(0)*
x(2)*( erf(sqrt_1_o_2*temp1*temp2) - erf(sqrt_1_o_2*temp0*temp2) );
44 double temp2_2 = temp2*
temp2;
45 double etemp1 = exp(-temp1_2*0.5*temp2_2);
46 double etemp0 = exp(-temp0_2*0.5*temp2_2);
48 double temp4 = 1./
x(0);
49 double temp5 = ( -etemp1*temp1 + etemp0*temp0 );
52 grad(1) =
x(0)*(-etemp1 + etemp0);
53 grad(2) = temp2*( val +
x(0)*temp5 );
56 hessian(0,1) = temp4*grad(1);
57 hessian(0,2) = temp4*grad(2);
58 hessian(1,1) =
x(0)*temp2_2*temp5;
59 hessian(1,2) =
x(0)*temp2*temp2_2*( -etemp1*temp1_2 + etemp0*temp0_2 );
60 hessian(2,2) =
x(0)*temp2_2*temp2_2*( -etemp1*temp1_2*temp1 + -etemp0*temp0_2*temp0 );