\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\begin{array}{l}
\mathbf{if}\;a \le -4.072147695298824991622230320368106205265 \cdot 10^{-86} \lor \neg \left(a \le 3.076583953261557678467109322067364719153 \cdot 10^{-124}\right):\\
\;\;\;\;y + \left(x - y \cdot \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 r431108 = x;
double r431109 = y;
double r431110 = r431108 + r431109;
double r431111 = z;
double r431112 = t;
double r431113 = r431111 - r431112;
double r431114 = r431113 * r431109;
double r431115 = a;
double r431116 = r431115 - r431112;
double r431117 = r431114 / r431116;
double r431118 = r431110 - r431117;
return r431118;
}
double f(double x, double y, double z, double t, double a) {
double r431119 = a;
double r431120 = -4.072147695298825e-86;
bool r431121 = r431119 <= r431120;
double r431122 = 3.0765839532615577e-124;
bool r431123 = r431119 <= r431122;
double r431124 = !r431123;
bool r431125 = r431121 || r431124;
double r431126 = y;
double r431127 = x;
double r431128 = z;
double r431129 = t;
double r431130 = r431128 - r431129;
double r431131 = r431119 - r431129;
double r431132 = r431130 / r431131;
double r431133 = r431126 * r431132;
double r431134 = r431127 - r431133;
double r431135 = r431126 + r431134;
double r431136 = r431128 / r431129;
double r431137 = r431126 * r431136;
double r431138 = r431127 + r431137;
double r431139 = r431125 ? r431135 : r431138;
return r431139;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 16.4 |
|---|---|
| Target | 8.5 |
| Herbie | 8.9 |
if a < -4.072147695298825e-86Initial program 14.4
rmApplied associate-/l*8.1
rmApplied associate--l+6.7
rmApplied div-inv7.0
Applied associate-/r*5.8
if -4.072147695298825e-86 < a < 3.0765839532615577e-124Initial program 20.1
rmApplied associate-/l*18.8
rmApplied associate--l+13.4
rmApplied associate-/r/11.6
Applied *-un-lft-identity11.6
Applied distribute-rgt-out--11.6
Taylor expanded around inf 10.6
if 3.0765839532615577e-124 < a Initial program 15.0
rmApplied associate-/l*9.5
rmApplied associate--l+7.6
rmApplied div-inv8.2
Simplified7.7
Final simplification8.9
herbie shell --seed 2019291
(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-7) (- (+ y x) (* (* (- z t) (/ 1 (- a t))) y)) (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) 1.47542934445772333e-239) (/ (- (* y (- a z)) (* x t)) (- a t)) (- (+ y x) (* (* (- z t) (/ 1 (- a t))) y))))
(- (+ x y) (/ (* (- z t) y) (- a t))))