x + y \cdot \frac{z - t}{z - a}\begin{array}{l}
\mathbf{if}\;y \le -1.109016302886835245235186766998728474519 \cdot 10^{-147}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)\\
\mathbf{elif}\;y \le 5.380855567614572390769079808720250862406 \cdot 10^{-168}:\\
\;\;\;\;x + \frac{\left(z - t\right) \cdot y}{z - a}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r25512230 = x;
double r25512231 = y;
double r25512232 = z;
double r25512233 = t;
double r25512234 = r25512232 - r25512233;
double r25512235 = a;
double r25512236 = r25512232 - r25512235;
double r25512237 = r25512234 / r25512236;
double r25512238 = r25512231 * r25512237;
double r25512239 = r25512230 + r25512238;
return r25512239;
}
double f(double x, double y, double z, double t, double a) {
double r25512240 = y;
double r25512241 = -1.1090163028868352e-147;
bool r25512242 = r25512240 <= r25512241;
double r25512243 = z;
double r25512244 = t;
double r25512245 = r25512243 - r25512244;
double r25512246 = a;
double r25512247 = r25512243 - r25512246;
double r25512248 = r25512245 / r25512247;
double r25512249 = x;
double r25512250 = fma(r25512240, r25512248, r25512249);
double r25512251 = 5.380855567614572e-168;
bool r25512252 = r25512240 <= r25512251;
double r25512253 = r25512245 * r25512240;
double r25512254 = r25512253 / r25512247;
double r25512255 = r25512249 + r25512254;
double r25512256 = r25512252 ? r25512255 : r25512250;
double r25512257 = r25512242 ? r25512250 : r25512256;
return r25512257;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
| Original | 1.2 |
|---|---|
| Target | 1.1 |
| Herbie | 0.7 |
if y < -1.1090163028868352e-147 or 5.380855567614572e-168 < y Initial program 0.8
Simplified2.7
rmApplied div-inv2.7
rmApplied fma-udef2.7
Simplified14.7
rmApplied *-un-lft-identity14.7
Applied times-frac0.8
Applied fma-def0.8
if -1.1090163028868352e-147 < y < 5.380855567614572e-168Initial program 2.4
Simplified3.6
rmApplied div-inv3.6
rmApplied fma-udef3.6
Simplified0.5
Final simplification0.7
herbie shell --seed 2019192 +o rules:numerics
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, A"
:herbie-target
(+ x (/ y (/ (- z a) (- z t))))
(+ x (* y (/ (- z t) (- z a)))))