24 #ifndef Rcpp__stats__exp_h
25 #define Rcpp__stats__exp_h
34 if (ISNAN(x))
return x + 1.0;
42 inline double q_exp_0(
double p,
int lower_tail,
int log_p) {
44 if (ISNAN(p))
return p + 1.0;
47 if ((log_p && p > 0) || (!log_p && (p < 0 || p > 1)))
return R_NaN;
54 inline double p_exp_0(
double x,
int lower_tail,
int log_p) {
56 if (ISNAN(x))
return x + 1.0;
80 template <
bool NA,
typename T>
85 template <
bool NA,
typename T>
90 template <
bool NA,
typename T>
#define RCPP_DPQ_0(__NAME__, __D__, __P__, __Q__)
void exp(InputIterator begin, InputIterator end, OutputIterator out)
void log(InputIterator begin, InputIterator end, OutputIterator out)
double d_exp_0(double x, int give_log)
double p_exp_0(double x, int lower_tail, int log_p)
double q_exp_0(double p, int lower_tail, int log_p)
stats::D1< REALSXP, NA, T > dexp(const Rcpp::VectorBase< REALSXP, NA, T > &x, double shape, bool log=false)
stats::Q1< REALSXP, NA, T > qexp(const Rcpp::VectorBase< REALSXP, NA, T > &x, double shape, bool lower=true, bool log=false)
stats::P1< REALSXP, NA, T > pexp(const Rcpp::VectorBase< REALSXP, NA, T > &x, double shape, bool lower=true, bool log=false)