Rcpp Version 0.12.12
Rmath.h
Go to the documentation of this file.
1 // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
2 //
3 // Rmath.h: Rcpp R/C++ interface class library -- Wrappers for R's Rmath API
4 //
5 // Copyright (C) 2012 Dirk Eddelbuettel and Romain Francois
6 //
7 // This file is part of Rcpp.
8 //
9 // Rcpp is free software: you can redistribute it and/or modify it
10 // under the terms of the GNU General Public License as published by
11 // the Free Software Foundation, either version 2 of the License, or
12 // (at your option) any later version.
13 //
14 // Rcpp is distributed in the hope that it will be useful, but
15 // WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 // GNU General Public License for more details.
18 //
19 // You should have received a copy of the GNU General Public License
20 // along with Rcpp. If not, see <http://www.gnu.org/licenses/>.
21 
22 #ifndef Rcpp_Rmath_h
23 #define Rcpp_Rmath_h
24 
25 namespace R {
26 
27  // see R's Rmath.h as well as Writing R Extension
28 
29  /* Random Number Generators */
30  inline double norm_rand(void) { return ::norm_rand(); }
31  inline double unif_rand(void) { return ::unif_rand(); }
32  inline double exp_rand(void) { return ::exp_rand(); }
33 
34  /* Normal Distribution */
35  inline double dnorm(double x, double mu, double sigma, int lg) { return ::Rf_dnorm4(x, mu, sigma, lg); }
36  inline double pnorm(double x, double mu, double sigma, int lt, int lg) { return ::Rf_pnorm5(x, mu, sigma, lt, lg); }
37  inline double qnorm(double p, double mu, double sigma, int lt, int lg) { return ::Rf_qnorm5(p, mu, sigma, lt, lg); }
38  inline double rnorm(double mu, double sigma) { return ::Rf_rnorm(mu, sigma); }
39  inline void pnorm_both(double x, double *cum, double *ccum, int lt, int lg) { return ::Rf_pnorm_both(x, cum, ccum, lt, lg); }
40 
41  /* Uniform Distribution */
42  inline double dunif(double x, double a, double b, int lg) { return ::Rf_dunif(x, a, b, lg); }
43  inline double punif(double x, double a, double b, int lt, int lg) { return ::Rf_punif(x, a, b, lt, lg); }
44  inline double qunif(double p, double a, double b, int lt, int lg) { return ::Rf_qunif(p, a, b, lt, lg); }
45  inline double runif(double a, double b) { return ::Rf_runif(a, b); }
46 
47  /* Gamma Distribution */
48  inline double dgamma(double x, double shp, double scl, int lg) { return ::Rf_dgamma(x, shp, scl, lg); }
49  inline double pgamma(double x, double alp, double scl, int lt, int lg) { return ::Rf_pgamma(x, alp, scl, lt, lg); }
50  inline double qgamma(double p, double alp, double scl, int lt, int lg) { return ::Rf_qgamma(p, alp, scl, lt, lg); }
51  inline double rgamma(double a, double scl) { return ::Rf_rgamma(a, scl); }
52 
53  inline double log1pmx(double x) { return ::Rf_log1pmx(x); }
54  inline double log1pexp(double x) { return ::log1pexp(x); } // <-- ../nmath/plogis.c
55  inline double lgamma1p(double a) { return ::Rf_lgamma1p(a); }
56  inline double logspace_add(double lx, double ly) { return ::Rf_logspace_add(lx, ly); }
57  inline double logspace_sub(double lx, double ly) { return ::Rf_logspace_sub(lx, ly); }
58 
59  /* Beta Distribution */
60  inline double dbeta(double x, double a, double b, int lg) { return ::Rf_dbeta(x, a, b, lg); }
61  inline double pbeta(double x, double p, double q, int lt, int lg) { return ::Rf_pbeta(x, p, q, lt, lg); }
62  inline double qbeta(double a, double p, double q, int lt, int lg) { return ::Rf_qbeta(a, p, q, lt, lg); }
63  inline double rbeta(double a, double b) { return ::Rf_rbeta(a, b); }
64 
65  /* Lognormal Distribution */
66  inline double dlnorm(double x, double ml, double sl, int lg) { return ::Rf_dlnorm(x, ml, sl, lg); }
67  inline double plnorm(double x, double ml, double sl, int lt, int lg) { return ::Rf_plnorm(x, ml, sl, lt, lg); }
68  inline double qlnorm(double p, double ml, double sl, int lt, int lg) { return ::Rf_qlnorm(p, ml, sl, lt, lg); }
69  inline double rlnorm(double ml, double sl) { return ::Rf_rlnorm(ml, sl); }
70 
71  /* Chi-squared Distribution */
72  inline double dchisq(double x, double df, int lg) { return ::Rf_dchisq(x, df, lg); }
73  inline double pchisq(double x, double df, int lt, int lg) { return ::Rf_pchisq(x, df, lt, lg); }
74  inline double qchisq(double p, double df, int lt, int lg) { return ::Rf_qchisq(p, df, lt, lg); }
75  inline double rchisq(double df) { return ::Rf_rchisq(df); }
76 
77  /* Non-central Chi-squared Distribution */
78  inline double dnchisq(double x, double df, double ncp, int lg) { return ::Rf_dnchisq(x, df, ncp, lg); }
79  inline double pnchisq(double x, double df, double ncp, int lt, int lg) { return ::Rf_pnchisq(x, df, ncp, lt, lg); }
80  inline double qnchisq(double p, double df, double ncp, int lt, int lg) { return ::Rf_qnchisq(p, df, ncp, lt, lg); }
81  inline double rnchisq(double df, double lb) { return ::Rf_rnchisq(df, lb); }
82 
83  /* F Distibution */
84  inline double df(double x, double df1, double df2, int lg) { return ::Rf_df(x, df1, df2, lg); }
85  inline double pf(double x, double df1, double df2, int lt, int lg) { return ::Rf_pf(x, df1, df2, lt, lg); }
86  inline double qf(double p, double df1, double df2, int lt, int lg) { return ::Rf_qf(p, df1, df2, lt, lg); }
87  inline double rf(double df1, double df2) { return ::Rf_rf(df1, df2); }
88 
89  /* Student t Distibution */
90  inline double dt(double x, double n, int lg) { return ::Rf_dt(x, n, lg); }
91  inline double pt(double x, double n, int lt, int lg) { return ::Rf_pt(x, n, lt, lg); }
92  inline double qt(double p, double n, int lt, int lg) { return ::Rf_qt(p, n, lt, lg); }
93  inline double rt(double n) { return ::Rf_rt(n); }
94 
95  /* Binomial Distribution */
96  inline double dbinom(double x, double n, double p, int lg) { return ::Rf_dbinom(x, n, p, lg); }
97  inline double pbinom(double x, double n, double p, int lt, int lg) { return ::Rf_pbinom(x, n, p, lt, lg); }
98  inline double qbinom(double p, double n, double m, int lt, int lg) { return ::Rf_qbinom(p, n, m, lt, lg); }
99  inline double rbinom(double n, double p) { return ::Rf_rbinom(n, p); }
100 
101  /* Multnomial Distribution */
102  inline void rmultinom(int n, double* prob, int k, int* rn) { return ::rmultinom(n, prob, k, rn); }
103 
104  /* Cauchy Distribution */
105  inline double dcauchy(double x, double lc, double sl, int lg) { return ::Rf_dcauchy(x, lc, sl, lg); }
106  inline double pcauchy(double x, double lc, double sl, int lt, int lg) { return ::Rf_pcauchy(x, lc, sl, lt, lg); }
107  inline double qcauchy(double p, double lc, double sl, int lt, int lg) { return ::Rf_qcauchy(p, lc, sl, lt, lg); }
108  inline double rcauchy(double lc, double sl) { return ::Rf_rcauchy(lc, sl); }
109 
110  /* Exponential Distribution */
111  inline double dexp(double x, double sl, int lg) { return ::Rf_dexp(x, sl, lg); }
112  inline double pexp(double x, double sl, int lt, int lg) { return ::Rf_pexp(x, sl, lt, lg); }
113  inline double qexp(double p, double sl, int lt, int lg) { return ::Rf_qexp(p, sl, lt, lg); }
114  inline double rexp(double sl) { return ::Rf_rexp(sl); }
115 
116  /* Geometric Distribution */
117  inline double dgeom(double x, double p, int lg) { return ::Rf_dgeom(x, p, lg); }
118  inline double pgeom(double x, double p, int lt, int lg) { return ::Rf_pgeom(x, p, lt, lg); }
119  inline double qgeom(double p, double pb, int lt, int lg) { return ::Rf_qgeom(p, pb, lt, lg); }
120  inline double rgeom(double p) { return ::Rf_rgeom(p); }
121 
122  /* Hypergeometric Distibution */
123  inline double dhyper(double x, double r, double b, double n, int lg) { return ::Rf_dhyper(x, r, b, n, lg); }
124  inline double phyper(double x, double r, double b, double n, int lt, int lg) { return ::Rf_phyper(x, r, b, n, lt, lg); }
125  inline double qhyper(double p, double r, double b, double n, int lt, int lg) { return ::Rf_qhyper(p, r, b, n, lt, lg); }
126  inline double rhyper(double r, double b, double n) { return ::Rf_rhyper(r, b, n); }
127 
128  /* Negative Binomial Distribution */
129  inline double dnbinom(double x, double sz, double pb, int lg) { return ::Rf_dnbinom(x, sz, pb, lg); }
130  inline double pnbinom(double x, double sz, double pb, int lt, int lg) { return ::Rf_pnbinom(x, sz, pb, lt, lg); }
131  inline double qnbinom(double p, double sz, double pb, int lt, int lg) { return ::Rf_qnbinom(p, sz, pb, lt, lg); }
132  inline double rnbinom(double sz, double pb) { return ::Rf_rnbinom(sz, pb); }
133 
134 #if R_VERSION >= R_Version(3, 1, 2)
135  inline double dnbinom_mu(double x, double sz, double mu, int lg) { return ::Rf_dnbinom_mu(x, sz, mu, lg); }
136  inline double pnbinom_mu(double x, double sz, double mu, int lt, int lg) { return ::Rf_pnbinom_mu(x, sz, mu, lt, lg); }
137  inline double qnbinom_mu(double x, double sz, double mu, int lt, int lg) { return ::Rf_qnbinom_mu(x, sz, mu, lt, lg); }
138  //inline double rnbinom_mu(double sz, double mu) { return ::Rf_rnbinom_mu(sz, mu); }
139 #endif
140 
141  /* Poisson Distribution */
142  inline double dpois(double x, double lb, int lg) { return ::Rf_dpois(x, lb, lg); }
143  inline double ppois(double x, double lb, int lt, int lg) { return ::Rf_ppois(x, lb, lt, lg); }
144  inline double qpois(double p, double lb, int lt, int lg) { return ::Rf_qpois(p, lb, lt, lg); }
145  inline double rpois(double mu) { return ::Rf_rpois(mu); }
146 
147  /* Weibull Distribution */
148  inline double dweibull(double x, double sh, double sl, int lg) { return ::Rf_dweibull(x, sh, sl, lg); }
149  inline double pweibull(double x, double sh, double sl, int lt, int lg) { return ::Rf_pweibull(x, sh, sl, lt, lg); }
150  inline double qweibull(double p, double sh, double sl, int lt, int lg) { return ::Rf_qweibull(p, sh, sl, lt, lg); }
151  inline double rweibull(double sh, double sl) { return ::Rf_rweibull(sh, sl); }
152 
153  /* Logistic Distribution */
154  inline double dlogis(double x, double lc, double sl, int lg) { return ::Rf_dlogis(x, lc, sl, lg); }
155  inline double plogis(double x, double lc, double sl, int lt, int lg) { return ::Rf_plogis(x, lc, sl, lt, lg); }
156  inline double qlogis(double p, double lc, double sl, int lt, int lg) { return ::Rf_qlogis(p, lc, sl, lt, lg); }
157  inline double rlogis(double lc, double sl) { return ::Rf_rlogis(lc, sl); }
158 
159  /* Non-central Beta Distribution */
160  inline double dnbeta(double x, double a, double b, double ncp, int lg) { return ::Rf_dnbeta(x, a, b, ncp, lg); }
161  inline double pnbeta(double x, double a, double b, double ncp, int lt, int lg) { return ::Rf_pnbeta(x, a, b, ncp, lt, lg); }
162  inline double qnbeta(double p, double a, double b, double ncp, int lt, int lg) { return ::Rf_qnbeta(p, a, b, ncp, lt, lg); }
163  inline double rnbeta(double a, double b, double np) { return ::Rf_rnbeta(a, b, np); }
164 
165  /* Non-central F Distribution */
166  inline double dnf(double x, double df1, double df2, double ncp, int lg) { return ::Rf_dnf(x, df1, df2, ncp, lg); }
167  inline double pnf(double x, double df1, double df2, double ncp, int lt, int lg) { return ::Rf_pnf(x, df1, df2, ncp, lt, lg); }
168  inline double qnf(double p, double df1, double df2, double ncp, int lt, int lg) { return ::Rf_qnf(p, df1, df2, ncp, lt, lg); }
169 
170  /* Non-central Student t Distribution */
171  inline double dnt(double x, double df, double ncp, int lg) { return ::Rf_dnt(x, df, ncp, lg); }
172  inline double pnt(double x, double df, double ncp, int lt, int lg) { return ::Rf_pnt(x, df, ncp, lt, lg); }
173  inline double qnt(double p, double df, double ncp, int lt, int lg) { return ::Rf_qnt(p, df, ncp, lt, lg); }
174 
175  /* Studentized Range Distribution */
176  inline double ptukey(double q, double rr, double cc, double df, int lt, int lg) { return ::Rf_ptukey(q, rr, cc, df, lt, lg); }
177  inline double qtukey(double p, double rr, double cc, double df, int lt, int lg) { return ::Rf_qtukey(p, rr, cc, df, lt, lg); }
178 
179  /* Wilcoxon Rank Sum Distribution */
180  inline double dwilcox(double x, double m, double n, int lg) { return ::Rf_dwilcox(x, m, n, lg); }
181  inline double pwilcox(double q, double m, double n, int lt, int lg) { return ::Rf_pwilcox(q, m, n, lt, lg); }
182  inline double qwilcox(double x, double m, double n, int lt, int lg) { return ::Rf_qwilcox(x, m, n, lt, lg); }
183  inline double rwilcox(double m, double n) { return ::Rf_rwilcox(m, n); }
184 
185  /* Wilcoxon Signed Rank Distribution */
186  inline double dsignrank(double x, double n, int lg) { return ::Rf_dsignrank(x, n, lg); }
187  inline double psignrank(double x, double n, int lt, int lg) { return ::Rf_psignrank(x, n, lt, lg); }
188  inline double qsignrank(double x, double n, int lt, int lg) { return ::Rf_qsignrank(x, n, lt, lg); }
189  inline double rsignrank(double n) { return ::Rf_rsignrank(n); }
190 
191  /* Gamma and Related Functions */
192  inline double gammafn(double x) { return ::Rf_gammafn(x); }
193  inline double lgammafn(double x) { return ::Rf_lgammafn(x); }
194  inline double lgammafn_sign(double x, int *sgn) { return ::Rf_lgammafn_sign(x, sgn); }
195  inline void dpsifn(double x, int n, int kode, int m, double *ans, int *nz, int *ierr) { return ::Rf_dpsifn(x, n, kode, m, ans, nz, ierr); }
196  inline double psigamma(double x, double deriv) { return ::Rf_psigamma(x, deriv); }
197  inline double digamma(double x) { return ::Rf_digamma(x); }
198  inline double trigamma(double x) { return ::Rf_trigamma(x); }
199  inline double tetragamma(double x) { return ::Rf_tetragamma(x); }
200  inline double pentagamma(double x) { return ::Rf_pentagamma(x); }
201 
202  inline double beta(double a, double b) { return ::Rf_beta(a, b); }
203  inline double lbeta(double a, double b) { return ::Rf_lbeta(a, b); }
204 
205  inline double choose(double n, double k) { return ::Rf_choose(n, k); }
206  inline double lchoose(double n, double k) { return ::Rf_lchoose(n, k); }
207 
208  /* Bessel Functions */
209  inline double bessel_i(double x, double al, double ex) { return ::Rf_bessel_i(x, al, ex); }
210  inline double bessel_j(double x, double al) { return ::Rf_bessel_j(x, al); }
211  inline double bessel_k(double x, double al, double ex) { return ::Rf_bessel_k(x, al, ex); }
212  inline double bessel_y(double x, double al) { return ::Rf_bessel_y(x, al); }
213  inline double bessel_i_ex(double x, double al, double ex, double *bi) { return ::Rf_bessel_i_ex(x, al, ex, bi); }
214  inline double bessel_j_ex(double x, double al, double *bj) { return ::Rf_bessel_j_ex(x, al, bj); }
215  inline double bessel_k_ex(double x, double al, double ex, double *bk) { return ::Rf_bessel_k_ex(x, al, ex, bk); }
216  inline double bessel_y_ex(double x, double al, double *by) { return ::Rf_bessel_y_ex(x, al, by); }
217 
218  /* General Support Functions */
219 #ifndef HAVE_HYPOT
220  inline double hypot(double a, double b) { return ::Rf_hypot(a, b); }
221 #endif
222  inline double pythag(double a, double b) { return ::Rf_pythag(a, b); }
223 #ifndef HAVE_EXPM1
224  inline double expm1(double x); /* = exp(x)-1 {care for small x} */ { return ::Rf_expm1(x); }
225 #endif
226 #ifndef HAVE_LOG1P
227  inline double log1p(double x); /* = log(1+x) {care for small x} */ { return ::Rf_log1p(x); }
228 #endif
229  inline int imax2(int x, int y) { return ::Rf_imax2(x, y); }
230  inline int imin2(int x, int y) { return ::Rf_imin2(x, y); }
231  inline double fmax2(double x, double y) { return ::Rf_fmax2(x, y); }
232  inline double fmin2(double x, double y) { return ::Rf_fmin2(x, y); }
233  inline double sign(double x) { return ::Rf_sign(x); }
234  inline double fprec(double x, double dg) { return ::Rf_fprec(x, dg); }
235  inline double fround(double x, double dg) { return ::Rf_fround(x, dg); }
236  inline double fsign(double x, double y) { return ::Rf_fsign(x, y); }
237  inline double ftrunc(double x) { return ::Rf_ftrunc(x); }
238 
239 }
240 
241 #endif
double qnorm(double p, double mu, double sigma, int lt, int lg)
Definition: Rmath.h:37
double rbinom(double n, double p)
Definition: Rmath.h:99
double rhyper(double r, double b, double n)
Definition: Rmath.h:126
double qunif(double p, double a, double b, int lt, int lg)
Definition: Rmath.h:44
double digamma(double x)
Definition: Rmath.h:197
double sign(double x)
Definition: Rmath.h:233
double qtukey(double p, double rr, double cc, double df, int lt, int lg)
Definition: Rmath.h:177
double fsign(double x, double y)
Definition: Rmath.h:236
double dwilcox(double x, double m, double n, int lg)
Definition: Rmath.h:180
double pgamma(double x, double alp, double scl, int lt, int lg)
Definition: Rmath.h:49
double pentagamma(double x)
Definition: Rmath.h:200
double dnorm(double x, double mu, double sigma, int lg)
Definition: Rmath.h:35
double qwilcox(double x, double m, double n, int lt, int lg)
Definition: Rmath.h:182
double logspace_sub(double lx, double ly)
Definition: Rmath.h:57
double dbinom(double x, double n, double p, int lg)
Definition: Rmath.h:96
double pythag(double a, double b)
Definition: Rmath.h:222
double qbeta(double a, double p, double q, int lt, int lg)
Definition: Rmath.h:62
double rbeta(double a, double b)
Definition: Rmath.h:63
double pbinom(double x, double n, double p, int lt, int lg)
Definition: Rmath.h:97
double qgamma(double p, double alp, double scl, int lt, int lg)
Definition: Rmath.h:50
double rnchisq(double df, double lb)
Definition: Rmath.h:81
double rlogis(double lc, double sl)
Definition: Rmath.h:157
double rsignrank(double n)
Definition: Rmath.h:189
double lbeta(double a, double b)
Definition: Rmath.h:203
double exp_rand(void)
Definition: Rmath.h:32
double dnbinom_mu(double x, double sz, double mu, int lg)
Definition: Rmath.h:135
double lgammafn_sign(double x, int *sgn)
Definition: Rmath.h:194
double lgamma1p(double a)
Definition: Rmath.h:55
double ptukey(double q, double rr, double cc, double df, int lt, int lg)
Definition: Rmath.h:176
double psigamma(double x, double deriv)
Definition: Rmath.h:196
double qchisq(double p, double df, int lt, int lg)
Definition: Rmath.h:74
double dnf(double x, double df1, double df2, double ncp, int lg)
Definition: Rmath.h:166
void pnorm_both(double x, double *cum, double *ccum, int lt, int lg)
Definition: Rmath.h:39
double fmax2(double x, double y)
Definition: Rmath.h:231
double rgeom(double p)
Definition: Rmath.h:120
double qhyper(double p, double r, double b, double n, int lt, int lg)
Definition: Rmath.h:125
double rexp(double sl)
Definition: Rmath.h:114
double qsignrank(double x, double n, int lt, int lg)
Definition: Rmath.h:188
double qnf(double p, double df1, double df2, double ncp, int lt, int lg)
Definition: Rmath.h:168
double dpois(double x, double lb, int lg)
Definition: Rmath.h:142
double trigamma(double x)
Definition: Rmath.h:198
double log1pmx(double x)
Definition: Rmath.h:53
double pnt(double x, double df, double ncp, int lt, int lg)
Definition: Rmath.h:172
double gammafn(double x)
Definition: Rmath.h:192
double hypot(double a, double b)
Definition: Rmath.h:220
double expm1(double x)
double beta(double a, double b)
Definition: Rmath.h:202
double lchoose(double n, double k)
Definition: Rmath.h:206
double qnt(double p, double df, double ncp, int lt, int lg)
Definition: Rmath.h:173
double dnchisq(double x, double df, double ncp, int lg)
Definition: Rmath.h:78
double pgeom(double x, double p, int lt, int lg)
Definition: Rmath.h:118
double log1pexp(double x)
Definition: Rmath.h:54
double qf(double p, double df1, double df2, int lt, int lg)
Definition: Rmath.h:86
double psignrank(double x, double n, int lt, int lg)
Definition: Rmath.h:187
double fmin2(double x, double y)
Definition: Rmath.h:232
double dweibull(double x, double sh, double sl, int lg)
Definition: Rmath.h:148
double pnbinom(double x, double sz, double pb, int lt, int lg)
Definition: Rmath.h:130
double bessel_j_ex(double x, double al, double *bj)
Definition: Rmath.h:214
double pnbinom_mu(double x, double sz, double mu, int lt, int lg)
Definition: Rmath.h:136
double rcauchy(double lc, double sl)
Definition: Rmath.h:108
double log1p(double x)
double pnf(double x, double df1, double df2, double ncp, int lt, int lg)
Definition: Rmath.h:167
double dhyper(double x, double r, double b, double n, int lg)
Definition: Rmath.h:123
double fprec(double x, double dg)
Definition: Rmath.h:234
double dnbinom(double x, double sz, double pb, int lg)
Definition: Rmath.h:129
double qlnorm(double p, double ml, double sl, int lt, int lg)
Definition: Rmath.h:68
double ftrunc(double x)
Definition: Rmath.h:237
double dgamma(double x, double shp, double scl, int lg)
Definition: Rmath.h:48
double pexp(double x, double sl, int lt, int lg)
Definition: Rmath.h:112
double qlogis(double p, double lc, double sl, int lt, int lg)
Definition: Rmath.h:156
double rf(double df1, double df2)
Definition: Rmath.h:87
double norm_rand(void)
Definition: Rmath.h:30
double pwilcox(double q, double m, double n, int lt, int lg)
Definition: Rmath.h:181
double dcauchy(double x, double lc, double sl, int lg)
Definition: Rmath.h:105
double pcauchy(double x, double lc, double sl, int lt, int lg)
Definition: Rmath.h:106
double qcauchy(double p, double lc, double sl, int lt, int lg)
Definition: Rmath.h:107
double df(double x, double df1, double df2, int lg)
Definition: Rmath.h:84
double runif(double a, double b)
Definition: Rmath.h:45
double choose(double n, double k)
Definition: Rmath.h:205
double rweibull(double sh, double sl)
Definition: Rmath.h:151
double dnt(double x, double df, double ncp, int lg)
Definition: Rmath.h:171
double bessel_k(double x, double al, double ex)
Definition: Rmath.h:211
double pnchisq(double x, double df, double ncp, int lt, int lg)
Definition: Rmath.h:79
double rnbeta(double a, double b, double np)
Definition: Rmath.h:163
void rmultinom(int n, double *prob, int k, int *rn)
Definition: Rmath.h:102
Definition: Rmath.h:25
double dunif(double x, double a, double b, int lg)
Definition: Rmath.h:42
double qbinom(double p, double n, double m, int lt, int lg)
Definition: Rmath.h:98
double ppois(double x, double lb, int lt, int lg)
Definition: Rmath.h:143
double qnbinom_mu(double x, double sz, double mu, int lt, int lg)
Definition: Rmath.h:137
double pf(double x, double df1, double df2, int lt, int lg)
Definition: Rmath.h:85
double qpois(double p, double lb, int lt, int lg)
Definition: Rmath.h:144
void dpsifn(double x, int n, int kode, int m, double *ans, int *nz, int *ierr)
Definition: Rmath.h:195
double rgamma(double a, double scl)
Definition: Rmath.h:51
double pnbeta(double x, double a, double b, double ncp, int lt, int lg)
Definition: Rmath.h:161
double bessel_y_ex(double x, double al, double *by)
Definition: Rmath.h:216
double lgammafn(double x)
Definition: Rmath.h:193
double rnbinom(double sz, double pb)
Definition: Rmath.h:132
double bessel_k_ex(double x, double al, double ex, double *bk)
Definition: Rmath.h:215
double rnorm(double mu, double sigma)
Definition: Rmath.h:38
int imin2(int x, int y)
Definition: Rmath.h:230
double rlnorm(double ml, double sl)
Definition: Rmath.h:69
double qexp(double p, double sl, int lt, int lg)
Definition: Rmath.h:113
double dlnorm(double x, double ml, double sl, int lg)
Definition: Rmath.h:66
double logspace_add(double lx, double ly)
Definition: Rmath.h:56
double dbeta(double x, double a, double b, int lg)
Definition: Rmath.h:60
double pchisq(double x, double df, int lt, int lg)
Definition: Rmath.h:73
double dlogis(double x, double lc, double sl, int lg)
Definition: Rmath.h:154
double qnchisq(double p, double df, double ncp, int lt, int lg)
Definition: Rmath.h:80
double dchisq(double x, double df, int lg)
Definition: Rmath.h:72
double dnbeta(double x, double a, double b, double ncp, int lg)
Definition: Rmath.h:160
double rpois(double mu)
Definition: Rmath.h:145
double plnorm(double x, double ml, double sl, int lt, int lg)
Definition: Rmath.h:67
double punif(double x, double a, double b, int lt, int lg)
Definition: Rmath.h:43
double dt(double x, double n, int lg)
Definition: Rmath.h:90
double unif_rand(void)
Definition: Rmath.h:31
int imax2(int x, int y)
Definition: Rmath.h:229
double qnbeta(double p, double a, double b, double ncp, int lt, int lg)
Definition: Rmath.h:162
double qgeom(double p, double pb, int lt, int lg)
Definition: Rmath.h:119
double qnbinom(double p, double sz, double pb, int lt, int lg)
Definition: Rmath.h:131
double pnorm(double x, double mu, double sigma, int lt, int lg)
Definition: Rmath.h:36
double dgeom(double x, double p, int lg)
Definition: Rmath.h:117
double bessel_y(double x, double al)
Definition: Rmath.h:212
double pt(double x, double n, int lt, int lg)
Definition: Rmath.h:91
double phyper(double x, double r, double b, double n, int lt, int lg)
Definition: Rmath.h:124
double rwilcox(double m, double n)
Definition: Rmath.h:183
double dsignrank(double x, double n, int lg)
Definition: Rmath.h:186
double plogis(double x, double lc, double sl, int lt, int lg)
Definition: Rmath.h:155
double pbeta(double x, double p, double q, int lt, int lg)
Definition: Rmath.h:61
double pweibull(double x, double sh, double sl, int lt, int lg)
Definition: Rmath.h:149
double rt(double n)
Definition: Rmath.h:93
double bessel_i(double x, double al, double ex)
Definition: Rmath.h:209
double bessel_j(double x, double al)
Definition: Rmath.h:210
double dexp(double x, double sl, int lg)
Definition: Rmath.h:111
double bessel_i_ex(double x, double al, double ex, double *bi)
Definition: Rmath.h:213
double fround(double x, double dg)
Definition: Rmath.h:235
double qweibull(double p, double sh, double sl, int lt, int lg)
Definition: Rmath.h:150
double qt(double p, double n, int lt, int lg)
Definition: Rmath.h:92
double rchisq(double df)
Definition: Rmath.h:75
double tetragamma(double x)
Definition: Rmath.h:199