x + y \cdot \frac{z - t}{a - t}\begin{array}{l}
\mathbf{if}\;y \le -1.707807104532213458457818164860080687628 \cdot 10^{-46} \lor \neg \left(y \le 162944616184124985573376\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(z - t\right) \cdot y}{a - t} + x\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r454574 = x;
double r454575 = y;
double r454576 = z;
double r454577 = t;
double r454578 = r454576 - r454577;
double r454579 = a;
double r454580 = r454579 - r454577;
double r454581 = r454578 / r454580;
double r454582 = r454575 * r454581;
double r454583 = r454574 + r454582;
return r454583;
}
double f(double x, double y, double z, double t, double a) {
double r454584 = y;
double r454585 = -1.7078071045322135e-46;
bool r454586 = r454584 <= r454585;
double r454587 = 1.62944616184125e+23;
bool r454588 = r454584 <= r454587;
double r454589 = !r454588;
bool r454590 = r454586 || r454589;
double r454591 = z;
double r454592 = t;
double r454593 = r454591 - r454592;
double r454594 = a;
double r454595 = r454594 - r454592;
double r454596 = r454593 / r454595;
double r454597 = x;
double r454598 = fma(r454596, r454584, r454597);
double r454599 = r454593 * r454584;
double r454600 = r454599 / r454595;
double r454601 = r454600 + r454597;
double r454602 = r454590 ? r454598 : r454601;
return r454602;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
| Original | 1.2 |
|---|---|
| Target | 0.4 |
| Herbie | 0.4 |
if y < -1.7078071045322135e-46 or 1.62944616184125e+23 < y Initial program 0.5
Simplified0.4
if -1.7078071045322135e-46 < y < 1.62944616184125e+23Initial program 2.0
Simplified2.0
rmApplied div-inv2.0
rmApplied add-cube-cbrt2.3
Applied associate-/r*2.3
rmApplied fma-udef2.3
Simplified3.6
rmApplied associate-*l/0.3
Simplified0.3
Final simplification0.4
herbie shell --seed 2019212 +o rules:numerics
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, B"
:precision binary64
:herbie-target
(if (< y -8.50808486055124107e-17) (+ x (* y (/ (- z t) (- a t)))) (if (< y 2.8944268627920891e-49) (+ x (* (* y (- z t)) (/ 1 (- a t)))) (+ x (* y (/ (- z t) (- a t))))))
(+ x (* y (/ (- z t) (- a t)))))