JavaScript (ES10), 9893 bytes
This is really just a port of @xnor's answer.
Expects (a)(b).
a=>g=(b,r=1,x=(aq=a/=2)+(d=((1+a)**2++q*q-b)**.5),y=a-d)=>x+y=>x?Array(r).fill(ya-d?[x,y]a-d]:x).flat():g(b**.5,r*2)
JavaScript (ES10), 98 bytes
This is really just a port of @xnor's answer.
Expects (a)(b).
a=>g=(b,r=1,x=(a/=2)+(d=((1+a)**2-b)**.5),y=a-d)=>x+y?Array(r).fill(y?[x,y]:x).flat():g(b**.5,r*2)
JavaScript (ES10), 93 bytes
This is really just a port of @xnor's answer.
Expects (a)(b).
a=>g=(b,r=1,x=(q=a/=2)+(d=(++q*q-b)**.5))=>x?Array(r).fill(a-d?[x,a-d]:x).flat():g(b**.5,r*2)
JavaScript (ES10), 10098 bytes
This is really just a port of @xnor's answer.
Expects (a)(b).
f=a=>g=(a,b,r=1,x=(a/=2)+(d=((1+a)**2-b)**.5),y=a-d)=>x||y=>x+y?Array(r).fill(y?[x,y]:x).flat():fg(a,b**.5,r*2)
JavaScript (ES10), 100 bytes
This is really just a port of @xnor's answer.
f=(a,b,r=1,x=(a/=2)+(d=((1+a)**2-b)**.5),y=a-d)=>x||y?Array(r).fill(y?[x,y]:x).flat():f(a,b**.5,r*2)
JavaScript (ES10), 98 bytes
This is really just a port of @xnor's answer.
Expects (a)(b).
a=>g=(b,r=1,x=(a/=2)+(d=((1+a)**2-b)**.5),y=a-d)=>x+y?Array(r).fill(y?[x,y]:x).flat():g(b**.5,r*2)
JavaScript (ES10), 100 bytes
This is really just a port of @xnor's answer.
f=(a,b,r=1,x=(a/=2)+(d=((1+a)**2-b)**.5),y=a-d)=>x||y?Array(r).fill(y?[x,y]:x).flat():f(a,b**.5,r*2)