The most compact algorithm for Simpson's rule??
12-16-2015, 01:25 PM (This post was last modified: 12-16-2015 01:27 PM by Dieter.)
Post: #16
 Dieter Senior Member Posts: 2,397 Joined: Dec 2013
RE: The most compact algorithm for Simpson's rule??
(12-16-2015 12:57 AM)Namir Wrote:  Here is a version that iterates one less time to calculate the integral:

Now remove the initial a = a+h and move the one within the loop right behind the Do, and you get what I suggested in my post #12, saving one line of code. ;-)

Dieter
 « Next Oldest | Next Newest »

 Messages In This Thread The most compact algorithm for Simpson's rule?? - Namir - 12-12-2015, 04:24 PM RE: The most compact algorithm for Simpson's rule?? - Thomas Klemm - 12-12-2015, 05:44 PM RE: The most compact algorithm for Simpson's rule?? - Namir - 12-12-2015, 08:29 PM RE: The most compact algorithm for Simpson's rule?? - Dieter - 12-12-2015, 09:16 PM RE: The most compact algorithm for Simpson's rule?? - Dieter - 12-12-2015, 09:44 PM RE: The most compact algorithm for Simpson's rule?? - Namir - 12-12-2015, 08:28 PM RE: The most compact algorithm for Simpson's rule?? - Dieter - 12-12-2015, 09:05 PM RE: The most compact algorithm for Simpson's rule?? - Namir - 12-12-2015, 10:54 PM RE: The most compact algorithm for Simpson's rule?? - Namir - 12-12-2015, 11:02 PM RE: The most compact algorithm for Simpson's rule?? - Dieter - 12-14-2015, 09:04 PM RE: The most compact algorithm for Simpson's rule?? - Namir - 12-15-2015, 12:09 AM RE: The most compact algorithm for Simpson's rule?? - Dieter - 12-15-2015, 07:12 AM RE: The most compact algorithm for Simpson's rule?? - Namir - 12-13-2015, 01:52 AM RE: The most compact algorithm for Simpson's rule?? - Dieter - 12-13-2015, 01:27 PM RE: The most compact algorithm for Simpson's rule?? - Namir - 12-16-2015, 12:57 AM RE: The most compact algorithm for Simpson's rule?? - Dieter - 12-16-2015 01:25 PM RE: The most compact algorithm for Simpson's rule?? - Namir - 12-16-2015, 01:54 PM

User(s) browsing this thread: 1 Guest(s)