[Rcpp-devel] Unit Test Question Was: pnorm/qnorm?

Dirk Eddelbuettel edd at debian.org
Wed Sep 12 16:59:02 CEST 2012


On 12 September 2012 at 09:28, Rodney Sparapani wrote:
| On 09/12/2012 08:58 AM, Dirk Eddelbuettel wrote:
| 
| >     edd at max:~$ grep -r qnorm /usr/local/lib/R/site-library/Rcpp/include/ | wc -l
| >     10
| >     edd at max:~$
| >
| > There is no magic pixie dust. Some headers are script-generated, even those
| > scripts are in SVN.  Some of the p/q/d/r-sugar functions are from macro
| > expansions as you will see.
| >
| > Dirk
| >
| 
| Dear Dirk:
| 
| You didn't show the 10 lines.  I've looked these over
| many times, but I didn't get it until just now.  If anybody
| else cares, here are the 3 that really matter...
|
| PREFIX/lib64/R/library/Rcpp/include/Rcpp/stats/norm.h
| 106:RCPP_DPQ_0(norm, Rcpp::stats::dnorm_0, Rcpp::stats::pnorm_0, 
| Rcpp::stats::qnorm_0 )
| 107:RCPP_DPQ_1(norm, Rcpp::stats::dnorm_1, Rcpp::stats::pnorm_1, 
| Rcpp::stats::qnorm_1 )
| 108:RCPP_DPQ_2(norm, ::Rf_dnorm4, ::Rf_pnorm5, ::Rf_qnorm5 )
| 
| To see what is going on, take a look at the combination of
| pre-processor macro and C++ template code (AKA magic pixie dust) in
| PREFIX/lib64/R/library/Rcpp/include/Rcpp/stats/dpq/dpq.h

The "pixie dust" referred to your assertions that we "used some secret tools"
or "were hiding something".

Neither one is true.  It's all there.  It's just damn hard to read. But it's
not hidden...
 
| Bravo!

That goes almost entirely to Romain who deserves all the applause.

Dirk

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com  


More information about the Rcpp-devel mailing list