The most compact algorithm for Simpson's rule??

12122015, 04:24 PM
(This post was last modified: 12122015 10:58 PM by Namir.)
Post: #1




The most compact algorithm for Simpson's rule??
Here is a (corrected, based on feedback from site members) pseudo code for what I hope to be the most compact way to implement Simpson's rule:
Code:
Many implementations use two summationsone for odd terms and one for even terms. In addition these implementations use two loops with slightly different ranges. The above pseudocoode implements a simple version that uses one loop and a few simple computational tricks. Namir 

« Next Oldest  Next Newest »

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