Talk:Numerical integration/Gauss-Legendre Quadrature: Difference between revisions

about error
(added commentary)
(about error)
Line 6:
 
How did you decide on the number of Newton-Raphson iterations to use when computing the node values? Wouldn't that also affect the accuracy? (I passed the required precision as a parameter and iterated until two consecutive estimates agreed up to that precision.) Exact floating point representations of the coefficients are also possible with sufficient precision. Increasing the precision always seems to give more accurate results, but having too many nodes can strangely make it worse. --[[User:Sluggo|Sluggo]]
: This is a two-fold problem. In principal, the higher order you go, the better you can decompose your function into a sum of polymials, so with infinite order you can get exact result -- on paper. In a computer, every time you do math with a floating point number, you get an error due to precision (up to <math>\sim 10^{-16}</math> of the value with IEEE 64 bit in general), and later you use the result to do more math, the error propagates and gets larger and larger. Higher orders require a lot more arithmetic operations (about <math>O(n^2)</math> I think), so at some point, the precision error dominates and more terms only make results worse. --[[User:Ledrug|Ledrug]] 07:39, 28 June 2011 (UTC)
Anonymous user