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




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 16.1 |
|---|---|
| Target | 8.3 |
| Herbie | 4.4 |
Initial program 16.1
Taylor expanded around 0 12.4
Simplified4.4
Final simplification4.4
herbie shell --seed 2021044
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
:precision binary64
:herbie-target
(if (< (- (+ x y) (/ (* (- z t) y) (- a t))) -1.3664970889390727e-07) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y)) (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) 1.4754293444577233e-239) (/ (- (* y (- a z)) (* x t)) (- a t)) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y))))
(- (+ x y) (/ (* (- z t) y) (- a t))))