Talk:Romberg's method

a program in turbo pascal that gives us the integration of a function in 3 different ways: the Romberg's method, the trapezium rule and the simpson rule.

Not Enough Detail
This article should be classified as a stub. —The preceding unsigned comment was added by 140.160.11.159 (talk) 15:44, 3 May 2007 (UTC).

The method section needs to specify what the variables n and m are. It is ambiguous. 74.192.24.207 (talk) 05:27, 24 April 2008 (UTC)

Python source code
The python implementation is not very well written. The first problem is that the while loop is an infinite loop that is then broken out of when a certain condition is met. This is not very good practice as the loop should just run until the condition is met. Also the inline for loop finding the sums is also confusing. In general the procedure could use more comments to explain what is going on as it is hard to follow. —Preceding unsigned comment added by 75.180.15.98 (talk) 19:44, 12 November 2008 (UTC)
 * Source code is not particularly encouraged at Wikipedia, see WP:NOT. So I moved the code here. --Berland (talk) 20:11, 12 November 2008 (UTC)

Python source code
Wth. While True is sometimes the best way to do it because either the loop needs to be run once before you test for a condition, or it's more efficient to break out early than after the end of an iteration. Either way it's a minor detail. I guess the in-line for loop is confusing. But I'd personally rather have some sort of source code, at all, rather than just a bunch of equations to try to deal with. I personally wish Wikipedia would include more practical or leading information, as opposed to merely factual, particularly where mathematical articles are concerned.

As for the comment about Wikipedia not encouraging source code, I looked at that WP:NOT page, and there was only one mention of 'source code' and it said that Wikipedia is not a repository for things that are *merely* collections of source code. Using some source to convey an algorithm to accompany a mathematical concept *does not* seem like merely using Wikipedia as a repository for source code, to me. I was disappointed to see it gone. I only knew it was in the talk page because I went into the history to try to find it. Not very convenient. Inhahe (talk) 21:30, 13 November 2008 (UTC)

Is the formula for R(n,m) right
The formula for R(n,m) when m=1 should be equal to Simpson's rule. If you expand the formula on this page you get (b-a)/6 (4f((a+b)/2) - f(a) - f(b)) but the correct one should be (b-a)/6 (4f((a+b)/2) + f(a) + f(b)). Or have I expanded the whole thing wrong???

Redeemer90 (talk) 03:28, 27 February 2010 (UTC)

C-language implementation
The C-language implementation is quite awkward (check for i==1 in inner loop), difficult to follow (no comments), incomplete (where is the function "Trap"), inefficient (no re-use of the function evaluations from the previous row, use of "pow" for powers of two) and the description is wrong ("trapeze" vs. "Trap").

Is there any good reason for this implementation over any other being there? Would anybody be offended if I removed/replaced this?

Cheers,  pedrito  -  talk  - 10:09 03.11.2010

I have placed an implementation that is usable. Is this acceptable. I know it is preferable to not use code of a particular language, but given that the previous example didn't work is this a viable alternative at least in the short term? KillerGardevoir (talk) 22:02, 26 October 2016 (UTC)

Robert van Engelen suggests the following: there are two errors in this C code. 1) the relative error should be compared  instead of the absolute error. 2) the returned value should be. Also the second inner loop can be optimized by strength-reducing. Remove  and add   before this loop and and update   at the end of the loop body, to update the value for the next iteration of. — Preceding undated comment added 19:30, 18 November 2020 (UTC)

Needs a picture
This article would make a lot more sense if it had a picture of an irregular shape being measured (beneath all the scary notation this is just a way to estimate area)and a chart of the extrapolation written in simpler terms. (4MA -LA)/3, (16MA-LA) /15, (64 MA-LA)/63, ... where MA and LA stand for more accurate and less accurate respectively. This is a simple concept, but the article is so notation-heavy it would give a math professor a headache.JeffStickney (talk) 00:42, 2 August 2011 (UTC)

R(0,0)
Sorry, didn't look wel. Madyno (talk) 22:30, 20 January 2018 (UTC)