x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}x + a \cdot \frac{z - y}{t + \left(1 - z\right)}(FPCore (x y z t a) :precision binary64 (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))
(FPCore (x y z t a) :precision binary64 (+ x (* a (/ (- z y) (+ t (- 1.0 z))))))
double code(double x, double y, double z, double t, double a) {
return ((double) (x - (((double) (y - z)) / (((double) (((double) (t - z)) + 1.0)) / a))));
}
double code(double x, double y, double z, double t, double a) {
return ((double) (x + ((double) (a * (((double) (z - y)) / ((double) (t + ((double) (1.0 - z)))))))));
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 2.0 |
|---|---|
| Target | 0.2 |
| Herbie | 0.2 |
Initial program Error: 2.0 bits
SimplifiedError: 0.2 bits
Final simplificationError: 0.2 bits
herbie shell --seed 2020204
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
:precision binary64
:herbie-target
(- x (* (/ (- y z) (+ (- t z) 1.0)) a))
(- x (/ (- y z) (/ (+ (- t z) 1.0) a))))