x + \left(y - x\right) \cdot \frac{z}{t}\begin{array}{l}
\mathbf{if}\;x + \left(y - x\right) \cdot \frac{z}{t} \le 2.099420613792782 \cdot 10^{251}:\\
\;\;\;\;x + \left(y - x\right) \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x + \left(z \cdot \frac{y}{t} - \frac{x \cdot z}{t}\right)\\
\end{array}double f(double x, double y, double z, double t) {
double r525917 = x;
double r525918 = y;
double r525919 = r525918 - r525917;
double r525920 = z;
double r525921 = t;
double r525922 = r525920 / r525921;
double r525923 = r525919 * r525922;
double r525924 = r525917 + r525923;
return r525924;
}
double f(double x, double y, double z, double t) {
double r525925 = x;
double r525926 = y;
double r525927 = r525926 - r525925;
double r525928 = z;
double r525929 = t;
double r525930 = r525928 / r525929;
double r525931 = r525927 * r525930;
double r525932 = r525925 + r525931;
double r525933 = 2.099420613792782e+251;
bool r525934 = r525932 <= r525933;
double r525935 = r525926 / r525929;
double r525936 = r525928 * r525935;
double r525937 = r525925 * r525928;
double r525938 = r525937 / r525929;
double r525939 = r525936 - r525938;
double r525940 = r525925 + r525939;
double r525941 = r525934 ? r525932 : r525940;
return r525941;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 2.0 |
|---|---|
| Target | 2.2 |
| Herbie | 2.5 |
if (+ x (* (- y x) (/ z t))) < 2.099420613792782e+251Initial program 1.3
if 2.099420613792782e+251 < (+ x (* (- y x) (/ z t))) Initial program 9.4
rmApplied *-un-lft-identity9.4
Applied add-cube-cbrt9.9
Applied times-frac9.9
Applied associate-*r*11.7
Simplified11.7
Taylor expanded around 0 13.5
rmApplied *-un-lft-identity13.5
Applied times-frac16.4
Simplified16.4
Final simplification2.5
herbie shell --seed 2020034
(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))))