x + \frac{y \cdot \left(z - t\right)}{a - t}\begin{array}{l}
\mathbf{if}\;y \le -15616133185154908021587968 \lor \neg \left(y \le 7.354120544912667021540022542939697214224 \cdot 10^{-76}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a - t}, z - t, 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 r388079 = x;
double r388080 = y;
double r388081 = z;
double r388082 = t;
double r388083 = r388081 - r388082;
double r388084 = r388080 * r388083;
double r388085 = a;
double r388086 = r388085 - r388082;
double r388087 = r388084 / r388086;
double r388088 = r388079 + r388087;
return r388088;
}
double f(double x, double y, double z, double t, double a) {
double r388089 = y;
double r388090 = -1.5616133185154908e+25;
bool r388091 = r388089 <= r388090;
double r388092 = 7.354120544912667e-76;
bool r388093 = r388089 <= r388092;
double r388094 = !r388093;
bool r388095 = r388091 || r388094;
double r388096 = a;
double r388097 = t;
double r388098 = r388096 - r388097;
double r388099 = r388089 / r388098;
double r388100 = z;
double r388101 = r388100 - r388097;
double r388102 = x;
double r388103 = fma(r388099, r388101, r388102);
double r388104 = r388101 * r388089;
double r388105 = r388104 / r388098;
double r388106 = r388105 + r388102;
double r388107 = r388095 ? r388103 : r388106;
return r388107;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
| Original | 11.1 |
|---|---|
| Target | 1.1 |
| Herbie | 1.6 |
if y < -1.5616133185154908e+25 or 7.354120544912667e-76 < y Initial program 21.4
Simplified2.7
if -1.5616133185154908e+25 < y < 7.354120544912667e-76Initial program 0.5
Simplified4.0
rmApplied div-inv4.0
rmApplied fma-udef4.0
Simplified4.0
rmApplied associate-*r/0.5
Final simplification1.6
herbie shell --seed 2019305 +o rules:numerics
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
:precision binary64
:herbie-target
(+ x (/ y (/ (- a t) (- z t))))
(+ x (/ (* y (- z t)) (- a t))))