[Rcpp-commits] r1877 - pkg/Rcpp/inst/include/Rcpp/sugar/functions

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jul 28 23:29:51 CEST 2010


Author: romain
Date: 2010-07-28 23:29:51 +0200 (Wed, 28 Jul 2010)
New Revision: 1877

Modified:
   pkg/Rcpp/inst/include/Rcpp/sugar/functions/exp.h
   pkg/Rcpp/inst/include/Rcpp/sugar/functions/functions.h
Log:
solaris/suncc iteration 1

Modified: pkg/Rcpp/inst/include/Rcpp/sugar/functions/exp.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/sugar/functions/exp.h	2010-07-28 15:27:30 UTC (rev 1876)
+++ pkg/Rcpp/inst/include/Rcpp/sugar/functions/exp.h	2010-07-28 21:29:51 UTC (rev 1877)
@@ -30,7 +30,7 @@
 public:
 	typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
 	static inline double get( STORAGE x){
-		return Rcpp::traits::is_na<RTYPE>(x) ? NA_REAL : exp(x) ;
+		return Rcpp::traits::is_na<RTYPE>(x) ? NA_REAL : ::exp(x) ;
 	}
 } ;
 
@@ -39,7 +39,7 @@
 public:
 	typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
 	static inline double get( STORAGE x){
-		return exp(x) ;
+		return ::exp(x) ;
 	}
 } ;
 
@@ -47,7 +47,7 @@
 class exp__impl<false,INTSXP>{
 public:
 	static inline double get( int x){
-		return exp( static_cast<double>(x) ) ;
+		return ::exp( static_cast<double>(x) ) ;
 	}
 } ;
 
@@ -55,7 +55,7 @@
 class exp__impl<true,INTSXP>{
 public:
 	static inline double get( int x){
-		return Rcpp::traits::is_na<INTSXP>(x) ? NA_REAL : exp( static_cast<double>(x) ) ;
+		return Rcpp::traits::is_na<INTSXP>(x) ? NA_REAL : ::exp( static_cast<double>(x) ) ;
 	}
 } ;
 

Modified: pkg/Rcpp/inst/include/Rcpp/sugar/functions/functions.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/sugar/functions/functions.h	2010-07-28 15:27:30 UTC (rev 1876)
+++ pkg/Rcpp/inst/include/Rcpp/sugar/functions/functions.h	2010-07-28 21:29:51 UTC (rev 1877)
@@ -22,6 +22,9 @@
 #ifndef RCPP_SUGAR_FUNCTIONS_H
 #define RCPP_SUGAR_FUNCTIONS_H
 
+/* for exp( double ) */
+#include <cmath>
+
 #include <Rcpp/sugar/functions/any.h>
 #include <Rcpp/sugar/functions/all.h>
 #include <Rcpp/sugar/functions/is_na.h>



More information about the Rcpp-commits mailing list