\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\begin{array}{l}
\mathbf{if}\;a \le -8.94712349400520929 \cdot 10^{-168}:\\
\;\;\;\;\mathsf{fma}\left(\sqrt[3]{y \cdot \frac{t - z}{a - t}} \cdot \sqrt[3]{y \cdot \frac{t - z}{a - t}}, \sqrt[3]{y \cdot \frac{t - z}{a - t}}, x + y\right)\\
\mathbf{elif}\;a \le 8.2322134775541335 \cdot 10^{-92}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{t}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\sqrt[3]{y \cdot \frac{t - z}{a - t}} \cdot \sqrt[3]{y \cdot \frac{t - z}{a - t}}\right) \cdot \sqrt[3]{y \cdot \frac{t - z}{a - t}} + \left(x + y\right)\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r637318 = x;
double r637319 = y;
double r637320 = r637318 + r637319;
double r637321 = z;
double r637322 = t;
double r637323 = r637321 - r637322;
double r637324 = r637323 * r637319;
double r637325 = a;
double r637326 = r637325 - r637322;
double r637327 = r637324 / r637326;
double r637328 = r637320 - r637327;
return r637328;
}
double f(double x, double y, double z, double t, double a) {
double r637329 = a;
double r637330 = -8.94712349400521e-168;
bool r637331 = r637329 <= r637330;
double r637332 = y;
double r637333 = t;
double r637334 = z;
double r637335 = r637333 - r637334;
double r637336 = r637329 - r637333;
double r637337 = r637335 / r637336;
double r637338 = r637332 * r637337;
double r637339 = cbrt(r637338);
double r637340 = r637339 * r637339;
double r637341 = x;
double r637342 = r637341 + r637332;
double r637343 = fma(r637340, r637339, r637342);
double r637344 = 8.232213477554133e-92;
bool r637345 = r637329 <= r637344;
double r637346 = r637334 / r637333;
double r637347 = fma(r637346, r637332, r637341);
double r637348 = r637340 * r637339;
double r637349 = r637348 + r637342;
double r637350 = r637345 ? r637347 : r637349;
double r637351 = r637331 ? r637343 : r637350;
return r637351;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
| Original | 16.5 |
|---|---|
| Target | 8.5 |
| Herbie | 8.7 |
if a < -8.94712349400521e-168Initial program 15.3
Simplified9.1
rmApplied fma-udef9.1
rmApplied div-inv9.1
rmApplied add-cube-cbrt9.3
Simplified9.3
Simplified9.3
rmApplied fma-def9.3
if -8.94712349400521e-168 < a < 8.232213477554133e-92Initial program 20.7
Simplified19.5
Taylor expanded around inf 10.1
Simplified8.9
if 8.232213477554133e-92 < a Initial program 14.5
Simplified7.6
rmApplied fma-udef7.6
rmApplied div-inv7.6
rmApplied add-cube-cbrt7.8
Simplified7.8
Simplified7.8
Final simplification8.7
herbie shell --seed 2020047 +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))))