     typedef float T;
 
     // initialize host array
-	//float x[4] = {4,7,13,16};
-	T base = std::pow(10,0)-1;
-    T x[] = {base+4, base+7,base+13, base+16};
+    T h_x[] = {4, 7, 13, 16};
 
     // transfer to device
-    thrust::device_vector<T> d_x(x, x + sizeof(x)/sizeof(T));
+    thrust::device_vector<T> d_x(h_x, h_x + sizeof(h_x) / sizeof(T));
 
     // setup arguments
     summary_stats_unary_op<T>  unary_op;

#include <cmath>
#include <limits>

// Compyte the mean and variance values in a single reduction

// summary_stats_data store the mean and variance
// values that have been encountered so far
template <typename T>
struct summary_stats_data
{

	std::cout <<"******Summary Statistics Example*****"<<std::endl;
	print_range("The data", d_x.begin(), d_x.end());

    std::cout <<"Count              : "<< result.n << std::endl;
	std::cout <<"Minimum            : "<< result.min <<std::endl;
	std::cout <<"Maximum            : "<< result.max <<std::endl;

    std::cout <<"Mean               : "<< result.mean << std::endl;
    std::cout <<"Variance           : "<< result.variance() << std::endl;
    std::cout <<"Standard Deviation : "<< std::sqrt(result.variance_n()) << std::endl;
	std::cout <<"Skewness           : "<< result.skewness() << std::endl;
	std::cout <<"Kurtosis           : "<< result.kurtosis() << std::endl;

    return 0;
}
