search for: oldnb

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

Did you mean: oldcb
2004 Apr 15
0
phyper accuracy and efficiency (PR#6772)
...NB + n; #endif i = floorgnum (i + 1e-7); NR = floorgnum (NR + 0.5); NB = floorgnum (NB + 0.5); n = floorgnum (n + 0.5); if (NR < 0 || NB < 0 || !finitegnum (NR + NB) || n < 0 || n > NR + NB) ML_ERR_return_NAN; if (i * (NR + NB) > n * NR) { /* Swap tails. */ gnm_float oldNB = NB; NB = NR; NR = oldNB; i = n - i - 1; lower_tail = !lower_tail; } if (i < 0) return R_DT_0; d = dhyper (i, NR, NB, n, log_p); pd = pdhyper (i, NR, NB, n, log_p); return log_p ? R_DT_log (d + pd) : R_D_Lval (d * pd); }