2

I'm currently trying to take some C++ code and interface it with Python. I'm aware there are a few different ways to do this. Cython, Boost Python, and the package I'm most interested in is pybind11. I'm most interested in pybind11 because it looks the easiest to use but it looks as though it doesn't support quad precision numbers, http://pybind11.readthedocs.org/en/latest/basics.html

My question is if anyone who interfaces C++ with Python has found a good way to pass quad precision numbers between the two. Specifically if anyone has an idea on how to get pybind11 to do this. I am aware that boost python can take quad precision but I'm trying to avoid that package if possible.

  • 1
    I'm not sure about pybind11, but I think (unfortunately) that boost python is the most portable solution (as with most things in boost). I agree that it's a bit of a potential barrier to get it set up, but it does eventually make life a lot easier. That being said, there "should" be a similar solution in Cython – Dave Williams Mar 31 '16 at 22:30

0 Answers0