Skip to main content
2 of 2
added 94 characters in body
97.100.97.109
  • 7.1k
  • 12
  • 46

Python, 143 134 133 bytes

f=lambda a,b,c,d,R=[-1,1j,1]:[R:=[(z:=R[2])-(((a*z+b)*z+c)*z+d)/(z-R[0])/(z-R[1])]+R for i in" "*99]and[x for x in R[:3]if x.imag==0]

Attempt This Online!

This is the first solution that doesn't use a builtin, and it suffers greatly for it. Instead, I'm using the Durant-Kerner method to find all approximations, then filtering for whether they're complex.


-9 bytes from @Steffan for various small changes.

97.100.97.109
  • 7.1k
  • 12
  • 46