\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -2.8045670485597684 \cdot 10^{72}:\\
\;\;\;\;x \cdot \left(-y\right)\\
\mathbf{elif}\;z \le 3.39666918434105311 \cdot 10^{81}:\\
\;\;\;\;x \cdot \frac{y \cdot z}{\sqrt{z \cdot z - t \cdot a}}\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r187418 = x;
double r187419 = y;
double r187420 = r187418 * r187419;
double r187421 = z;
double r187422 = r187420 * r187421;
double r187423 = r187421 * r187421;
double r187424 = t;
double r187425 = a;
double r187426 = r187424 * r187425;
double r187427 = r187423 - r187426;
double r187428 = sqrt(r187427);
double r187429 = r187422 / r187428;
return r187429;
}
double f(double x, double y, double z, double t, double a) {
double r187430 = z;
double r187431 = -2.8045670485597684e+72;
bool r187432 = r187430 <= r187431;
double r187433 = x;
double r187434 = y;
double r187435 = -r187434;
double r187436 = r187433 * r187435;
double r187437 = 3.396669184341053e+81;
bool r187438 = r187430 <= r187437;
double r187439 = r187434 * r187430;
double r187440 = r187430 * r187430;
double r187441 = t;
double r187442 = a;
double r187443 = r187441 * r187442;
double r187444 = r187440 - r187443;
double r187445 = sqrt(r187444);
double r187446 = r187439 / r187445;
double r187447 = r187433 * r187446;
double r187448 = r187434 * r187433;
double r187449 = r187438 ? r187447 : r187448;
double r187450 = r187432 ? r187436 : r187449;
return r187450;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 25.3 |
|---|---|
| Target | 7.9 |
| Herbie | 7.2 |
if z < -2.8045670485597684e+72Initial program 41.1
rmApplied add-sqr-sqrt41.1
Applied sqrt-prod41.2
Applied times-frac39.6
rmApplied *-un-lft-identity39.6
Applied sqrt-prod39.6
Applied sqrt-prod39.6
Applied times-frac40.1
Applied associate-*l*39.1
Taylor expanded around -inf 3.8
Simplified3.8
if -2.8045670485597684e+72 < z < 3.396669184341053e+81Initial program 11.6
rmApplied add-sqr-sqrt11.6
Applied sqrt-prod11.8
Applied times-frac11.2
rmApplied *-un-lft-identity11.2
Applied sqrt-prod11.2
Applied sqrt-prod11.2
Applied times-frac11.7
Applied associate-*l*10.5
rmApplied frac-times11.0
Simplified10.8
if 3.396669184341053e+81 < z Initial program 41.1
rmApplied add-sqr-sqrt41.1
Applied sqrt-prod41.2
Applied times-frac39.8
rmApplied associate-*l/39.7
Taylor expanded around inf 2.4
Simplified2.4
Final simplification7.2
herbie shell --seed 2019199
(FPCore (x y z t a)
:name "Statistics.Math.RootFinding:ridders from math-functions-0.1.5.2"
: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)))))