The R Project SVN R

Rev

Rev 77685 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 77685 Rev 80841
Line 1... Line 1...
1
/*
1
/*
2
 *  R : A Computer Language for Statistical Data Analysis
2
 *  R : A Computer Language for Statistical Data Analysis
3
 *  Copyright (C) 2000--2015 The  R Core Team
3
 *  Copyright (C) 2000--2021 The  R Core Team
4
 *
4
 *
5
 *  This program is free software; you can redistribute it and/or modify
5
 *  This program is free software; you can redistribute it and/or modify
6
 *  it under the terms of the GNU General Public License as published by
6
 *  it under the terms of the GNU General Public License as published by
7
 *  the Free Software Foundation; either version 2 of the License, or
7
 *  the Free Software Foundation; either version 2 of the License, or
8
 *  (at your option) any later version.
8
 *  (at your option) any later version.
Line 112... Line 112...
112
 
112
 
113
 
113
 
114
 
114
 
115
/* additions for density functions (C.Loader) */
115
/* additions for density functions (C.Loader) */
116
#define R_D_fexp(f,x)     (give_log ? -0.5*log(f)+(x) : exp(x)/sqrt(f))
116
#define R_D_fexp(f,x)     (give_log ? -0.5*log(f)+(x) : exp(x)/sqrt(f))
-
 
117
// version working with rf := sqrt(f) [avoiding overflow in computation of f in the caller]
-
 
118
#define R_D_rtxp(rf,x)    (give_log ? -log(rf)+(x) : exp(x)/(rf))
117
 
119
 
118
/* [neg]ative or [non int]eger : */
120
/* [neg]ative or [non int]eger : */
119
#define R_D_negInonint(x) (x < 0. || R_nonint(x))
121
#define R_D_negInonint(x) (x < 0. || R_nonint(x))
120
 
122
 
121
// for discrete d<distr>(x, ...) :
123
// for discrete d<distr>(x, ...) :