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




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 2.1 |
|---|---|
| Target | 0.2 |
| Herbie | 0.2 |
Initial program 2.1
Simplified1.9
rmApplied fma-udef1.9
rmApplied div-inv1.9
Applied associate-*l*0.3
Simplified0.2
Final simplification0.2
herbie shell --seed 2020075 +o rules:numerics
(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)) a))
(- x (/ (- y z) (/ (+ (- t z) 1) a))))