[Rcpp-commits] r2749 - pkg/Rcpp/inst/include/Rcpp/stats

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Dec 9 10:44:15 CET 2010


Author: romain
Date: 2010-12-09 10:44:15 +0100 (Thu, 09 Dec 2010)
New Revision: 2749

Modified:
   pkg/Rcpp/inst/include/Rcpp/stats/unif.h
Log:
dunif fix (thanks to xian for finding the bug)

Modified: pkg/Rcpp/inst/include/Rcpp/stats/unif.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/stats/unif.h	2010-12-09 04:21:25 UTC (rev 2748)
+++ pkg/Rcpp/inst/include/Rcpp/stats/unif.h	2010-12-09 09:44:15 UTC (rev 2749)
@@ -37,8 +37,7 @@
 	return x + 1.0 ;
 #endif
     
-    if (0.0 <= x && x <= 1.0)
-	return 1.0 ;
+    if (0.0 <= x && x <= 1.0) return give_log ? 0.0 : 1.0 ;
     return R_D__0;
 }
 



More information about the Rcpp-commits mailing list