New answers tagged

2

C doesn't allow multiple returns as such but the result could be packed into a struct. struct augmented_double { double head; double tail; }; struct augmented_double augmented_add(double, double); struct augmented_double augmented_multiply(double, double); You can do this for any function that returns multiple values, it's just cumbersome because ...


1

The reason you didn't find 2D quadrature is that we haven't implemented it yet. As to your compilation failure, this does the trick: #include <boost/math/quadrature/gauss_kronrod.hpp> #include <iostream> int main(int argc, char *argv[]) { using namespace boost::math::quadrature; auto f1 = [](double t, double s) { return std::exp(-(t*t+...


Top 50 recent answers are included