\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\begin{array}{l}
\mathbf{if}\;a \le -4.152528322917232299148352171282481831203 \cdot 10^{-63} \lor \neg \left(a \le 1.757471554465361693971773316158416808742 \cdot 10^{-153}\right):\\
\;\;\;\;x + y \cdot \left(1 - \frac{z - t}{a - t}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r700075 = x;
double r700076 = y;
double r700077 = r700075 + r700076;
double r700078 = z;
double r700079 = t;
double r700080 = r700078 - r700079;
double r700081 = r700080 * r700076;
double r700082 = a;
double r700083 = r700082 - r700079;
double r700084 = r700081 / r700083;
double r700085 = r700077 - r700084;
return r700085;
}
double f(double x, double y, double z, double t, double a) {
double r700086 = a;
double r700087 = -4.1525283229172323e-63;
bool r700088 = r700086 <= r700087;
double r700089 = 1.7574715544653617e-153;
bool r700090 = r700086 <= r700089;
double r700091 = !r700090;
bool r700092 = r700088 || r700091;
double r700093 = x;
double r700094 = y;
double r700095 = 1.0;
double r700096 = z;
double r700097 = t;
double r700098 = r700096 - r700097;
double r700099 = r700086 - r700097;
double r700100 = r700098 / r700099;
double r700101 = r700095 - r700100;
double r700102 = r700094 * r700101;
double r700103 = r700093 + r700102;
double r700104 = r700096 / r700097;
double r700105 = r700094 * r700104;
double r700106 = r700093 + r700105;
double r700107 = r700092 ? r700103 : r700106;
return r700107;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 17.1 |
|---|---|
| Target | 9.0 |
| Herbie | 7.3 |
if a < -4.1525283229172323e-63 or 1.7574715544653617e-153 < a Initial program 15.6
rmApplied associate-/l*9.3
rmApplied associate--l+7.3
rmApplied associate-/r/5.6
Applied *-un-lft-identity5.6
Applied distribute-rgt-out--5.6
if -4.1525283229172323e-63 < a < 1.7574715544653617e-153Initial program 20.6
rmApplied associate-/l*19.5
rmApplied associate--l+13.3
rmApplied associate-/r/12.0
Applied *-un-lft-identity12.0
Applied distribute-rgt-out--12.0
Taylor expanded around inf 11.2
Final simplification7.3
herbie shell --seed 2019353
(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 (- 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 (- a t))) y))))
(- (+ x y) (/ (* (- z t) y) (- a t))))