x + \left(y - x\right) \cdot \frac{z}{t}\begin{array}{l}
\mathbf{if}\;\frac{z}{t} = -\infty \lor \neg \left(\frac{z}{t} \le -2.409265180973639206758559822292383386784 \cdot 10^{-271}\right) \land \frac{z}{t} \le -0.0:\\
\;\;\;\;\mathsf{fma}\left(1, x, \frac{y - x}{t} \cdot z\right)\\
\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 r559276 = x;
double r559277 = y;
double r559278 = r559277 - r559276;
double r559279 = z;
double r559280 = t;
double r559281 = r559279 / r559280;
double r559282 = r559278 * r559281;
double r559283 = r559276 + r559282;
return r559283;
}
double f(double x, double y, double z, double t) {
double r559284 = z;
double r559285 = t;
double r559286 = r559284 / r559285;
double r559287 = -inf.0;
bool r559288 = r559286 <= r559287;
double r559289 = -2.409265180973639e-271;
bool r559290 = r559286 <= r559289;
double r559291 = !r559290;
double r559292 = -0.0;
bool r559293 = r559286 <= r559292;
bool r559294 = r559291 && r559293;
bool r559295 = r559288 || r559294;
double r559296 = 1.0;
double r559297 = x;
double r559298 = y;
double r559299 = r559298 - r559297;
double r559300 = r559299 / r559285;
double r559301 = r559300 * r559284;
double r559302 = fma(r559296, r559297, r559301);
double r559303 = fma(r559286, r559299, r559297);
double r559304 = r559295 ? r559302 : r559303;
return r559304;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
| Original | 2.0 |
|---|---|
| Target | 2.2 |
| Herbie | 0.8 |
if (/ z t) < -inf.0 or -2.409265180973639e-271 < (/ z t) < -0.0Initial program 8.0
rmApplied *-un-lft-identity8.0
Applied fma-def8.0
rmApplied pow18.0
Applied pow18.0
Applied pow-prod-down8.0
Simplified7.6
rmApplied *-un-lft-identity7.6
Applied *-un-lft-identity7.6
Applied times-frac7.6
Applied *-un-lft-identity7.6
Applied times-frac7.6
Simplified7.6
Simplified0.0
if -inf.0 < (/ z t) < -2.409265180973639e-271 or -0.0 < (/ z t) Initial program 1.2
rmApplied *-un-lft-identity1.2
Applied fma-def1.2
Taylor expanded around 0 7.3
Simplified1.2
Final simplification0.8
herbie shell --seed 2019305 +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))))