Skip to main content
1 of 2
Neil
  • 184.4k
  • 12
  • 76
  • 290

Charcoal, 25 bytes

⭆¹ΣE∕X⊘⊕×⟦¹±¹⟧₂⁵N₂⁵⎇μ⁻⁰λλ 

Try it online! Link is to verbose version of code. Explanation:

 ⟦¹±¹⟧ Literal list `1, -1` × Vectorised multiply by ₂ Square root of ⁵ Literal `5` ⊕ Vectorised increment ⊘ Vectorised halved X Vectorised raised to power N Input as a number ∕ Vectorised divide by ₂ Square root of ⁵ Literal `5` E ⎇μ⁻⁰λλ Negate the second element Σ Sum the elements ⭆¹ Stringify 

Charcoal doesn't really support complex numbers, but as it happens the Power of a negative number to a floating-point value will return a complex result; I just have to be careful not to use operations such as Negate and Cast where Charcoal will get confused as to which overload to use.

Neil
  • 184.4k
  • 12
  • 76
  • 290