The most compact algorithm for Simpson's rule??
|
12-12-2015, 09:44 PM
(This post was last modified: 12-12-2015 09:44 PM by Dieter.)
Post: #7
|
|||
|
|||
RE: The most compact algorithm for Simpson's rule??
(12-12-2015 05:44 PM)Thomas Klemm Wrote:(12-12-2015 04:24 PM)Namir Wrote: Yes, the exact condition would be A=B, but this cannot be used since roundoff errors can and will occur. A usable exit condition could be Code: Loop Until a > b - h / 2 At least as long as h >> ULP(b)... (12-12-2015 05:44 PM)Thomas Klemm Wrote: I'd probably use \(N\) instead to control the loop. Definitely, yes. Dieter |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)