jeudi 20 juillet 2017

cpp_bin_float not found between boost library

I'm using boost library to handle big numbers.

#include <iostream>
#include <boost/multiprecision/cpp_bin_float.hpp>
#include <boost/multiprecision/number.hpp>

namespace mp=boost::multiprecision;

using namespace std;

int main()
{
typedef mp::number<mp::backends::cpp_bin_float<2000> > cpp_bin_float227;
    cpp_bin_float227 b = 998;
   std::cout << std::numeric_limits<cpp_bin_float227>::digits << std::endl;
   cout<<std::setprecision(std::numeric_limits<cpp_bin_float227>::max_digits10)<<pow(b,9999)<<endl;
}

But I got this error:

fatal error: boost/multiprecision/cpp_bin_float.hpp: No such file or directory
 #include <boost/multiprecision/cpp_bin_float.hpp>

If I use cpp_dec_float instead of cpp_bin_float it works fine. Why is the library not found and how to fix it?

(I'm using c++11 compiler, in Ubuntu)

Aucun commentaire:

Enregistrer un commentaire