| 28 | namespace stats { |
| 29 | |
| 30 | inline double d_exp_0(double x, int give_log) { |
| 31 | |
| 32 | #ifdef IEEE_754 |
| 33 | /* NaNs propagated correctly */ |
| 34 | if (ISNAN(x)) return x + 1.0; |
| 35 | #endif |
| 36 | |
| 37 | if (x < 0.) |
| 38 | return R_D__0; |
| 39 | return give_log ? (-x) : ::exp(-x); |
| 40 | } |
| 41 | |
| 42 | inline double q_exp_0(double p, int lower_tail, int log_p) { |
| 43 | #ifdef IEEE_754 |