\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\begin{array}{l}
\mathbf{if}\;a \le -6.796987859803041 \cdot 10^{-120}:\\
\;\;\;\;\left(x + y\right) + \frac{\sqrt[3]{y}}{\sqrt[3]{a - t}} \cdot \left(\frac{t - z}{\sqrt[3]{a - t} \cdot \sqrt[3]{a - t}} \cdot \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right)\right)\\
\mathbf{elif}\;a \le 2.976075834772394 \cdot 10^{-120}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{t}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - z}{\sqrt[3]{a - t} \cdot \sqrt[3]{a - t}}, \frac{y}{\sqrt[3]{a - t}}, x + y\right)\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r15579401 = x;
double r15579402 = y;
double r15579403 = r15579401 + r15579402;
double r15579404 = z;
double r15579405 = t;
double r15579406 = r15579404 - r15579405;
double r15579407 = r15579406 * r15579402;
double r15579408 = a;
double r15579409 = r15579408 - r15579405;
double r15579410 = r15579407 / r15579409;
double r15579411 = r15579403 - r15579410;
return r15579411;
}
double f(double x, double y, double z, double t, double a) {
double r15579412 = a;
double r15579413 = -6.796987859803041e-120;
bool r15579414 = r15579412 <= r15579413;
double r15579415 = x;
double r15579416 = y;
double r15579417 = r15579415 + r15579416;
double r15579418 = cbrt(r15579416);
double r15579419 = t;
double r15579420 = r15579412 - r15579419;
double r15579421 = cbrt(r15579420);
double r15579422 = r15579418 / r15579421;
double r15579423 = z;
double r15579424 = r15579419 - r15579423;
double r15579425 = r15579421 * r15579421;
double r15579426 = r15579424 / r15579425;
double r15579427 = r15579418 * r15579418;
double r15579428 = r15579426 * r15579427;
double r15579429 = r15579422 * r15579428;
double r15579430 = r15579417 + r15579429;
double r15579431 = 2.976075834772394e-120;
bool r15579432 = r15579412 <= r15579431;
double r15579433 = r15579423 / r15579419;
double r15579434 = fma(r15579433, r15579416, r15579415);
double r15579435 = r15579416 / r15579421;
double r15579436 = fma(r15579426, r15579435, r15579417);
double r15579437 = r15579432 ? r15579434 : r15579436;
double r15579438 = r15579414 ? r15579430 : r15579437;
return r15579438;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
| Original | 16.0 |
|---|---|
| Target | 8.1 |
| Herbie | 8.3 |
if a < -6.796987859803041e-120Initial program 14.2
Simplified8.2
rmApplied fma-udef8.2
rmApplied add-cube-cbrt8.4
Applied *-un-lft-identity8.4
Applied times-frac8.4
Applied associate-*r*7.8
Simplified7.8
rmApplied *-un-lft-identity7.8
Applied cbrt-prod7.8
Applied add-cube-cbrt7.8
Applied times-frac7.8
Applied associate-*r*7.5
Simplified7.5
if -6.796987859803041e-120 < a < 2.976075834772394e-120Initial program 19.8
Simplified19.6
Taylor expanded around inf 10.3
Simplified9.1
if 2.976075834772394e-120 < a Initial program 14.7
Simplified8.9
rmApplied fma-udef9.0
rmApplied add-cube-cbrt9.1
Applied *-un-lft-identity9.1
Applied times-frac9.1
Applied associate-*r*8.5
Simplified8.5
rmApplied fma-def8.5
Final simplification8.3
herbie shell --seed 2019163 +o rules:numerics
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
: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))))