41 std::array<double, 3>
const roots =
42 boost::math::tools::cubic_roots<double>(
a_,
b_,
c_,
d_);
44 std::vector<double> filtered_roots =
45 ranges::views::ref(roots) |
46 ranges::views::filter([](
double const root)
47 {
return !std::isnan(root); }) |
48 ranges::to<std::vector>();
49 ranges::sort(filtered_roots);
51 return filtered_roots;