C++ (Qt)#include <iostream>#include <fstream> #include <boost/math/tools/roots.hpp> template <class T>T my_func(const T & x, const T & err = 0.000001){ using namespace boost::math::tools; const T min = 0; const T max = x; // x >= 0 auto res = bisect([&](const T& s) { return x - s * exp(s); }, min, max, [&](const T& a, const T& b) { return std::fabs(b-a) <= err; }); return (res.first + res.second)/2;} int main(){ double x = 0; const double dx = 0.01; std::ofstream out("data.txt"); while (x < 100) { out << x << " " << my_func(x) << std::endl; x += dx; } return 0;}