ITPEC FE Subject B April 2026 Question 6
ITPEC FE Subject B April 2026 — Question 6 of 20
A is b and B is sqrt(-val).
The program works with the normalised form x² − 2bx + c = 0, where val holds b × b − c:
- •Blank A — Case 1 applies when
valis 0, and the stated double root is simplyb - •Blank B — Case 3 applies when
valis negative, and the roots areb ± i√(c − b²). Sincevalisb² − c, the quantityc − b²equals-val, which is positive here, sosqrt(-val)is the valuetmpmust hold
Answer (d)
Why not others:
- (a) and (b) — use -b for the double root; the minus sign was already absorbed when b was defined as -b1 ÷ (2 × a1), so negating again flips the root
- (a) and (c) — pass val to sqrt in the imaginary branch, but val is negative there and sqrt is only defined for non-negative arguments; putting a minus outside the call does not fix the argument inside it
Key rule: Track which quantity is negative. In the imaginary case the negation belongs inside the square root, turning b² − c back into c − b².
AI-generated — may contain errors
The original exam layout is preserved in the image so diagrams, formulas, tables, and code remain accurate.
This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.