\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\begin{array}{l}
\mathbf{if}\;a \le -8.94712349400520929 \cdot 10^{-168}:\\
\;\;\;\;\mathsf{fma}\left(\sqrt[3]{y \cdot \frac{t - z}{a - t}} \cdot \sqrt[3]{y \cdot \frac{t - z}{a - t}}, \sqrt[3]{y \cdot \frac{t - z}{a - t}}, x + y\right)\\
\mathbf{elif}\;a \le 8.2322134775541335 \cdot 10^{-92}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{t}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\sqrt[3]{y \cdot \frac{t - z}{a - t}} \cdot \sqrt[3]{y \cdot \frac{t - z}{a - t}}\right) \cdot \sqrt[3]{y \cdot \frac{t - z}{a - t}} + \left(x + y\right)\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r704148 = x;
double r704149 = y;
double r704150 = r704148 + r704149;
double r704151 = z;
double r704152 = t;
double r704153 = r704151 - r704152;
double r704154 = r704153 * r704149;
double r704155 = a;
double r704156 = r704155 - r704152;
double r704157 = r704154 / r704156;
double r704158 = r704150 - r704157;
return r704158;
}
double f(double x, double y, double z, double t, double a) {
double r704159 = a;
double r704160 = -8.94712349400521e-168;
bool r704161 = r704159 <= r704160;
double r704162 = y;
double r704163 = t;
double r704164 = z;
double r704165 = r704163 - r704164;
double r704166 = r704159 - r704163;
double r704167 = r704165 / r704166;
double r704168 = r704162 * r704167;
double r704169 = cbrt(r704168);
double r704170 = r704169 * r704169;
double r704171 = x;
double r704172 = r704171 + r704162;
double r704173 = fma(r704170, r704169, r704172);
double r704174 = 8.232213477554133e-92;
bool r704175 = r704159 <= r704174;
double r704176 = r704164 / r704163;
double r704177 = fma(r704176, r704162, r704171);
double r704178 = r704170 * r704169;
double r704179 = r704178 + r704172;
double r704180 = r704175 ? r704177 : r704179;
double r704181 = r704161 ? r704173 : r704180;
return r704181;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
| Original | 16.5 |
|---|---|
| Target | 8.5 |
| Herbie | 8.7 |
if a < -8.94712349400521e-168Initial program 15.3
Simplified9.1
rmApplied fma-udef9.1
rmApplied div-inv9.1
rmApplied add-cube-cbrt9.3
Simplified9.3
Simplified9.3
rmApplied fma-def9.3
if -8.94712349400521e-168 < a < 8.232213477554133e-92Initial program 20.7
Simplified19.5
Taylor expanded around inf 10.1
Simplified8.9
if 8.232213477554133e-92 < a Initial program 14.5
Simplified7.6
rmApplied fma-udef7.6
rmApplied div-inv7.6
rmApplied add-cube-cbrt7.8
Simplified7.8
Simplified7.8
Final simplification8.7
herbie shell --seed 2020047 +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))))