How to use sqrt and ceil with Boost::multiprecision?
问题 Do you know how to do this simple line of code without error using Boost::multiprecison ? boost::multiprecision::cpp_int v, uMax, candidate; //... v += 6 * ceil((sqrt(uMax * uMax - candidate) - v) / 6); Using MSVC there is an error for "sqrt" and it's possible to fix it with: v += 6 * ceil((sqrt(static_cast<boost::multiprecision::cpp_int>(uMax * uMax - candidate)) - v) / 6); Then there is an error for "ceil" and it's possible to fix it with: namespace bmp = boost::multiprecision; typedef bmp: