x + \frac{y \cdot \left(z - t\right)}{a - t}\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(z - t\right)}{a - t} \le -7.619609112581202273765869446605205908105 \cdot 10^{120}:\\
\;\;\;\;\frac{z - t}{a - t} \cdot y + x\\
\mathbf{elif}\;\frac{y \cdot \left(z - t\right)}{a - t} \le 2.141643850967665421502672143203672013512 \cdot 10^{280}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{a - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{z - t}{\frac{a - t}{y}} + x\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r650054 = x;
double r650055 = y;
double r650056 = z;
double r650057 = t;
double r650058 = r650056 - r650057;
double r650059 = r650055 * r650058;
double r650060 = a;
double r650061 = r650060 - r650057;
double r650062 = r650059 / r650061;
double r650063 = r650054 + r650062;
return r650063;
}
double f(double x, double y, double z, double t, double a) {
double r650064 = y;
double r650065 = z;
double r650066 = t;
double r650067 = r650065 - r650066;
double r650068 = r650064 * r650067;
double r650069 = a;
double r650070 = r650069 - r650066;
double r650071 = r650068 / r650070;
double r650072 = -7.619609112581202e+120;
bool r650073 = r650071 <= r650072;
double r650074 = r650067 / r650070;
double r650075 = r650074 * r650064;
double r650076 = x;
double r650077 = r650075 + r650076;
double r650078 = 2.1416438509676654e+280;
bool r650079 = r650071 <= r650078;
double r650080 = r650076 + r650071;
double r650081 = r650070 / r650064;
double r650082 = r650067 / r650081;
double r650083 = r650082 + r650076;
double r650084 = r650079 ? r650080 : r650083;
double r650085 = r650073 ? r650077 : r650084;
return r650085;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 10.9 |
|---|---|
| Target | 1.3 |
| Herbie | 0.7 |
if (/ (* y (- z t)) (- a t)) < -7.619609112581202e+120Initial program 35.7
Simplified3.0
rmApplied div-inv3.1
rmApplied fma-udef3.1
Simplified3.0
rmApplied clear-num3.1
rmApplied associate-/r/3.1
Applied associate-*r*3.1
Simplified3.0
if -7.619609112581202e+120 < (/ (* y (- z t)) (- a t)) < 2.1416438509676654e+280Initial program 0.2
if 2.1416438509676654e+280 < (/ (* y (- z t)) (- a t)) Initial program 59.8
Simplified1.3
rmApplied div-inv1.4
rmApplied fma-udef1.4
Simplified1.3
rmApplied clear-num1.4
rmApplied pow11.4
Applied pow11.4
Applied pow-prod-down1.4
Simplified1.2
Final simplification0.7
herbie shell --seed 2019351 +o rules:numerics
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
:precision binary64
:herbie-target
(+ x (/ y (/ (- a t) (- z t))))
(+ x (/ (* y (- z t)) (- a t))))