\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:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{t}, y, x\right)\\
\mathbf{elif}\;\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \le -1.065617326870013528561467193287073133332 \cdot 10^{-277}:\\
\;\;\;\;\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{elif}\;\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \le 0.0:\\
\;\;\;\;\frac{z \cdot y}{t} + x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\left(t - z\right) \cdot \frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{\sqrt[3]{a - t} \cdot \sqrt[3]{a - t}}, \frac{\sqrt[3]{y}}{\sqrt[3]{a - t}}, x + y\right)\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r400372 = x;
double r400373 = y;
double r400374 = r400372 + r400373;
double r400375 = z;
double r400376 = t;
double r400377 = r400375 - r400376;
double r400378 = r400377 * r400373;
double r400379 = a;
double r400380 = r400379 - r400376;
double r400381 = r400378 / r400380;
double r400382 = r400374 - r400381;
return r400382;
}
double f(double x, double y, double z, double t, double a) {
double r400383 = x;
double r400384 = y;
double r400385 = r400383 + r400384;
double r400386 = z;
double r400387 = t;
double r400388 = r400386 - r400387;
double r400389 = r400388 * r400384;
double r400390 = a;
double r400391 = r400390 - r400387;
double r400392 = r400389 / r400391;
double r400393 = r400385 - r400392;
double r400394 = -inf.0;
bool r400395 = r400393 <= r400394;
double r400396 = r400386 / r400387;
double r400397 = fma(r400396, r400384, r400383);
double r400398 = -1.0656173268700135e-277;
bool r400399 = r400393 <= r400398;
double r400400 = 0.0;
bool r400401 = r400393 <= r400400;
double r400402 = r400386 * r400384;
double r400403 = r400402 / r400387;
double r400404 = r400403 + r400383;
double r400405 = r400387 - r400386;
double r400406 = cbrt(r400384);
double r400407 = r400406 * r400406;
double r400408 = cbrt(r400391);
double r400409 = r400408 * r400408;
double r400410 = r400407 / r400409;
double r400411 = r400405 * r400410;
double r400412 = r400406 / r400408;
double r400413 = fma(r400411, r400412, r400385);
double r400414 = r400401 ? r400404 : r400413;
double r400415 = r400399 ? r400393 : r400414;
double r400416 = r400395 ? r400397 : r400415;
return r400416;
}




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 | 6.9 |
if (- (+ x y) (/ (* (- z t) y) (- a t))) < -inf.0Initial program 64.0
Simplified28.3
Taylor expanded around inf 42.2
Simplified26.9
if -inf.0 < (- (+ x y) (/ (* (- z t) y) (- a t))) < -1.0656173268700135e-277Initial program 1.3
if -1.0656173268700135e-277 < (- (+ x y) (/ (* (- z t) y) (- a t))) < 0.0Initial program 60.3
Simplified60.2
rmApplied fma-udef60.2
rmApplied div-inv60.2
Applied associate-*l*60.6
Simplified60.7
rmApplied add-cube-cbrt60.4
Applied add-cube-cbrt60.5
Applied times-frac60.4
Applied associate-*r*60.1
Taylor expanded around inf 18.4
if 0.0 < (- (+ x y) (/ (* (- z t) y) (- a t))) Initial program 12.2
Simplified6.9
rmApplied fma-udef6.9
rmApplied div-inv6.9
Applied associate-*l*7.3
Simplified7.3
rmApplied add-cube-cbrt7.5
Applied add-cube-cbrt7.5
Applied times-frac7.5
Applied associate-*r*6.1
rmApplied fma-def6.1
Final simplification6.9
herbie shell --seed 2019326 +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))))