x + \frac{y \cdot \left(z - t\right)}{a - t}\begin{array}{l}
\mathbf{if}\;z \le -1.396782542908176268213433022188939989147 \cdot 10^{278}:\\
\;\;\;\;x + \frac{y}{a - t} \cdot \left(z - t\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{a - t} \cdot y + \mathsf{fma}\left(y, \frac{-t}{a - t}, x\right)\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r20013883 = x;
double r20013884 = y;
double r20013885 = z;
double r20013886 = t;
double r20013887 = r20013885 - r20013886;
double r20013888 = r20013884 * r20013887;
double r20013889 = a;
double r20013890 = r20013889 - r20013886;
double r20013891 = r20013888 / r20013890;
double r20013892 = r20013883 + r20013891;
return r20013892;
}
double f(double x, double y, double z, double t, double a) {
double r20013893 = z;
double r20013894 = -1.3967825429081763e+278;
bool r20013895 = r20013893 <= r20013894;
double r20013896 = x;
double r20013897 = y;
double r20013898 = a;
double r20013899 = t;
double r20013900 = r20013898 - r20013899;
double r20013901 = r20013897 / r20013900;
double r20013902 = r20013893 - r20013899;
double r20013903 = r20013901 * r20013902;
double r20013904 = r20013896 + r20013903;
double r20013905 = r20013893 / r20013900;
double r20013906 = r20013905 * r20013897;
double r20013907 = -r20013899;
double r20013908 = r20013907 / r20013900;
double r20013909 = fma(r20013897, r20013908, r20013896);
double r20013910 = r20013906 + r20013909;
double r20013911 = r20013895 ? r20013904 : r20013910;
return r20013911;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
| Original | 11.2 |
|---|---|
| Target | 1.2 |
| Herbie | 1.2 |
if z < -1.3967825429081763e+278Initial program 15.9
Simplified6.8
rmApplied fma-udef6.8
if -1.3967825429081763e+278 < z Initial program 11.1
Simplified2.9
rmApplied fma-udef2.9
rmApplied div-inv3.0
Applied associate-*l*1.2
Simplified1.1
rmApplied div-sub1.1
rmApplied sub-neg1.1
Applied distribute-lft-in1.1
Applied associate-+l+1.1
Simplified1.1
Final simplification1.2
herbie shell --seed 2019170 +o rules:numerics
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
:herbie-target
(+ x (/ y (/ (- a t) (- z t))))
(+ x (/ (* y (- z t)) (- a t))))