\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}\frac{2 \cdot \frac{x + 1}{e^{x}}}{2}(FPCore (x eps) :precision binary64 (/ (- (* (+ 1.0 (/ 1.0 eps)) (exp (- (* (- 1.0 eps) x)))) (* (- (/ 1.0 eps) 1.0) (exp (- (* (+ 1.0 eps) x))))) 2.0))
(FPCore (x eps) :precision binary64 (/ (* 2.0 (/ (+ x 1.0) (exp x))) 2.0))
double code(double x, double eps) {
return (((1.0 + (1.0 / eps)) * exp(-((1.0 - eps) * x))) - (((1.0 / eps) - 1.0) * exp(-((1.0 + eps) * x)))) / 2.0;
}
double code(double x, double eps) {
return (2.0 * ((x + 1.0) / exp(x))) / 2.0;
}



Bits error versus x



Bits error versus eps
Results
Initial program 29.2
Taylor expanded around 0 0.5
Simplified0.5
rmApplied pow1_binary64_4800.5
Applied pow1_binary64_4800.5
Applied pow-prod-down_binary64_4900.5
Simplified0.5
Final simplification0.5
herbie shell --seed 2021007
(FPCore (x eps)
:name "NMSE Section 6.1 mentioned, A"
:precision binary64
(/ (- (* (+ 1.0 (/ 1.0 eps)) (exp (- (* (- 1.0 eps) x)))) (* (- (/ 1.0 eps) 1.0) (exp (- (* (+ 1.0 eps) x))))) 2.0))