search for: leftval

Displaying 1 result from an estimated 1 matches for "leftval".

Did you mean: defval
2003 Dec 14
1
compile error with C code and standalone R math C library
...2*theta*u - theta; return y; } /* generate acceptance probabilities for candidates*/ /* NB: This assumes: (a) That all the initial values of the starting state are set to -1 (b) That theta > 1. */ double accept_prob(double *node, double theta, int current_pos) { double a, p, y, num, denom, leftval, rtval; a = node[current_pos + 1]; y = node[current_pos] + node[current_pos+2]; num = accept_prob_fn(a, y); leftval = accept_prob_fn(a, -theta + node[current_pos+2]); rtval = accept_prob_fn(a, theta + node[current_pos+2]); denom = fmax2(leftval, rtval); /* function in Rmath which returns...