\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\begin{array}{l}
\mathbf{if}\;t \le -1.841694990887126029027896419805954252502 \cdot 10^{165}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{t}, y, x\right)\\
\mathbf{elif}\;t \le -2.942786587816137231875687799555257197742 \cdot 10^{-122}:\\
\;\;\;\;\mathsf{fma}\left(t - z, \frac{1}{a - t} \cdot y, y + x\right)\\
\mathbf{elif}\;t \le 2.575849815118883486050979955176521796067 \cdot 10^{-98}:\\
\;\;\;\;\left(y \cdot \left(t - z\right)\right) \cdot \frac{1}{a - t} + \left(y + x\right)\\
\mathbf{elif}\;t \le 2.676545850642375828953340925870918680267 \cdot 10^{52}:\\
\;\;\;\;\mathsf{fma}\left(t - z, \frac{1}{a - t} \cdot y, y + x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{t}, y, x\right)\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r28633911 = x;
double r28633912 = y;
double r28633913 = r28633911 + r28633912;
double r28633914 = z;
double r28633915 = t;
double r28633916 = r28633914 - r28633915;
double r28633917 = r28633916 * r28633912;
double r28633918 = a;
double r28633919 = r28633918 - r28633915;
double r28633920 = r28633917 / r28633919;
double r28633921 = r28633913 - r28633920;
return r28633921;
}
double f(double x, double y, double z, double t, double a) {
double r28633922 = t;
double r28633923 = -1.841694990887126e+165;
bool r28633924 = r28633922 <= r28633923;
double r28633925 = z;
double r28633926 = r28633925 / r28633922;
double r28633927 = y;
double r28633928 = x;
double r28633929 = fma(r28633926, r28633927, r28633928);
double r28633930 = -2.942786587816137e-122;
bool r28633931 = r28633922 <= r28633930;
double r28633932 = r28633922 - r28633925;
double r28633933 = 1.0;
double r28633934 = a;
double r28633935 = r28633934 - r28633922;
double r28633936 = r28633933 / r28633935;
double r28633937 = r28633936 * r28633927;
double r28633938 = r28633927 + r28633928;
double r28633939 = fma(r28633932, r28633937, r28633938);
double r28633940 = 2.5758498151188835e-98;
bool r28633941 = r28633922 <= r28633940;
double r28633942 = r28633927 * r28633932;
double r28633943 = r28633942 * r28633936;
double r28633944 = r28633943 + r28633938;
double r28633945 = 2.676545850642376e+52;
bool r28633946 = r28633922 <= r28633945;
double r28633947 = r28633946 ? r28633939 : r28633929;
double r28633948 = r28633941 ? r28633944 : r28633947;
double r28633949 = r28633931 ? r28633939 : r28633948;
double r28633950 = r28633924 ? r28633929 : r28633949;
return r28633950;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
| Original | 16.6 |
|---|---|
| Target | 8.4 |
| Herbie | 8.9 |
if t < -1.841694990887126e+165 or 2.676545850642376e+52 < t Initial program 31.1
Simplified22.3
Taylor expanded around inf 18.0
Simplified12.6
if -1.841694990887126e+165 < t < -2.942786587816137e-122 or 2.5758498151188835e-98 < t < 2.676545850642376e+52Initial program 12.7
Simplified8.7
rmApplied clear-num8.7
rmApplied div-inv8.8
Applied add-cube-cbrt8.8
Applied times-frac8.7
Simplified8.7
Simplified8.7
if -2.942786587816137e-122 < t < 2.5758498151188835e-98Initial program 4.7
Simplified3.9
rmApplied fma-udef3.9
rmApplied div-inv3.9
Applied associate-*r*4.7
Final simplification8.9
herbie shell --seed 2019170 +o rules:numerics
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
:herbie-target
(if (< (- (+ x y) (/ (* (- z t) y) (- a t))) -1.3664970889390727e-07) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y)) (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) 1.4754293444577233e-239) (/ (- (* y (- a z)) (* x t)) (- a t)) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y))))
(- (+ x y) (/ (* (- z t) y) (- a t))))