\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -4.12938748087418624 \cdot 10^{99}:\\
\;\;\;\;x \cdot \left(-1 \cdot y\right)\\
\mathbf{elif}\;z \le 1.5571214549086307 \cdot 10^{71}:\\
\;\;\;\;x \cdot \left(y \cdot \frac{z}{\sqrt{z \cdot z - t \cdot a}}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r351818 = x;
double r351819 = y;
double r351820 = r351818 * r351819;
double r351821 = z;
double r351822 = r351820 * r351821;
double r351823 = r351821 * r351821;
double r351824 = t;
double r351825 = a;
double r351826 = r351824 * r351825;
double r351827 = r351823 - r351826;
double r351828 = sqrt(r351827);
double r351829 = r351822 / r351828;
return r351829;
}
double f(double x, double y, double z, double t, double a) {
double r351830 = z;
double r351831 = -4.129387480874186e+99;
bool r351832 = r351830 <= r351831;
double r351833 = x;
double r351834 = -1.0;
double r351835 = y;
double r351836 = r351834 * r351835;
double r351837 = r351833 * r351836;
double r351838 = 1.5571214549086307e+71;
bool r351839 = r351830 <= r351838;
double r351840 = r351830 * r351830;
double r351841 = t;
double r351842 = a;
double r351843 = r351841 * r351842;
double r351844 = r351840 - r351843;
double r351845 = sqrt(r351844);
double r351846 = r351830 / r351845;
double r351847 = r351835 * r351846;
double r351848 = r351833 * r351847;
double r351849 = r351833 * r351835;
double r351850 = r351839 ? r351848 : r351849;
double r351851 = r351832 ? r351837 : r351850;
return r351851;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 25.2 |
|---|---|
| Target | 7.6 |
| Herbie | 6.3 |
if z < -4.129387480874186e+99Initial program 43.5
rmApplied *-un-lft-identity43.5
Applied sqrt-prod43.5
Applied times-frac41.6
Simplified41.6
rmApplied associate-*l*41.6
Taylor expanded around -inf 2.2
if -4.129387480874186e+99 < z < 1.5571214549086307e+71Initial program 11.4
rmApplied *-un-lft-identity11.4
Applied sqrt-prod11.4
Applied times-frac9.9
Simplified9.9
rmApplied associate-*l*9.3
if 1.5571214549086307e+71 < z Initial program 40.2
Taylor expanded around inf 2.9
Final simplification6.3
herbie shell --seed 2020003
(FPCore (x y z t a)
:name "Statistics.Math.RootFinding:ridders from math-functions-0.1.5.2"
:precision binary64
:herbie-target
(if (< z -3.1921305903852764e+46) (- (* y x)) (if (< z 5.976268120920894e+90) (/ (* x z) (/ (sqrt (- (* z z) (* a t))) y)) (* y x)))
(/ (* (* x y) z) (sqrt (- (* z z) (* t a)))))