gauss-legendre in c++
问题 i am trying to create gauss-legendre code according to the following algorithm: for n points That is,it is created a 2n equation system (if we demand to be accurate for polynominals of order 2n-1 , ti are roots of the legendre polynominals of order n.The legendre poynominals are given : and wi : My code is : #include <iostream> #include <cstdio> #include <cstdlib> #include <iomanip> #include <cmath> using namespace std; const double pi=3.14; //my function with limits (-1,1) double f(double x)