Given a black-box function `f(x)` which take a value `x` and output `true` for \$p(x)\$, an unknown continious monotone function(not knowing even whether it's increasing), probable; and `false` otherwise. Output an infinite sequence \$a_n\$ such that \$\lim_{n\rightarrow \infty}p(a_n)=0.5\$. You can assume that the result exists. Reasonable I/O allowed. Shortest code win. A possible solution: for i=1..infty S = [i/2] * i*i*2 for j=0..i*i*2-1 for k=1..i if f(j/i-i) S[j]-- print minPos([t*t for t in S])/i-i [Try It Online!](https://tio.run/##XZDLDoIwEEX3fMVNXFgaH8DSyFe4JCwwLTooLSnFwNdjWzQSZ9FJ5uTcybSb7F2rbKa208bCVEroNhKyRs3G@BTBlZF2MOrDDktj8XmcSdV2Qo40SbBBr0EWQstebV3SoFBrI1/SRK6DQCHiJlm6C@In/eICCjpmJTgYceJZHOZean7SQhblix8rvEK@yB@QHhLeHGn/D8Paoilz/@zTwDpDysIbvfsIKdh67Q4POeXPqr2KCs3Ja9yNi6T06fP8Bg) [tag:random] [tag:code-golf]