Average Error: 57.1 → 0.4
Time: 28.3s
Precision: 64
Internal Precision: 1344
\[e^{\left(\left(x + 1\right) \cdot \left(x + 1\right) - x \cdot \left(x + 1\right)\right) - 1} - 1\]
\[\begin{array}{l} \mathbf{if}\;e^{\left(\left(x + 1\right) \cdot \left(x + 1\right) - x \cdot \left(x + 1\right)\right) - 1} - 1 \le -1.4757203902200017 \cdot 10^{-11}:\\ \;\;\;\;\frac{{\left(e^{x}\right)}^{3} - 1}{e^{x} \cdot e^{x} + \left(e^{x} + 1\right)}\\ \mathbf{if}\;e^{\left(\left(x + 1\right) \cdot \left(x + 1\right) - x \cdot \left(x + 1\right)\right) - 1} - 1 \le 3863346122335378.0:\\ \;\;\;\;x + \left(x \cdot x\right) \cdot \left(\frac{1}{2} + x \cdot \frac{1}{6}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{e^{x} \cdot e^{x} - 1}{e^{x} + 1}\\ \end{array}\]

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 3 regimes
  2. if (- (exp (- (- (* (+ x 1) (+ x 1)) (* x (+ x 1))) 1)) 1) < -1.4757203902200017e-11

    1. Initial program 43.7

      \[e^{\left(\left(x + 1\right) \cdot \left(x + 1\right) - x \cdot \left(x + 1\right)\right) - 1} - 1\]
    2. Applied simplify1.2

      \[\leadsto \color{blue}{e^{\left(x + 1\right) - 1} - 1}\]
    3. Using strategy rm
    4. Applied flip3--1.2

      \[\leadsto \color{blue}{\frac{{\left(e^{\left(x + 1\right) - 1}\right)}^{3} - {1}^{3}}{e^{\left(x + 1\right) - 1} \cdot e^{\left(x + 1\right) - 1} + \left(1 \cdot 1 + e^{\left(x + 1\right) - 1} \cdot 1\right)}}\]
    5. Applied simplify1.2

      \[\leadsto \frac{\color{blue}{{\left(e^{x}\right)}^{3} - 1}}{e^{\left(x + 1\right) - 1} \cdot e^{\left(x + 1\right) - 1} + \left(1 \cdot 1 + e^{\left(x + 1\right) - 1} \cdot 1\right)}\]
    6. Applied simplify1.2

      \[\leadsto \frac{{\left(e^{x}\right)}^{3} - 1}{\color{blue}{e^{x} \cdot e^{x} + \left(e^{x} + 1\right)}}\]

    if -1.4757203902200017e-11 < (- (exp (- (- (* (+ x 1) (+ x 1)) (* x (+ x 1))) 1)) 1) < 3863346122335378.0

    1. Initial program 59.2

      \[e^{\left(\left(x + 1\right) \cdot \left(x + 1\right) - x \cdot \left(x + 1\right)\right) - 1} - 1\]
    2. Applied simplify59.1

      \[\leadsto \color{blue}{e^{\left(x + 1\right) - 1} - 1}\]
    3. Taylor expanded around 0 0.4

      \[\leadsto \color{blue}{\frac{1}{2} \cdot {x}^{2} + \left(x + \frac{1}{6} \cdot {x}^{3}\right)}\]
    4. Applied simplify0.4

      \[\leadsto \color{blue}{x + \left(x \cdot x\right) \cdot \left(\frac{1}{2} + x \cdot \frac{1}{6}\right)}\]

    if 3863346122335378.0 < (- (exp (- (- (* (+ x 1) (+ x 1)) (* x (+ x 1))) 1)) 1)

    1. Initial program 63.1

      \[e^{\left(\left(x + 1\right) \cdot \left(x + 1\right) - x \cdot \left(x + 1\right)\right) - 1} - 1\]
    2. Applied simplify0

      \[\leadsto \color{blue}{e^{\left(x + 1\right) - 1} - 1}\]
    3. Using strategy rm
    4. Applied flip--0.0

      \[\leadsto \color{blue}{\frac{e^{\left(x + 1\right) - 1} \cdot e^{\left(x + 1\right) - 1} - 1 \cdot 1}{e^{\left(x + 1\right) - 1} + 1}}\]
    5. Applied simplify0.0

      \[\leadsto \frac{\color{blue}{e^{x} \cdot e^{x} - 1}}{e^{\left(x + 1\right) - 1} + 1}\]
    6. Applied simplify0.0

      \[\leadsto \frac{e^{x} \cdot e^{x} - 1}{\color{blue}{e^{x} + 1}}\]
  3. Recombined 3 regimes into one program.

Runtime

Time bar (total: 28.3s)Debug log

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