Anonymous user
Numerical integration/Gauss-Legendre Quadrature: Difference between revisions
Numerical integration/Gauss-Legendre Quadrature (view source)
Revision as of 02:12, 12 December 2011
, 12 years agofix bare lang tag
(Go solution) |
m (fix bare lang tag) |
||
Line 128:
lege_inte(exp, -3, 3), exp(3) - exp(-3));
return 0;
}</lang>output:
<pre>Roots: 0.90618 0.538469 0 -0.538469 -0.90618
Weight: 0.236927 0.478629 0.568889 0.478629 0.236927
integrating Exp(x) over [-3, 3]:
20.03557772,
compred to actual
20.03574985</
=={{header|Common Lisp}}==
|