x + \left(y - x\right) \cdot \frac{z}{t}\begin{array}{l}
\mathbf{if}\;t \le -2.16895479299478677 \cdot 10^{-193}:\\
\;\;\;\;\frac{z}{\frac{t}{y - x}} + x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{t}, y - x, x\right)\\
\end{array}double f(double x, double y, double z, double t) {
double r614232 = x;
double r614233 = y;
double r614234 = r614233 - r614232;
double r614235 = z;
double r614236 = t;
double r614237 = r614235 / r614236;
double r614238 = r614234 * r614237;
double r614239 = r614232 + r614238;
return r614239;
}
double f(double x, double y, double z, double t) {
double r614240 = t;
double r614241 = -2.1689547929947868e-193;
bool r614242 = r614240 <= r614241;
double r614243 = z;
double r614244 = y;
double r614245 = x;
double r614246 = r614244 - r614245;
double r614247 = r614240 / r614246;
double r614248 = r614243 / r614247;
double r614249 = r614248 + r614245;
double r614250 = r614243 / r614240;
double r614251 = fma(r614250, r614246, r614245);
double r614252 = r614242 ? r614249 : r614251;
return r614252;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
| Original | 1.8 |
|---|---|
| Target | 1.9 |
| Herbie | 2.7 |
if t < -2.1689547929947868e-193Initial program 1.3
Taylor expanded around 0 7.0
Simplified1.3
rmApplied fma-udef1.3
Simplified3.5
if -2.1689547929947868e-193 < t Initial program 2.1
Taylor expanded around 0 6.2
Simplified2.1
Final simplification2.7
herbie shell --seed 2020043 +o rules:numerics
(FPCore (x y z t)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:tickPosition from plot-0.2.3.4"
:precision binary64
:herbie-target
(if (< (* (- y x) (/ z t)) -1013646692435.887) (+ x (/ (- y x) (/ t z))) (if (< (* (- y x) (/ z t)) -0.0) (+ x (/ (* (- y x) z) t)) (+ x (/ (- y x) (/ t z)))))
(+ x (* (- y x) (/ z t))))