x + \frac{y \cdot \left(z - x\right)}{t}\begin{array}{l}
\mathbf{if}\;y \le 1.4262265949406686 \cdot 10^{-28}:\\
\;\;\;\;\left(x + \frac{z}{\frac{t}{y}}\right) - \frac{x}{\frac{t}{y}}\\
\mathbf{elif}\;y \le 1.5702655586275871 \cdot 10^{+199}:\\
\;\;\;\;y \cdot \frac{z - x}{t} + x\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{t} \cdot \left(z - x\right) + x\\
\end{array}double f(double x, double y, double z, double t) {
double r16621858 = x;
double r16621859 = y;
double r16621860 = z;
double r16621861 = r16621860 - r16621858;
double r16621862 = r16621859 * r16621861;
double r16621863 = t;
double r16621864 = r16621862 / r16621863;
double r16621865 = r16621858 + r16621864;
return r16621865;
}
double f(double x, double y, double z, double t) {
double r16621866 = y;
double r16621867 = 1.4262265949406686e-28;
bool r16621868 = r16621866 <= r16621867;
double r16621869 = x;
double r16621870 = z;
double r16621871 = t;
double r16621872 = r16621871 / r16621866;
double r16621873 = r16621870 / r16621872;
double r16621874 = r16621869 + r16621873;
double r16621875 = r16621869 / r16621872;
double r16621876 = r16621874 - r16621875;
double r16621877 = 1.5702655586275871e+199;
bool r16621878 = r16621866 <= r16621877;
double r16621879 = r16621870 - r16621869;
double r16621880 = r16621879 / r16621871;
double r16621881 = r16621866 * r16621880;
double r16621882 = r16621881 + r16621869;
double r16621883 = r16621866 / r16621871;
double r16621884 = r16621883 * r16621879;
double r16621885 = r16621884 + r16621869;
double r16621886 = r16621878 ? r16621882 : r16621885;
double r16621887 = r16621868 ? r16621876 : r16621886;
return r16621887;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 6.9 |
|---|---|
| Target | 2.1 |
| Herbie | 1.9 |
if y < 1.4262265949406686e-28Initial program 4.6
Taylor expanded around 0 4.6
Simplified1.8
rmApplied div-sub1.8
Applied associate-+r-1.8
if 1.4262265949406686e-28 < y < 1.5702655586275871e+199Initial program 9.9
Taylor expanded around 0 9.9
Simplified2.0
rmApplied associate-/r/0.9
if 1.5702655586275871e+199 < y Initial program 30.2
Taylor expanded around 0 30.2
Simplified5.8
rmApplied div-inv6.6
Simplified6.5
Final simplification1.9
herbie shell --seed 2019165
(FPCore (x y z t)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, D"
:herbie-target
(- x (+ (* x (/ y t)) (* (- z) (/ y t))))
(+ x (/ (* y (- z x)) t)))