c++ - Boost Rcpp (BH package) Multi precision -


i'm trying learn how use boost multi precision package rcpp. main problem seems wrapping , returning. if comment on below code appreciated.

the error "cannot convert const boost::multiprecision::number

// [[rcpp::depends(bh)]]  #include <rcpp.h>  #include <boost/multiprecision/cpp_dec_float.hpp>   using boost::multiprecision::cpp_dec_float_100;   // [[rcpp::export]]  sexp getbig(int a, int b) {  cpp_dec_float_100 seventh  = cpp_dec_float_100(1) / 7;  return rcpp::wrap(seventh); } 

in order call rcpp::wrap(someobject), need someone write actual implementations of wrap() type of someobject. rcpp supplies many types, , add-on packages can explain on in "extending rcpp" vignette.

here your job either create such wrappers cpp_dec_float_100, or convert type type known rcpp.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -