\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\begin{array}{l}
\mathbf{if}\;t \le -9.441885900140899165846736068361029145014 \cdot 10^{140}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\mathbf{elif}\;t \le 6.772624804214054808988189513933475870735 \cdot 10^{-48}:\\
\;\;\;\;x + \left(y - \frac{z - t}{\frac{a - t}{y}}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(1 - \left(z - t\right) \cdot \frac{1}{a - t}\right)\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r418906 = x;
double r418907 = y;
double r418908 = r418906 + r418907;
double r418909 = z;
double r418910 = t;
double r418911 = r418909 - r418910;
double r418912 = r418911 * r418907;
double r418913 = a;
double r418914 = r418913 - r418910;
double r418915 = r418912 / r418914;
double r418916 = r418908 - r418915;
return r418916;
}
double f(double x, double y, double z, double t, double a) {
double r418917 = t;
double r418918 = -9.4418859001409e+140;
bool r418919 = r418917 <= r418918;
double r418920 = x;
double r418921 = y;
double r418922 = z;
double r418923 = r418922 / r418917;
double r418924 = r418921 * r418923;
double r418925 = r418920 + r418924;
double r418926 = 6.772624804214055e-48;
bool r418927 = r418917 <= r418926;
double r418928 = r418922 - r418917;
double r418929 = a;
double r418930 = r418929 - r418917;
double r418931 = r418930 / r418921;
double r418932 = r418928 / r418931;
double r418933 = r418921 - r418932;
double r418934 = r418920 + r418933;
double r418935 = 1.0;
double r418936 = r418935 / r418930;
double r418937 = r418928 * r418936;
double r418938 = r418935 - r418937;
double r418939 = r418921 * r418938;
double r418940 = r418920 + r418939;
double r418941 = r418927 ? r418934 : r418940;
double r418942 = r418919 ? r418925 : r418941;
return r418942;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 17.0 |
|---|---|
| Target | 8.3 |
| Herbie | 7.9 |
if t < -9.4418859001409e+140Initial program 32.6
rmApplied associate-/l*24.1
rmApplied associate--l+17.2
rmApplied associate-/r/12.6
Applied *-un-lft-identity12.6
Applied distribute-rgt-out--12.5
Taylor expanded around inf 11.3
if -9.4418859001409e+140 < t < 6.772624804214055e-48Initial program 8.8
rmApplied associate-/l*6.3
rmApplied associate--l+5.2
if 6.772624804214055e-48 < t Initial program 24.1
rmApplied associate-/l*17.1
rmApplied associate--l+12.7
rmApplied associate-/r/10.1
Applied *-un-lft-identity10.1
Applied distribute-rgt-out--10.1
rmApplied div-inv11.1
Final simplification7.9
herbie shell --seed 2019212
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
:precision binary64
:herbie-target
(if (< (- (+ x y) (/ (* (- z t) y) (- a t))) -1.3664970889390727e-7) (- (+ y x) (* (* (- z t) (/ 1 (- a t))) y)) (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) 1.47542934445772333e-239) (/ (- (* y (- a z)) (* x t)) (- a t)) (- (+ y x) (* (* (- z t) (/ 1 (- a t))) y))))
(- (+ x y) (/ (* (- z t) y) (- a t))))