\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\begin{array}{l}
\mathbf{if}\;a \le -2.2439891650814672 \cdot 10^{-88}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - z}{\sqrt[3]{a - t} \cdot \sqrt[3]{a - t}} \cdot \frac{\sqrt{1}}{\sqrt[3]{a - t}}, y, x + y\right)\\
\mathbf{elif}\;a \le 5.6339865852383654 \cdot 10^{29}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{t}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t - z}{a - t} \cdot y + \left(x + y\right)\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r553179 = x;
double r553180 = y;
double r553181 = r553179 + r553180;
double r553182 = z;
double r553183 = t;
double r553184 = r553182 - r553183;
double r553185 = r553184 * r553180;
double r553186 = a;
double r553187 = r553186 - r553183;
double r553188 = r553185 / r553187;
double r553189 = r553181 - r553188;
return r553189;
}
double f(double x, double y, double z, double t, double a) {
double r553190 = a;
double r553191 = -2.2439891650814672e-88;
bool r553192 = r553190 <= r553191;
double r553193 = t;
double r553194 = z;
double r553195 = r553193 - r553194;
double r553196 = r553190 - r553193;
double r553197 = cbrt(r553196);
double r553198 = r553197 * r553197;
double r553199 = r553195 / r553198;
double r553200 = 1.0;
double r553201 = sqrt(r553200);
double r553202 = r553201 / r553197;
double r553203 = r553199 * r553202;
double r553204 = y;
double r553205 = x;
double r553206 = r553205 + r553204;
double r553207 = fma(r553203, r553204, r553206);
double r553208 = 5.6339865852383654e+29;
bool r553209 = r553190 <= r553208;
double r553210 = r553194 / r553193;
double r553211 = fma(r553210, r553204, r553205);
double r553212 = r553195 / r553196;
double r553213 = r553212 * r553204;
double r553214 = r553213 + r553206;
double r553215 = r553209 ? r553211 : r553214;
double r553216 = r553192 ? r553207 : r553215;
return r553216;
}




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.2 |
| Herbie | 9.7 |
if a < -2.2439891650814672e-88Initial program 15.1
Simplified8.1
rmApplied div-inv8.1
rmApplied add-cube-cbrt8.2
Applied add-sqr-sqrt8.2
Applied times-frac8.2
Applied associate-*r*8.2
Simplified8.2
if -2.2439891650814672e-88 < a < 5.6339865852383654e+29Initial program 19.2
Simplified18.2
Taylor expanded around inf 14.8
Simplified13.6
if 5.6339865852383654e+29 < a Initial program 14.2
Simplified5.3
rmApplied fma-udef5.3
Final simplification9.7
herbie shell --seed 2020046 +o rules:numerics
(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-07) (- (+ y x) (* (* (- z t) (/ 1 (- 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 (- a t))) y))))
(- (+ x y) (/ (* (- z t) y) (- a t))))