\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\begin{array}{l}
\mathbf{if}\;t \le -3.12430825583283118 \cdot 10^{131} \lor \neg \left(t \le 6.29361288009581358 \cdot 10^{112}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{t}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{\sqrt[3]{t - z} \cdot \sqrt[3]{t - z}}{\frac{a - t}{\sqrt[3]{t - z}}}, x + y\right)\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r567425 = x;
double r567426 = y;
double r567427 = r567425 + r567426;
double r567428 = z;
double r567429 = t;
double r567430 = r567428 - r567429;
double r567431 = r567430 * r567426;
double r567432 = a;
double r567433 = r567432 - r567429;
double r567434 = r567431 / r567433;
double r567435 = r567427 - r567434;
return r567435;
}
double f(double x, double y, double z, double t, double a) {
double r567436 = t;
double r567437 = -3.124308255832831e+131;
bool r567438 = r567436 <= r567437;
double r567439 = 6.293612880095814e+112;
bool r567440 = r567436 <= r567439;
double r567441 = !r567440;
bool r567442 = r567438 || r567441;
double r567443 = z;
double r567444 = r567443 / r567436;
double r567445 = y;
double r567446 = x;
double r567447 = fma(r567444, r567445, r567446);
double r567448 = r567436 - r567443;
double r567449 = cbrt(r567448);
double r567450 = r567449 * r567449;
double r567451 = a;
double r567452 = r567451 - r567436;
double r567453 = r567452 / r567449;
double r567454 = r567450 / r567453;
double r567455 = r567446 + r567445;
double r567456 = fma(r567445, r567454, r567455);
double r567457 = r567442 ? r567447 : r567456;
return r567457;
}




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.7 |
| Herbie | 8.5 |
if t < -3.124308255832831e+131 or 6.293612880095814e+112 < t Initial program 31.4
Simplified22.9
rmApplied fma-udef22.9
rmApplied div-inv22.9
Applied associate-*l*21.9
Simplified21.8
Taylor expanded around inf 17.1
Simplified11.6
if -3.124308255832831e+131 < t < 6.293612880095814e+112Initial program 9.3
Simplified7.3
rmApplied fma-udef7.4
rmApplied div-inv7.4
Applied associate-*l*6.8
Simplified6.8
rmApplied fma-def6.8
rmApplied add-cube-cbrt7.0
Applied associate-/l*7.0
Final simplification8.5
herbie shell --seed 2020064 +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))))