Jelly, (削除) 32 (削除ここまで) 31 bytes
ḷ‘ɼ_’;N};1Ær1⁄2ßH}\/}x®$ÆiṪṪƊ?,ḟ0
A full program taking two arguments, b and a in that order. Implements @xnor’s algorithm, so be sure to upvote that one too! Uses recursion to find real roots to a quadratic equation of the form \$x^2 - w x + (y - w - 1) = 0\$ where \$w = \frac{a}{2 ^ n}\$ and \$y = b ^ \frac{1}{2n} \$ for some non-negative integer \$n\$.
Nick Kennedy
- 21.2k
- 3
- 18
- 44