\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\begin{array}{l}
\mathbf{if}\;\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} = -\infty:\\
\;\;\;\;x + y \cdot \left(1 - \left(z - t\right) \cdot \frac{1}{a - t}\right)\\
\mathbf{elif}\;\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \le -2.4108208486070365 \cdot 10^{-243}:\\
\;\;\;\;x + \left(y - \frac{1}{a - t} \cdot \left(\left(z - t\right) \cdot y\right)\right)\\
\mathbf{elif}\;\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \le 0.0:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(1 - \left(z - t\right) \cdot \frac{1}{a - t}\right)\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r649191 = x;
double r649192 = y;
double r649193 = r649191 + r649192;
double r649194 = z;
double r649195 = t;
double r649196 = r649194 - r649195;
double r649197 = r649196 * r649192;
double r649198 = a;
double r649199 = r649198 - r649195;
double r649200 = r649197 / r649199;
double r649201 = r649193 - r649200;
return r649201;
}
double f(double x, double y, double z, double t, double a) {
double r649202 = x;
double r649203 = y;
double r649204 = r649202 + r649203;
double r649205 = z;
double r649206 = t;
double r649207 = r649205 - r649206;
double r649208 = r649207 * r649203;
double r649209 = a;
double r649210 = r649209 - r649206;
double r649211 = r649208 / r649210;
double r649212 = r649204 - r649211;
double r649213 = -inf.0;
bool r649214 = r649212 <= r649213;
double r649215 = 1.0;
double r649216 = r649215 / r649210;
double r649217 = r649207 * r649216;
double r649218 = r649215 - r649217;
double r649219 = r649203 * r649218;
double r649220 = r649202 + r649219;
double r649221 = -2.4108208486070365e-243;
bool r649222 = r649212 <= r649221;
double r649223 = r649216 * r649208;
double r649224 = r649203 - r649223;
double r649225 = r649202 + r649224;
double r649226 = 0.0;
bool r649227 = r649212 <= r649226;
double r649228 = r649205 / r649206;
double r649229 = r649203 * r649228;
double r649230 = r649202 + r649229;
double r649231 = r649227 ? r649230 : r649220;
double r649232 = r649222 ? r649225 : r649231;
double r649233 = r649214 ? r649220 : r649232;
return r649233;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 16.0 |
|---|---|
| Target | 8.3 |
| Herbie | 6.0 |
if (- (+ x y) (/ (* (- z t) y) (- a t))) < -inf.0 or 0.0 < (- (+ x y) (/ (* (- z t) y) (- a t))) Initial program 20.2
rmApplied associate-/l*10.7
rmApplied associate--l+8.0
rmApplied associate-/r/7.2
Applied *-un-lft-identity7.2
Applied distribute-rgt-out--7.2
rmApplied div-inv7.7
if -inf.0 < (- (+ x y) (/ (* (- z t) y) (- a t))) < -2.4108208486070365e-243Initial program 1.2
rmApplied associate-/l*3.0
rmApplied associate--l+2.8
rmApplied div-inv2.9
Applied *-un-lft-identity2.9
Applied times-frac1.2
Simplified1.1
if -2.4108208486070365e-243 < (- (+ x y) (/ (* (- z t) y) (- a t))) < 0.0Initial program 58.5
rmApplied associate-/l*58.9
rmApplied associate--l+42.8
rmApplied associate-/r/32.8
Applied *-un-lft-identity32.8
Applied distribute-rgt-out--32.8
Taylor expanded around inf 18.2
Final simplification6.0
herbie shell --seed 2020049
(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))))