Average Error: 38.6 → 0.4
Time: 5.3s
Precision: 64
Internal Precision: 1344
\[e^{x} - 1\]
\[\begin{array}{l} \mathbf{if}\;x \le -0.00016688961595810102:\\ \;\;\;\;\frac{{\left(e^{x}\right)}^{3} - {1}^{3}}{e^{x} \cdot e^{x} + \left(e^{x} + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{1}{6} \cdot x + \frac{1}{2}\right) \cdot \left(x \cdot x\right) + x\\ \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 2 regimes
  2. if x < -0.00016688961595810102

    1. Initial program 0.1

      \[e^{x} - 1\]
    2. Initial simplification0.1

      \[\leadsto e^{x} - 1\]
    3. Using strategy rm
    4. Applied flip3--0.1

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

    if -0.00016688961595810102 < x

    1. Initial program 58.5

      \[e^{x} - 1\]
    2. Initial simplification58.5

      \[\leadsto e^{x} - 1\]
    3. Taylor expanded around 0 0.5

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

      \[\leadsto \color{blue}{\left(x \cdot x\right) \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot x\right) + x}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.4

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \le -0.00016688961595810102:\\ \;\;\;\;\frac{{\left(e^{x}\right)}^{3} - {1}^{3}}{e^{x} \cdot e^{x} + \left(e^{x} + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{1}{6} \cdot x + \frac{1}{2}\right) \cdot \left(x \cdot x\right) + x\\ \end{array}\]

Runtime

Time bar (total: 5.3s)Debug log

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