[Question]
  [
## What is the Ultraradical?
The [ultraradical](https://en.wikipedia.org/wiki/Bring_radical), or the Bring radical, of a real number \$a\$ is defined as the only real root of the quintic equation \$x^5+x+a=0\$.
Here we use \$\text{UR}(\cdot)\$ to denote the ultraradical function. For example, \$\text{UR}(-100010)=10\$, since \$10^5+10-100010=0\$.
## Challenge
Write a full program or a function, that takes a real number as input, and returns or outputs its ultraradical.
## Requirements
No standard loopholes are allowed. The results for the test cases below must be accurate to at least 6 significant digits, but in general the program should calculate the corresponding values for any valid real number inputs.
## Test Cases
9 decimal places rounded towards 0 are given for reference. Explanation is added for some of the test cases.
```
 a                         | UR(a)
---------------------------+---------------------
             0             |   0.000 000 000        # 0
             1             |  -0.754 877 (666)      # UR(a) < 0 when a > 0
            -1             |   0.754 877 (666)      # UR(a) > 0 when a < 0
             1.414 213 562 |  -0.881 616 (566)      # UR(sqrt(2))
            -2.718 281 828 |   1.100 93(2 665)      # UR(-e)
             3.141 592 653 |  -1.147 96(5 385)      # UR(pi)
            -9.515 716 566 |   1.515 71(6 566)      # 5th root of 8, fractional parts should match
            10             |  -1.533 01(2 798)
          -100             |   2.499 20(3 570)
         1 000             |  -3.977 89(9 393)
      -100 010             |  10.000 0(00 000)      # a = (-10)^5 + (-10)
 1 073 741 888             | -64.000 0(00 000)      # a = 64^5 + 64
    
```
## Winning Criteria
The shortest valid submission in every language wins.
  
[Answer]
# [Wolfram Language (Mathematica)](https://www.wolfram.com/wolframscript/), 20 bytes
```
Root[xx^5+x+#,1]&
```
[Try it online!](https://tio.run/##y00syUjNTSzJTE78n2Yb8z8oP78kuuL9pIUVcabaFdrKOoaxav8DijLzShz8otOiDWJjuRA8QxSeLio3uLCoJNooFlWJKwo3IBOFaxGnYahvqolmqIGBgSHQ2v8A "Wolfram Language (Mathematica) – Try It Online")
Still a built-in, but at least it isn't `UltraRadical`.
(the character `` is displayed like `|->` in Mathematica, similar to `=>` in JS)
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 8 bytes
```
;17B¤ÆrḢ
```
[Try it online!](https://tio.run/##y0rNyan8/9/a0Nzp0JLDbUUPdyz6//@/oQEA "Jelly – Try It Online")
**How it works:** 
* Constructs the list `[a, 1, 0, 0, 0, 1]` by prepending `a` to the binary representation of `17`. Why this list? Because it corresponds to the coefficients we are looking for: 
```
[a, 1, 0, 0, 0, 1] -> P(x) := a + 1*x^1 + 0*x^2 + 0*x^3 + 0*x^4 + 1*x^5 = a + x + x^5
```
* Then, `Ær` is a built-in that solves the polynomial equation `P(x) = 0`, given a list of coefficients (what we constructed earlier).
* We are only interested in the real solution, so we take the first entry in the list of solutions with `Ḣ`.
[Answer]
# [Python 3.8 (pre-release)](https://docs.python.org/3.8/), 60 bytes
```
f=lambda n,x=0:x!=(a:=x-(x**5+x+n)/(5*x**4+1))and f(n,a)or a
```
[Try it online!](https://tio.run/##XYlBCsIwEEX3niLuZpJGJ7XVUMhhRkpQ0GkIXaSnj7oQoosP772ftvW2yMmnXGsMD35eZ1bSlUBT2QfgKRQLRevRFCN4hFG/ZTAOkWVWEaRjXLLimvJdVohgHRE5Qtx9S8uuYfsj/eHifO8/G87N8dfrCw "Python 3.8 (pre-release) – Try It Online")
Newton iteration method. \$ x' = x - \frac {f(x)} {f'(x)} = x - \frac {x^5+x+n} {5x^4+1}\$
While using \$ \frac {4x^5-n} {5x^4+1} \$ is mathematically equivalent, it makes the program loop forever.
---
Other approach:
# [Python 3.8 (pre-release)](https://docs.python.org/3.8/), 102 bytes
```
lambda x:a(x,-x*x-1,x*x+1)
a=lambda x,l,r:r<l+1e-9and l or(m:=(l+r)/2)**5+m+x>0and a(x,l,m)or a(x,m,r)
```
[Try it online!](https://tio.run/##NYy7CgIxEAB7vyJlNtlgogheMH6JTeQ8FDYPlivWr4@eYDMMDEx/r89Wj@fOY0m3Qbnc56wkZi3oxIgL@KUNsMvpH5GQI1/Ihoebcp0Vqca6xKTJMuwPYMzJFitXv8XtRFig8U8LMozOr7rqRbvgvQ8eYHwA "Python 3.8 (pre-release) – Try It Online")
Binary search, given that the function `x^5+x+a` is increasing. Set the bounds to `-abs(x)` and `abs(x)` is enough but `-x*x-1` and `x*x+1` is shorter.
BTW Python's recursion limit is a bit too low so it's necessary to have 1e-9, and the `:=` is called the walrus operator.
[Answer]
# JavaScript (ES7), 44 bytes
A safer version using the same formula as below but with a fixed number of iterations.
```
n=>(i=1e3,g=x=>i--?g(.8*x-n/(5*x**4+5)):x)``
```
[Try it online!](https://tio.run/##bc5BDoIwEIXhvSeZGWwZlBJiUly5cGHiESAIBUNaI8T09tWtabdfXl7@Z/fp1v49vzZh3WMIow5WNzDrYjjujfa6mYU4G5A1eWFzUOSJykwhnjy2beidXd0yyMUZGIERd/9SRCJiOhCxVBHfum2SlzTfr/Ex1FlNBEX@u4pDOFHCiWDm9JITD1VJpLKqRAxf "JavaScript (Node.js) – Try It Online")
---
# JavaScript (ES7), ~~43~~ 42 bytes
Newton's method, using \$5x^4+5\$ as an approximation of \$f'(x)=5x^4+1\$.
```
n=>(g=x=>x-(x-=(x+n/(x**4+1))/5)?g(x):x)``
```
[Try it online!](https://tio.run/##bc5BCsIwEIXhvSeZmZB0Km0pQurKhQvBI7TUNiolEVtkbh/dSrL9eDz@5/AZ1vH9eG3ah9sUZxu97cBZsZ1oEG1BlC9AiCpVIhY1Hh0IHgT7Po7Br2GZzBIczMCIu38pE9Ep7YnY1Alfhu1uTnm@ntNjaFVLBOWvENMQzpRwJpg5v@TMQ1MR1aqpEOMX "JavaScript (Node.js) – Try It Online")
### How?
We start with \$x\_0=0\$ and recursively compute:
$$x\_{k+1}=x\_k-\frac{{x\_k}^5+x\_k+n}{5{x\_k}^4+5}=x\_k-\frac{x\_k+\frac{n}{{x\_k}^4+1}}{5}$$
until \$x\_k-x\_{k+1}\$ is insignificant.
[Answer]
# [APL (Dyalog Unicode)](https://www.dyalog.com/), ~~11~~ 10 [bytes](https://codegolf.meta.stackexchange.com/a/9429/43319 "When can APL characters be counted as 1 byte each?")[SBCS](https://github.com/abrudz/SBCS ".dyalog files using a single byte character set")
-1 thanks to dzaima
Anonymous tacit prefix function.
```
(--*∘5)⍣¯1
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT///X0NXV@tRxwxTzUe9iw@tN/yf9qhtwqPevkd9Uz39H3U1H1pv/KhtIpAXHOQMJEM8PIP/pynAgQEXEscQiaNriCKjZ2JoYmRobGpmhKzGSM/c0MLIAoSRVRvrGZoYmloamZkaI6u21DM1NDU3NDM1M0MSNkQ4QdfQAMEBsqEckLABWJmhgbmxuYmhhYUFAA "APL (Dyalog Unicode) – Try It Online")
`(`…`)⍣¯1` apply the following tacit function negative one time:
 `-` the negated argument
 `-` minus
 `*∘5` the argument raised to the power of 5
In essence, this asks: *Which \$x\$ do I need to feed to \$f(x)=-x-x^5\$ such that the result becomes \$y\$.*
[Answer]
# [R](https://www.r-project.org/), 43 bytes
```
function(a)nlm(function(x)abs(x^5+x+a),a)$e
```
[Try it online!](https://tio.run/##PYzRCsIwDEV/JRQfEtpJN@bYi36JDGpZIaDd7Cr072v6oA8JOZeTm2qAK9TwiT7zFtFRfL7wj4Xc48CyXHTRjoyj01rDlpCBI3i0BnoDnczxThkHEljLjr0cOxuY9bycB5Fss2zT7W@3bBqleRqJvMsovupuykBAln91j4rqFw "R – Try It Online")
`nlm` is an optimization function, so this searches for the minimum of the function \$x\mapsto |x^5+x+a|\$, i.e. the only zero. The second parameter of `nlm` is the initialization point. Interestingly, initializing at 0 fails for the last test case (presumably because of numerical precision), but initializing at `a` (which isn't even the right sign) succeeds.
[Answer]
# [R](https://www.r-project.org/), 56 bytes
```
function(x)(y=polyroot(c(x,1,0,0,0,1)))[abs(Im(y))<1e-9]
```
[Try it online!](https://tio.run/##HcJRCoAgDADQ62yg4D6LPEBniD4sEgJzogbu9AvivarRa3zz2W/OMBDEF05SmTucMAwZ9yNE3MLRYH1AEBe67LRrC6UkAUtuJmci6gc "R – Try It Online")
Thanks to @Roland for pointing out `polyroot`. I have also realised my previous answer picked a complex root for zero or negative \$a\$ so now rewritten using `polyroot` and filtering complex roots. 
[Answer]
# [J](http://jsoftware.com/), 14 bytes
```
{:@;@p.@,#:@17
```
[Try it online!](https://tio.run/##VVDNSsQwEL73KT70sAi7w0z@JqmsBAVP4sEXWES6LCJUbMFDffea2ojuhIHJ9zchr/MFbY7Yt9hgC0Zbeke4e3q4n6c2X@d3ytvLNovOV00zdsOIPYGJlxJ0L6c@3@CYJ8JX3mFqq4jLWSfBgUm9ixpX4CA4B4ScOCPWB7NoY5QgWrWGVKKJSxedMCdrV8qSOPHJBG9LZLloCr66EnnxKsGHUFw/cw0UXsTeWhbbNI@3hPHUDR2ePzqMfY/hrf@kUpVb38sMQy4lw@4PLmjJspRUY0rnci5rpH4S/7eoVScxRhyC@6UbzN8 "J – Try It Online")
J has a built in for solving polynomials... `p.`
The final 4 test cases timeout on TIO, but in theory are still correct.
## how
The polynomial coefficients for J's builtin are taken as a numeric list, with the coefficient for `x^0` first. This means the list is:
```
a 1 0 0 0 1
```
`1 0 0 0 1` is 17 in binary, so we represent it as `#:@17`, then append the input `,`, then apply `p.`, then unbox the results with raze `;`, then take the last element `{:`
[Answer]
# [Ruby](https://www.ruby-lang.org/), ~~53~~ 41 bytes
```
->a{x=a/=5;99.times{x-=a/(x**4+1)+x/5};x}
```
[Try it online!](https://tio.run/##FYhBCoMwEADvviIIgsZk3W0VI6I/6AvEQwqKPQihKmxR357qYYZhvtv758fG69bu3NisKeqqgvUzD8vO@hoxS5mnlKScFWfNp@80ISIhoLqhC33rZdcJBnYxJeohJUKhCMtnmZMxBrCH2br94CNw27qIMIJqFFq34o4w6liNHfd9cPo/ "Ruby – Try It Online")
Using Newton-Raphson with a fixed number of iterations, and the same approximation trick as [Arnauld](https://codegolf.stackexchange.com/a/193399/18535)
[Answer]
# [Pari/GP](http://pari.math.u-bordeaux.fr/), ~~34~~ ~~32~~ ~~26~~ 24 bytes
```
a->-solve(X=0,a,a-X-X^5)
```
[Try it online!](https://tio.run/##K0gsytRNL/j/P1HXTrc4P6csVSPC1kAnUSdRN0I3Is5U8////wA "Pari/GP – Try It Online")
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 12 bytes
```
ΔyIy4m>/+5/-
```
[Try it online!](https://tio.run/##yy9OTMpM/f//3JRKz0qTXDt9bVN93f//jfUMTQxNLY3MTI0B "05AB1E – Try It Online")
Newton's method.
[Answer]
# k4, ~~33~~ 31 bytes
```
{{y-(x+y+*/5#y)%5+5*/4#y}[x]/x}
```
newton-raphson computed iteratively until a number is converged on
edit: -2 thanks to ngn!
---
whoops, got this all wrong...
# ~~K (oK), 10 bytes~~
```
{-x+*/5#x}
```
[Answer]
# [Pari/GP](http://pari.math.u-bordeaux.fr/), 24 bytes
```
a->polrootsreal(x^5+x+a)
```
[Try it online!](https://tio.run/##LUxLCoMwFLzK4MpgEvIS85FSL1JayKIWQWqILuzp00i7GJh/inkWr1QmXEsUY1qXvK77lp9xaY@H7Y4uslJiSsunjRAjUp7fe6XNKRpMbWSM46Y4iENUkOyphyYD63S1tPQUoAMh6MBhJPUEO2g4a2o8SEsWnlytu7pW54s676DUX0DRz/AGvq5DCHd2@QI "Pari/GP – Try It Online")
[Answer]
# [Octave](https://www.gnu.org/software/octave/), 25 bytes
```
@(a)fzero(@(x)x^5+x+a,-a)
```
[Try it online!](https://tio.run/##PYzBCsIwEETvfsmG2rCzySbpQeiHiBCkuRZEJPjz0aTiYQZmhnn7/ZlfWyuXa1spm/LeHjutVE296VSnfJ6zaYXYnAqh2zwc1sMLnAYZpdiIJKmrZ2fhoYsEdWNerEIjgoYw3nyQ@MAy/zPjV0UXPVL60toH "Octave – Try It Online")
[Answer]
# [Maplesoft Maple](https://www.maplesoft.com/support/help/), 23 bytes
```
f:=a->fsolve(x^5+x+a=0)
```
Unfortunately, there is no online Maple compiler/calculator out there AFAIK. But the code is pretty straightforward.
[Answer]
**C,118b/96b**
```
#include<math.h>
double ur(double a){double x=a,t=1;while(fabs(t)>1e-6){t=x*x*x*x;t=(x*t+x+a)/(5*t+1);x-=t;}return x;}
```
118 bytes with original function name and with some extra accuracy (double).
With bit hacks may be better, but unportable.
96 bytes with fixed iterations.
```
double ur(double a){double x=a,t;for(int k=0;k<99;k++){t=x*x*x*x;x=(4*x*t-a)/(5*t+1);}return x;}
```
Actually, our function is so good we can use better adaptations of Newton's method. Much faster and practical implementation (150 bytes) would be
```
#include<math.h>
double ur(double a){double x=a/5,f=1,t;while(fabs(f)>1e-6){t=x*x*x*x;f=(t*(5*t*x+5*a+6*x)+a+x)/(15*t*t-10*a*x*x*x+1);x-=f;}return x;}
```
I checked it works, but I'm too lazy to find out how much more fast it would be. Should be at least one more order faster as Newton's.
[Answer]
# MMIX, 68 bytes (17 instrs)
(jelly-style xxd -g4)
```
00000000: e0043ff0 e0034014 79010001 3b01013f  ṭ¥?ṅṭ¤@Þy¢¡¢;¢¢?
00000010: e8013ff0 c1020100 10ff0202 10ffffff  ċ¢?ṅḊ£¢¡Ñ”££Ñ”””
00000020: 1001ff02 10ffff03 e4010020 04ffff04  Ñ¢”£Ñ””¤ỵ¢¡ ¥””¥
00000030: 06010100 140101ff 11020102 5b02fff6  ©¢¢¡Þ¢¢”×£¢£[£”ẇ
00000040: f8020000                             ẏ£¡¡
```
**Disassembly**
```
bringr  SETH  $4,#3FF0          // one = 1.
        SETH  $3,#4014          // five = 5.
        ZSNN  $1,$0,1           // x = (a neg? 0 : 1)
        SLU   $1,$1,63          // x <<= 63
        ORH   $1,#3FF0          // x |= 1. [now x = a neg? 1. : -1.]
0H      SET   $2,$1             // loop: px = x
        FMUL  $255,$2,$2        // t = px *. px
        FMUL  $255,$255,$255    // t = t *. t
        FMUL  $1,$255,$2        // x = t *. px
        FMUL  $255,$255,$3      // px = px *. five
        INCH  $1,#20            // x *.= 4. (bit trick: add two to exponent)
        FADD  $255,$255,$4      // t = t +. one
        FSUB  $1,$1,$0          // x = x -. a
        FDIV  $1,$1,$255        // x = x /. t
        FCMPE $2,$1,$2          // px = epsilon_comp(x, px)
        PBNZ  $2,0B             // iflikely(px) goto loop
        POP   2,0               // return x
```
I used WolframAlpha to simplify Newton's method for this. It said that \$\def\d{{\rm d}}x-{x^5+x+a\over{\d\over \d x}x^5+x+a}\$ simplified down to \$4x^5-a\over5x^4+1\$. The convergence test here is a builtin epsilon-convergence, so `rE` must be set by the calling function.
For faster convergence, change `ORH $1,#3FF0` to
```
        SLU  $255,$0,1      // 3BFF0001 ;”¡¢ shift left to erase sign
        INCH $255,#8020     // E4FF8020 ỵ”⁰  unbias exponent
        PUT  rD,0           // F7010000 ẋ¢¡¡ prep dividend
        DIVU $2,$255,5      // 1F02FF05 þ£”¦ take approximate fifth root
        CSN  $2,$255,$255   // 6002FFFF `£”” and use that if we are >1
        INCH $2,#7FE0       // E4027FE0 ỵ£¶ṭ rebias exponent
        SRU  $255,$2,1      // 3FFF0201 ?”£¢ shift right again
        OR   $1,$1,$255     // C00101FF Ċ¢¢” or sign and guess
```
[Answer]
# Excel (Insider Beta), 59 bytes
```
=h(a1,1)
h =LAMBDA(a,x,IF(a=x^5+x,x,h(a,(a/(x^5+x))^0.2*x))) in name manager
```
1 byte for name h in name manager, 49 bytes for formula for h, 9 bytes for calling h. Uses successive approximations using the 5th root of a/(x^0.5+x) times x. Initial call uses 1 for x.
[Answer]
# [Clean](https://github.com/Ourous/curated-clean-linux), ~~61~~ 60 bytes
```
import StdEnv
$a=iter 99(\x=(3.0*x^5.0-a)/inc(4.0*x^4.0))0.0
```
[Try it online!](https://tio.run/##PYzBTsMwEETv/YpVVKkJSow3thNHIpzggMStR1wkk7olUuKixED5eYxTVxx2dmdW87rBaOvH0/5zMDDq3vp@/DhNDrZu/2i/Vmvd9s5M0DSpOrcpI/Tm/CoILXR229su5ZcgaJZRQv3W6dBt4SV1ZnY5bJTd5JC095DksI5ZoqyySaYULB7uisued6vvdzOZaBZE4OWAixQYT468RCaqMkQlqVGWcpkcGEGOoikrwcKrIQJFjZWoqtCikUAjjtJ/T/Ea1azmKKUkdOd/u8Ogj7Mvnp79w4/VY98F8/YH "Clean – Try It Online")
Newton's method, first implemented in [user202729's answer](https://codegolf.stackexchange.com/a/193380/18730).
# [Clean](https://github.com/Ourous/curated-clean-linux), 124 bytes
```
import StdEnv
$a= ?a(~a)with@x=abs(x^5.0+x+a);?u v|u-d==u=u|v+d==v=v= ?(u+if(@u< @v)0.0d)(v-if(@u> @v)0.0d)where d=(v-u)/3E1
```
[Try it online!](https://tio.run/##PY1Na4NAEIbv@RWDBLKLH91VVw3NRg/NodBbjjWFjZpG0E2JrrEQ@tNrVy1hmI/3GeadrCqEHOpLrqoCalHKoay/LtcW9m2@k91iKTjEAv0IfCvbc9JzcWxQ/8EcYvamwM@xgu6u7JxzxdW9M/XQ6YAYKbM8oURtIOkwcUiOUWdPZPsgt3NxLSDneqPwk7ejw74V@jeHd9QWTWvBKpUrCwy@BcOC5cyMVKbSwGkKo4aNPfXmsJjtJjFa6BcW0LHYdB596rvUY4GrkeuENHKjMS3wHOpTtnYD5unV2mGUhTRgQaCvyOxAZjtCHprQfxR6oU@jKHLIYfjNTpX4bAb79W14@ZaiLjMtjn8 "Clean – Try It Online")
A "binary" search, narrowing the search area to the upper or lower 99.6% of the range between the high and low bounds at each iteration instead of 50%.
[Answer]
# [Python 3](https://docs.python.org/3/) + sympy, 72 bytes
```
lambda y:float(sympy.poly("x**5+x+"+str(y)).all_roots()[0])
import sympy
```
[Try it online!](https://tio.run/##HcvBCoMwDADQu18hPSUtiEO8CH6JG6MyikJqQpuD@foKe/cnpgdfU0vru1HM@y/2tiTiqFAtiw3CZOBu7@dwBxeqFjDEIRJ9C7NWwG38YHdm4aL9/zQp56WQ4IXYHg "Python 3 – Try It Online")
[Answer]
# TI-Basic (TI-83), 12 bytes
```
solve(X^5+X+Ans,X,0
```
# TI-Basic (TI-89), 13\* bytes
```
solve(x^5+x=-a,x)→f(a)
```
\*Not completely sure how to score ti-89 programs/functions
[Answer]
# [Scala](http://www.scala-lang.org/), 74 bytes
Using Newton-Raphson with a fixed number of iterations, and the same approximation trick as [@Arnauld](https://codegolf.stackexchange.com/a/193399/18535)
Golfed version. [Try it online!](https://tio.run/##NVBda8MwDHzPrzgKA3tNUntbaJLiwGCP29PYUxnFzZI2I184bucR8tszO2UIHTokTjoNuazlXDV9pzQGR8JG6nN48Lzu@F3kGm@yajF6wFdRorGESHUaUjwrJX/371pV7emTpvhoKw2BcXZzJZHpS3c51gUV41UqGCE30Y5w6A5JQsOyU4XMz@NBZCYQRG6IuV9izena0E007cw0263AVdao2v6iByv/Wg2aBJwxxlnIfCzAHQQLFqYnnProux/y4NqRJZxtH7dPPI7jkNFF86b3fwVGGIhs6QC9daTrlgyruzApEQQZXLFy0/Y3xPjWnqH0pjR5Lidv/gM)
```
def f(a:Double)={var x=a/5;(1 to 99).foreach{_=>x-=(a/(x*x*x*x+1)+x)/5};x}
```
Ungolfed version. [Try it online!](https://tio.run/##TVBdS8MwFH3PrzgMhETbmqhjbaEDwUd9Ep9ERlbbrdIv0kwjo7@9Jm3d9pCTe@49997D7VJZymEoqrZRGp1jQSX1PtgQ0my/slTjRRY1jgT4zHJUllCpdl2MR6Xk7/urVkW9@2Ax3upCIxmVwLcskcd4ag7bMkOyPkWQjk0iJ1MwY/IWyzlHBXSDKGJB3qhMpnscsbFNcxm2wU9AXQs1uMb53UAwC4ZdTOvn35CJndwVdXvQnd39XHSa@oJzLnjAPYwgHPgjZqalgnlomx9658pLSwRf3a8eRBiGAWfjzGnehWdz9tzaG@mypt3iKohy@P4aLlg4tb02NR5yahhj5N9yT3oyDH8)
```
import scala.math._
object Main {
  def main(args: Array[String]): Unit = {
    val f: Double => Double = a => {
      var x = a / 5
      (1 to 99).foreach { _ =>
        x -= (a / (x * x * x * x + 1) + x) / 5
      }
      x
    }
    val inputs = List(-100010.0, 0.0, 1.0, -1.0, exp(1), pow(2, 0.5), 1073741888.0)
    inputs.foreach { x =>
      println(s"%.9f --> %.9f".format(x, f(x)))
    }
  }
}
```
]