\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\begin{array}{l}
\mathbf{if}\;t \le -1.89442403115317649 \cdot 10^{171} \lor \neg \left(t \le 2.00789644304095614 \cdot 10^{115}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{t}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\frac{\sqrt[3]{t - z} \cdot \sqrt[3]{t - z}}{\frac{\sqrt[3]{a - t}}{\sqrt[3]{y}}}}{\frac{\sqrt[3]{a - t}}{\sqrt[3]{y}}}, \frac{\sqrt[3]{t - z}}{\frac{\sqrt[3]{a - t}}{\sqrt[3]{y}}}, x + y\right)\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r583862 = x;
double r583863 = y;
double r583864 = r583862 + r583863;
double r583865 = z;
double r583866 = t;
double r583867 = r583865 - r583866;
double r583868 = r583867 * r583863;
double r583869 = a;
double r583870 = r583869 - r583866;
double r583871 = r583868 / r583870;
double r583872 = r583864 - r583871;
return r583872;
}
double f(double x, double y, double z, double t, double a) {
double r583873 = t;
double r583874 = -1.8944240311531765e+171;
bool r583875 = r583873 <= r583874;
double r583876 = 2.007896443040956e+115;
bool r583877 = r583873 <= r583876;
double r583878 = !r583877;
bool r583879 = r583875 || r583878;
double r583880 = z;
double r583881 = r583880 / r583873;
double r583882 = y;
double r583883 = x;
double r583884 = fma(r583881, r583882, r583883);
double r583885 = r583873 - r583880;
double r583886 = cbrt(r583885);
double r583887 = r583886 * r583886;
double r583888 = a;
double r583889 = r583888 - r583873;
double r583890 = cbrt(r583889);
double r583891 = cbrt(r583882);
double r583892 = r583890 / r583891;
double r583893 = r583887 / r583892;
double r583894 = r583893 / r583892;
double r583895 = r583886 / r583892;
double r583896 = r583883 + r583882;
double r583897 = fma(r583894, r583895, r583896);
double r583898 = r583879 ? r583884 : r583897;
return r583898;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
| Original | 16.3 |
|---|---|
| Target | 8.3 |
| Herbie | 7.6 |
if t < -1.8944240311531765e+171 or 2.007896443040956e+115 < t Initial program 32.2
Simplified23.2
rmApplied clear-num23.2
rmApplied fma-udef23.2
Simplified23.3
Taylor expanded around inf 17.2
Simplified11.6
if -1.8944240311531765e+171 < t < 2.007896443040956e+115Initial program 9.9
Simplified7.5
rmApplied clear-num7.6
rmApplied fma-udef7.6
Simplified7.4
rmApplied add-cube-cbrt7.7
Applied add-cube-cbrt7.7
Applied times-frac7.7
Applied add-cube-cbrt7.7
Applied times-frac6.1
Applied fma-def6.1
rmApplied times-frac6.1
Applied associate-/r*6.0
Final simplification7.6
herbie shell --seed 2020089 +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))))