\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -6.7050069327788126 \cdot 10^{76}:\\
\;\;\;\;-1 \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;z \le 6.2711743111954205 \cdot 10^{136}:\\
\;\;\;\;x \cdot \left(\left(y \cdot z\right) \cdot \frac{1}{\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 r352463 = x;
double r352464 = y;
double r352465 = r352463 * r352464;
double r352466 = z;
double r352467 = r352465 * r352466;
double r352468 = r352466 * r352466;
double r352469 = t;
double r352470 = a;
double r352471 = r352469 * r352470;
double r352472 = r352468 - r352471;
double r352473 = sqrt(r352472);
double r352474 = r352467 / r352473;
return r352474;
}
double f(double x, double y, double z, double t, double a) {
double r352475 = z;
double r352476 = -6.705006932778813e+76;
bool r352477 = r352475 <= r352476;
double r352478 = -1.0;
double r352479 = x;
double r352480 = y;
double r352481 = r352479 * r352480;
double r352482 = r352478 * r352481;
double r352483 = 6.27117431119542e+136;
bool r352484 = r352475 <= r352483;
double r352485 = r352480 * r352475;
double r352486 = 1.0;
double r352487 = r352475 * r352475;
double r352488 = t;
double r352489 = a;
double r352490 = r352488 * r352489;
double r352491 = r352487 - r352490;
double r352492 = sqrt(r352491);
double r352493 = r352486 / r352492;
double r352494 = r352485 * r352493;
double r352495 = r352479 * r352494;
double r352496 = r352484 ? r352495 : r352481;
double r352497 = r352477 ? r352482 : r352496;
return r352497;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 24.8 |
|---|---|
| Target | 7.9 |
| Herbie | 7.3 |
if z < -6.705006932778813e+76Initial program 41.0
rmApplied *-un-lft-identity41.0
Applied sqrt-prod41.0
Applied times-frac38.1
Simplified38.1
rmApplied associate-*l*38.1
Taylor expanded around -inf 2.9
if -6.705006932778813e+76 < z < 6.27117431119542e+136Initial program 11.0
rmApplied *-un-lft-identity11.0
Applied sqrt-prod11.0
Applied times-frac9.4
Simplified9.4
rmApplied associate-*l*9.2
rmApplied div-inv9.3
Applied associate-*r*10.6
if 6.27117431119542e+136 < z Initial program 50.5
rmApplied *-un-lft-identity50.5
Applied sqrt-prod50.5
Applied times-frac49.1
Simplified49.1
rmApplied associate-*l*49.1
Taylor expanded around inf 1.7
Final simplification7.3
herbie shell --seed 2020062 +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)))))