[ BENCHMARKS / v5.0 / TASKS / 167_q15_biquad_c ]
Q15 fixed-point biquad cascade with saturation in C.
A bit-exact Q15 fixed-point biquad (second-order IIR) cascade, with the saturation and rounding rules the prompt spells out.
- Unit
167_q15_biquad_c- Category
- Signal Processing & DSPFixed-point filters
- Language
- C
- Difficulty
- Medium600 s wall clock (10 min)
- Origin
- New in v5
- Ranked rows passed
- 7/7single seed each
The prompt
The agent receives exactly this text as its task, verbatim. The harness adds its own system prompt and, in some campaign arms, guidance of its own; the harness chapter describes those. The task’s setup also writes the files its working directory starts with (a worked sample, a repository or a service, where the prompt names them); they are not reproduced here.
Create /tmp/eval_q15biquad/biquad.c. Build: gcc -O2 -std=c11 -Wall -Wextra -o biquad biquad.c
Implement a bit-exact Q15 fixed-point biquad (second-order IIR) cascade. The program reads all of stdin and writes stdout.
INPUT (whitespace-separated decimal integers): T, then T cases. Each case is `A O S N`, then S sections of six integers `b0 b1 b2 a1 a2 k`, then N samples x[0..N-1]. Bounds: 1 <= T <= 100, A in {0,1}, O in {0,1}, 1 <= S <= 8, 1 <= N <= 5000, k in {0,1,2,3}; every coefficient and every sample is in [-32768, 32767].
PROCESSING: the sections run in order. Section 1 filters the case's samples, section j+1 filters the output sequence of section j, and the case's result is the output of the last section. Every section has its own state x1, x2, y1, y2, all 0 at the start of every case. For each input sample x, a section computes, with all products exact:
acc = b0*x + b1*x1 + b2*x2 - a1*y1 - a2*y2
- If A = 0, acc is the exact mathematical value.
- If A = 1, acc is accumulated in exactly this order, clamping to [-2^31, 2^31-1] after every step: acc = clamp(b0*x); acc = clamp(acc + b1*x1); acc = clamp(acc + b2*x2); acc = clamp(acc - a1*y1); acc = clamp(acc - a2*y2).
Let s = 15 - k and v = floor((acc + 2^(s-1)) / 2^s), computed exactly in both modes (floor rounds toward negative infinity).
- If O = 0: y = v clamped to [-32768, 32767].
- If O = 1: y = the unique integer in [-32768, 32767] congruent to v modulo 65536.
Then x2 = x1, x1 = x, y2 = y1, y1 = y; y is the section's output for this sample.
OUTPUT: one line per case: its N result samples as decimal integers separated by single spaces, each line ending in a newline.
A worked sample is in /tmp/eval_q15biquad/sample_input.txt with its exact output in /tmp/eval_q15biquad/sample_output.txt. Validation feeds a much larger hidden test set (every A/O combination) on stdin and requires every output sample to match exactly; the run must finish within 4 seconds of CPU time and must not start child processes.What it tests and why it is in the suite
What it asks. A bit-exact Q15 fixed-point biquad (second-order IIR) cascade, with the saturation and rounding rules the prompt spells out.
Why it is here. A new family, ported to all six languages. v4 had no discriminating signal-processing unit at all; this family and the polyphase resampler cover it.
The same problem in 6 languages. Each port is its own unit and asks the same question; SOLVE counts the problem once, and LANG counts how far a solution carried across its ports.
In the suite README: evals/README.md:133 · evals/README.md:190–193
How it is graded
The validator holds its checks where the agent cannot read them, and runs them against what the agent left on disk once it stops. Its hidden cases are generated inside the validator from a seed; any worked sample the prompt names is only a sample, and no expected output for a hidden case is in the agent’s directory. Before any model ran it, the unit was proven: its reference solution passes, plausible wrong solutions fail for the reason declared in advance, an empty solution and a leak probe fail, and, where the unit is timed, a slow solution fails by the validator’s own limit. The family also went through up to three adversarial review rounds, in which an independent verifier tried to pass every unit without solving it.
- Time. The agent has 600 s of wall clock (medium tier) before an arm’s scaling; at the wall it is stopped and whatever is on disk is validated. Any time limit in the prompt applies to the program itself.
- Verdict. Pass or fail, from the validator alone. A unit the integrity scan finds contaminated is withheld and counts as not passed; a unit lost to infrastructure is rerun, and one still lost counts as not passed.
- Scoring. SCORE is 0.75 × SOLVE + 0.25 × LANG over the whole suite, with hard problems weighted above medium ones. Scoring and ranking
Upstream: the prover’s controls · one unit’s life cycle · why v5 is built this way
How each ranked run did
One run per board row, the DGX Spark pair first, then the RTX 5090, then the gold standard. Each is a single seed: a pass or a fail on one unit is one draw, and a difference between two rows on one unit says little on its own. Claude Opus 5.5 is the unranked reference, in its own scaffold.
DGX Spark pair
- DeepSeek-V4.1-Flash#1 on the boardPassedPassed the validator.
- Hy4-flash#2 on the boardPassedPassed the validator.
- GLM-5.3-Flash#3 on the boardPassedPassed the validator.
One RTX 5090
- Inkling 2 Mini#4 on the boardPassedPassed the validator.
- Inkling 2 Mini Derisked#5 on the boardPassedPassed the validator.
- Inkling 2 Mini SC117 abliterated#6 on the boardPassedPassed the validator.
- Qwen3.8 27B Uncensored MTP#7 on the boardPassedPassed the validator.
Gold standard · unranked
- Claude Opus 5.5Claude Code tools, no turn cap, 2× wallPassedPassed the validator.