\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -8.6183547901220424 \cdot 10^{153}:\\
\;\;\;\;-x \cdot y\\
\mathbf{elif}\;z \le 6.9260668882011419 \cdot 10^{147}:\\
\;\;\;\;y \cdot \left(x \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 r66330 = x;
double r66331 = y;
double r66332 = r66330 * r66331;
double r66333 = z;
double r66334 = r66332 * r66333;
double r66335 = r66333 * r66333;
double r66336 = t;
double r66337 = a;
double r66338 = r66336 * r66337;
double r66339 = r66335 - r66338;
double r66340 = sqrt(r66339);
double r66341 = r66334 / r66340;
return r66341;
}
double f(double x, double y, double z, double t, double a) {
double r66342 = z;
double r66343 = -8.618354790122042e+153;
bool r66344 = r66342 <= r66343;
double r66345 = x;
double r66346 = y;
double r66347 = r66345 * r66346;
double r66348 = -r66347;
double r66349 = 6.926066888201142e+147;
bool r66350 = r66342 <= r66349;
double r66351 = r66342 * r66342;
double r66352 = t;
double r66353 = a;
double r66354 = r66352 * r66353;
double r66355 = r66351 - r66354;
double r66356 = sqrt(r66355);
double r66357 = r66342 / r66356;
double r66358 = r66345 * r66357;
double r66359 = r66346 * r66358;
double r66360 = r66350 ? r66359 : r66347;
double r66361 = r66344 ? r66348 : r66360;
return r66361;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 24.2 |
|---|---|
| Target | 7.7 |
| Herbie | 6.2 |
if z < -8.618354790122042e+153Initial program 54.0
Taylor expanded around -inf 1.1
Simplified1.1
if -8.618354790122042e+153 < z < 6.926066888201142e+147Initial program 11.2
rmApplied *-un-lft-identity11.2
Applied sqrt-prod11.2
Applied times-frac8.7
Simplified8.7
rmApplied associate-*l*8.4
if 6.926066888201142e+147 < z Initial program 51.6
rmApplied *-un-lft-identity51.6
Applied sqrt-prod51.6
Applied times-frac51.0
Simplified51.0
rmApplied associate-*l*51.0
rmApplied add-cube-cbrt51.0
Applied add-cube-cbrt51.0
Applied times-frac51.0
Applied associate-*r*51.0
Taylor expanded around inf 1.2
Final simplification6.2
herbie shell --seed 2020045 +o rules:numerics
(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)))))