Average Error: 29.7 → 1.1
Time: 8.0s
Precision: binary64
\[\frac{\left(1 + \frac{1}{\varepsilon}\right) \cdot e^{-\left(1 - \varepsilon\right) \cdot x} - \left(\frac{1}{\varepsilon} - 1\right) \cdot e^{-\left(1 + \varepsilon\right) \cdot x}}{2}\]
\[\begin{array}{l} \mathbf{if}\;x \le 33.18728172540726:\\ \;\;\;\;\frac{\left(\sqrt[3]{{x}^{9} \cdot {0.66666666666666674}^{3} + {\left(2 - x \cdot \left(x \cdot 1\right)\right)}^{3}} \cdot \sqrt[3]{{x}^{9} \cdot {0.66666666666666674}^{3} + {\left(2 - x \cdot \left(x \cdot 1\right)\right)}^{3}}\right) \cdot \log \left(e^{\frac{\sqrt[3]{{x}^{9} \cdot {0.66666666666666674}^{3} + {\left(2 - x \cdot \left(x \cdot 1\right)\right)}^{3}}}{0.66666666666666674 \cdot \left(0.66666666666666674 \cdot {x}^{6}\right) + \left(2 - x \cdot \left(x \cdot 1\right)\right) \cdot \left(2 - x \cdot \left(x \cdot \left(1 + x \cdot 0.66666666666666674\right)\right)\right)}}\right)}{2}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(1 + \frac{1}{\varepsilon}\right) \cdot e^{x \cdot \left(-\left(1 - \varepsilon\right)\right)} - \left(\frac{1}{\varepsilon} - 1\right) \cdot e^{x \cdot \left(-\left(1 + \varepsilon\right)\right)}}{2}\\ \end{array}\]

Error

Bits error versus x

Bits error versus eps

Derivation

  1. Split input into 2 regimes
  2. if x < 33.18728172540726

    1. Initial program 39.6

      \[\frac{\left(1 + \frac{1}{\varepsilon}\right) \cdot e^{-\left(1 - \varepsilon\right) \cdot x} - \left(\frac{1}{\varepsilon} - 1\right) \cdot e^{-\left(1 + \varepsilon\right) \cdot x}}{2}\]
    2. Taylor expanded around 0 1.4

      \[\leadsto \frac{\color{blue}{\left(0.66666666666666674 \cdot {x}^{3} + 2\right) - 1 \cdot {x}^{2}}}{2}\]
    3. Simplified1.4

      \[\leadsto \frac{\color{blue}{{x}^{3} \cdot 0.66666666666666674 + \left(2 - 1 \cdot \left(x \cdot x\right)\right)}}{2}\]
    4. Using strategy rm
    5. Applied flip3-+1.4

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

      \[\leadsto \frac{\frac{\color{blue}{{x}^{9} \cdot {0.66666666666666674}^{3} + {\left(2 - x \cdot \left(x \cdot 1\right)\right)}^{3}}}{\left({x}^{3} \cdot 0.66666666666666674\right) \cdot \left({x}^{3} \cdot 0.66666666666666674\right) + \left(\left(2 - 1 \cdot \left(x \cdot x\right)\right) \cdot \left(2 - 1 \cdot \left(x \cdot x\right)\right) - \left({x}^{3} \cdot 0.66666666666666674\right) \cdot \left(2 - 1 \cdot \left(x \cdot x\right)\right)\right)}}{2}\]
    7. Simplified1.4

      \[\leadsto \frac{\frac{{x}^{9} \cdot {0.66666666666666674}^{3} + {\left(2 - x \cdot \left(x \cdot 1\right)\right)}^{3}}{\color{blue}{0.66666666666666674 \cdot \left(0.66666666666666674 \cdot {x}^{6}\right) + \left(2 - x \cdot \left(x \cdot 1\right)\right) \cdot \left(2 - x \cdot \left(x \cdot \left(1 + x \cdot 0.66666666666666674\right)\right)\right)}}}{2}\]
    8. Using strategy rm
    9. Applied *-un-lft-identity1.4

      \[\leadsto \frac{\frac{{x}^{9} \cdot {0.66666666666666674}^{3} + {\left(2 - x \cdot \left(x \cdot 1\right)\right)}^{3}}{\color{blue}{1 \cdot \left(0.66666666666666674 \cdot \left(0.66666666666666674 \cdot {x}^{6}\right) + \left(2 - x \cdot \left(x \cdot 1\right)\right) \cdot \left(2 - x \cdot \left(x \cdot \left(1 + x \cdot 0.66666666666666674\right)\right)\right)\right)}}}{2}\]
    10. Applied add-cube-cbrt1.4

      \[\leadsto \frac{\frac{\color{blue}{\left(\sqrt[3]{{x}^{9} \cdot {0.66666666666666674}^{3} + {\left(2 - x \cdot \left(x \cdot 1\right)\right)}^{3}} \cdot \sqrt[3]{{x}^{9} \cdot {0.66666666666666674}^{3} + {\left(2 - x \cdot \left(x \cdot 1\right)\right)}^{3}}\right) \cdot \sqrt[3]{{x}^{9} \cdot {0.66666666666666674}^{3} + {\left(2 - x \cdot \left(x \cdot 1\right)\right)}^{3}}}}{1 \cdot \left(0.66666666666666674 \cdot \left(0.66666666666666674 \cdot {x}^{6}\right) + \left(2 - x \cdot \left(x \cdot 1\right)\right) \cdot \left(2 - x \cdot \left(x \cdot \left(1 + x \cdot 0.66666666666666674\right)\right)\right)\right)}}{2}\]
    11. Applied times-frac1.4

      \[\leadsto \frac{\color{blue}{\frac{\sqrt[3]{{x}^{9} \cdot {0.66666666666666674}^{3} + {\left(2 - x \cdot \left(x \cdot 1\right)\right)}^{3}} \cdot \sqrt[3]{{x}^{9} \cdot {0.66666666666666674}^{3} + {\left(2 - x \cdot \left(x \cdot 1\right)\right)}^{3}}}{1} \cdot \frac{\sqrt[3]{{x}^{9} \cdot {0.66666666666666674}^{3} + {\left(2 - x \cdot \left(x \cdot 1\right)\right)}^{3}}}{0.66666666666666674 \cdot \left(0.66666666666666674 \cdot {x}^{6}\right) + \left(2 - x \cdot \left(x \cdot 1\right)\right) \cdot \left(2 - x \cdot \left(x \cdot \left(1 + x \cdot 0.66666666666666674\right)\right)\right)}}}{2}\]
    12. Simplified1.4

      \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{{x}^{9} \cdot {0.66666666666666674}^{3} + {\left(2 - x \cdot \left(x \cdot 1\right)\right)}^{3}} \cdot \sqrt[3]{{x}^{9} \cdot {0.66666666666666674}^{3} + {\left(2 - x \cdot \left(x \cdot 1\right)\right)}^{3}}\right)} \cdot \frac{\sqrt[3]{{x}^{9} \cdot {0.66666666666666674}^{3} + {\left(2 - x \cdot \left(x \cdot 1\right)\right)}^{3}}}{0.66666666666666674 \cdot \left(0.66666666666666674 \cdot {x}^{6}\right) + \left(2 - x \cdot \left(x \cdot 1\right)\right) \cdot \left(2 - x \cdot \left(x \cdot \left(1 + x \cdot 0.66666666666666674\right)\right)\right)}}{2}\]
    13. Using strategy rm
    14. Applied add-log-exp1.4

      \[\leadsto \frac{\left(\sqrt[3]{{x}^{9} \cdot {0.66666666666666674}^{3} + {\left(2 - x \cdot \left(x \cdot 1\right)\right)}^{3}} \cdot \sqrt[3]{{x}^{9} \cdot {0.66666666666666674}^{3} + {\left(2 - x \cdot \left(x \cdot 1\right)\right)}^{3}}\right) \cdot \color{blue}{\log \left(e^{\frac{\sqrt[3]{{x}^{9} \cdot {0.66666666666666674}^{3} + {\left(2 - x \cdot \left(x \cdot 1\right)\right)}^{3}}}{0.66666666666666674 \cdot \left(0.66666666666666674 \cdot {x}^{6}\right) + \left(2 - x \cdot \left(x \cdot 1\right)\right) \cdot \left(2 - x \cdot \left(x \cdot \left(1 + x \cdot 0.66666666666666674\right)\right)\right)}}\right)}}{2}\]

    if 33.18728172540726 < x

    1. Initial program 0.3

      \[\frac{\left(1 + \frac{1}{\varepsilon}\right) \cdot e^{-\left(1 - \varepsilon\right) \cdot x} - \left(\frac{1}{\varepsilon} - 1\right) \cdot e^{-\left(1 + \varepsilon\right) \cdot x}}{2}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification1.1

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

Reproduce

herbie shell --seed 2020184 
(FPCore (x eps)
  :name "NMSE Section 6.1 mentioned, A"
  :precision binary64
  (/ (- (* (+ 1.0 (/ 1.0 eps)) (exp (neg (* (- 1.0 eps) x)))) (* (- (/ 1.0 eps) 1.0) (exp (neg (* (+ 1.0 eps) x))))) 2.0))