Average Error: 39.1 → 0.2
Time: 22.7s
Precision: 64
Internal Precision: 1344
${\left(1 + x\right)}^{\left(\frac{1}{2}\right)} - 1$
$\begin{array}{l} \mathbf{if}\;x \le 0.00021811841864165541:\\ \;\;\;\;\left(x \cdot x\right) \cdot \left(\frac{1}{16} \cdot x - \frac{1}{8}\right) + \frac{1}{2} \cdot x\\ \mathbf{else}:\\ \;\;\;\;{\left(x + 1\right)}^{\left(\frac{1}{2}\right)} - 1\\ \end{array}$

# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Split input into 2 regimes
2. ## if x < 0.00021811841864165541

1. Initial program 58.8

${\left(1 + x\right)}^{\left(\frac{1}{2}\right)} - 1$
2. Taylor expanded around 0 0.2

$\leadsto \color{blue}{\left(\frac{1}{16} \cdot {x}^{3} + \frac{1}{2} \cdot x\right) - \frac{1}{8} \cdot {x}^{2}}$
3. Simplified0.2

$\leadsto \color{blue}{\frac{1}{2} \cdot x + \left(\frac{1}{16} \cdot x - \frac{1}{8}\right) \cdot \left(x \cdot x\right)}$

## if 0.00021811841864165541 < x

1. Initial program 0.1

${\left(1 + x\right)}^{\left(\frac{1}{2}\right)} - 1$
3. Recombined 2 regimes into one program.
4. Final simplification0.2

$\leadsto \begin{array}{l} \mathbf{if}\;x \le 0.00021811841864165541:\\ \;\;\;\;\left(x \cdot x\right) \cdot \left(\frac{1}{16} \cdot x - \frac{1}{8}\right) + \frac{1}{2} \cdot x\\ \mathbf{else}:\\ \;\;\;\;{\left(x + 1\right)}^{\left(\frac{1}{2}\right)} - 1\\ \end{array}$

# Runtime

Time bar (total: 22.7s)Debug log

herbie shell --seed '#(2775764126 3555076145 3898259844 1891440260 2599947619 1948460636)'
(FPCore (x)
:name "(1+x)^(1/2) - 1"
(- (pow (+ 1 x) (/ 1 2)) 1))