From: Dirk Eddelbuettel (edd@debian.org)
Date: Tue 15 Jan 2002 - 13:24:46 EST
Message-id: <15427.37614.268774.384478@sonny.eddelbuettel.com>
"Faheem" == Faheem Mitha <faheem@email.unc.edu> writes:
Faheem> OK, but what is the best way of making the warning go away? I
Faheem> would like to keep -pedantic. Shall I comment out the declation of
Dunno. I never use more than -Wall which, from my experience, catches
everything that is reasonable.
Faheem> log1p in Rmath.h Line 520)? Is that harmless? In any case, I think
Faheem> this qualifies as a minor bug.
Disagree. Remember that you are not getting an error, all you are getting is
a warning message. Maybe a nuisance, but not a bug.
Faheem> I want my function (q_gibbs_rand) to return a random number with
Faheem> the appropriate distribution every time I call it, and I don't want
Faheem> the burden of having to set the seed myself.
That's no burden -- an O(1) operation as I'd conjecture. OTOH it gives you
reproducibility, something that scientific inquiry cannot do without.
Faheem> I've decided to use u = runif(0,1); instead, which seems to
Faheem> work. It seems to compile OK, though I haven't tested it. Is this a
Faheem> reasonable alternative? I don't understand why I need to set the
Faheem> seed for unif_rand() and not for runif(), though.
Are you sure that this is the case? As I read the header file,
unif_rand(void) is a parameterless U [ and I don't know what the interval is,
probably on [0,1) ] whereas runif(double, double) correspond to the R
function for U on a given interval.
Dirk
-- Good judgment comes from experience; experience comes from bad judgment. -- F. Brooks -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
This archive was generated by hypermail 2.1.3 : Thu 17 Jan 2002 - 11:10:11 EST