# [Jelly], 8 [bytes]

    Ær,NċAƲƇ

A monadic Link that accepts a list of polynomial coefficients (`[...,d,c,b,a]`) and yields the real roots.

**[Try it online!][TIO-l8m1iwsx]** Or see the [test-suite].

### How?

The heavy lifting is done by a built-in...

    Ær,NċAƲƇ - Link: coefficients, P
    Ær       - polynomial roots (of P)
           Ƈ - keep those for which:
          Ʋ  -   last four links as a monad - f(x):
       N     -     negate (x)
      ,      -     (P) paired with (that)
         A   -     absolute value (of x)
        ċ    -     count occurrences (of that in the pair) -> 1 if x is real, 0 if not

[Jelly]: https://github.com/DennisMitchell/jelly
[bytes]: https://github.com/DennisMitchell/jelly/wiki/Code-page

[TIO-l8m1iwsx]: https://tio.run/##y0rNyan8//9wW5GO35Fux2ObjrX///8/WtdQx0DHWMcwFgA "Jelly – Try It Online"

[test-suite]: https://tio.run/##y0rNyan8//9wW5GO35Fux2ObjrX/P9x@dNLDnTM0I///j47WNdQx0DHWMYzl0ok21AFDENNCx0THCMI00AFBIDMWAA "Jelly – Try It Online"