Average Error: 5.6 → 4.8
Time: 13.5s
Precision: 64
Internal Precision: 1344
${\left(1 + x\right)}^{y}$
$\begin{array}{l} \mathbf{if}\;y \le 1.18920312127323 \cdot 10^{+190}:\\ \;\;\;\;{\left(x + 1\right)}^{y}\\ \mathbf{else}:\\ \;\;\;\;{x}^{y}\\ \end{array}$

# Try it out

Your Program's Arguments

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Split input into 2 regimes
2. ## if y < 1.18920312127323e+190

1. Initial program 4.1

${\left(1 + x\right)}^{y}$

## if 1.18920312127323e+190 < y

1. Initial program 41.3

${\left(1 + x\right)}^{y}$
2. Taylor expanded around inf 62.7

$\leadsto \color{blue}{e^{-1 \cdot \left(\log \left(\frac{1}{x}\right) \cdot y\right)}}$
3. Simplified21.5

$\leadsto \color{blue}{{x}^{y}}$
3. Recombined 2 regimes into one program.
4. Final simplification4.8

$\leadsto \begin{array}{l} \mathbf{if}\;y \le 1.18920312127323 \cdot 10^{+190}:\\ \;\;\;\;{\left(x + 1\right)}^{y}\\ \mathbf{else}:\\ \;\;\;\;{x}^{y}\\ \end{array}$

# Runtime

Time bar (total: 13.5s)Debug log

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