\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\begin{array}{l}
\mathbf{if}\;t \le -9.15793160420448230149828002182071870307 \cdot 10^{100} \lor \neg \left(t \le 382400113499174194852810194944\right):\\
\;\;\;\;1 \cdot \mathsf{fma}\left(\frac{z}{t}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{1}{\frac{1}{\sqrt[3]{y} \cdot \sqrt[3]{y}}}, \frac{t - z}{\frac{a - t}{\sqrt[3]{y}}}, x + y\right)\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r589005 = x;
double r589006 = y;
double r589007 = r589005 + r589006;
double r589008 = z;
double r589009 = t;
double r589010 = r589008 - r589009;
double r589011 = r589010 * r589006;
double r589012 = a;
double r589013 = r589012 - r589009;
double r589014 = r589011 / r589013;
double r589015 = r589007 - r589014;
return r589015;
}
double f(double x, double y, double z, double t, double a) {
double r589016 = t;
double r589017 = -9.157931604204482e+100;
bool r589018 = r589016 <= r589017;
double r589019 = 3.824001134991742e+29;
bool r589020 = r589016 <= r589019;
double r589021 = !r589020;
bool r589022 = r589018 || r589021;
double r589023 = 1.0;
double r589024 = z;
double r589025 = r589024 / r589016;
double r589026 = y;
double r589027 = x;
double r589028 = fma(r589025, r589026, r589027);
double r589029 = r589023 * r589028;
double r589030 = cbrt(r589026);
double r589031 = r589030 * r589030;
double r589032 = r589023 / r589031;
double r589033 = r589023 / r589032;
double r589034 = r589016 - r589024;
double r589035 = a;
double r589036 = r589035 - r589016;
double r589037 = r589036 / r589030;
double r589038 = r589034 / r589037;
double r589039 = r589027 + r589026;
double r589040 = fma(r589033, r589038, r589039);
double r589041 = r589022 ? r589029 : r589040;
return r589041;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
| Original | 16.4 |
|---|---|
| Target | 8.7 |
| Herbie | 8.4 |
if t < -9.157931604204482e+100 or 3.824001134991742e+29 < t Initial program 28.5
Simplified20.7
rmApplied clear-num20.7
rmApplied fma-udef20.8
Simplified20.8
rmApplied *-un-lft-identity20.8
Applied *-un-lft-identity20.8
Applied distribute-lft-out20.8
Simplified19.4
Taylor expanded around inf 17.9
Simplified13.2
if -9.157931604204482e+100 < t < 3.824001134991742e+29Initial program 7.5
Simplified5.6
rmApplied clear-num5.6
rmApplied fma-udef5.6
Simplified5.3
rmApplied add-cube-cbrt5.5
Applied *-un-lft-identity5.5
Applied times-frac5.5
Applied *-un-lft-identity5.5
Applied times-frac4.8
Applied fma-def4.8
Final simplification8.4
herbie shell --seed 2020002 +o rules:numerics
(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))))