Talk:Apply a digital filter (direct form II transposed)

From Rosetta Code
Revision as of 19:06, 20 May 2023 by Tigerofdarkness (talk | contribs) (Reply to Petelomax and Rdm)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Task description

Although this task has a number of implementations, the task description is inadequate.

It's not just that it refers to an external site (looks like a college text) but it leaves implicit too many details.

We're representing the transfer function for a low pass filter here. But nothing was said about the units involved (seconds or frequency). So there's no real way of judging the accuracy of the answers. They could all be wrong and no one would know. Or, put different, updating the task to flesh out the missing details in the task description is probably harder for many of us than translating an implementation to another programming language. --Rdm (talk) 20:31, 18 May 2023 (UTC)

Don't ask me: I'm at a complete and utter loss trying to reason why, in the Phix entry, starting the second j loop at 1 or 2 makes absolutely no difference whatsoever... --Petelomax (talk) 13:35, 20 May 2023 (UTC)
Pete, your comment made me look at the loops at bit - you are right - the second j loop can start at 1 or 2 - if it starts at 1, result[ 1 ] is 0 at this point and so tmp is unchanged (that's if the lower bound of the array is 1, if it is 0, the second j loop can start at 0 or 1).
Looks like a number of the samples (including mine!) missed that the second loop doesn't start at the same index as the first.
I've modified the Algol 68 sample to simplify the loops a bit but Rdm has a point... --Tigerofdarkness (talk) 19:05, 20 May 2023 (UTC)