\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -4.610508646786433287550784748309774160666 \cdot 10^{104}:\\
\;\;\;\;-x \cdot y\\
\mathbf{elif}\;z \le 9.925985792422320279557825298855191033448 \cdot 10^{124}:\\
\;\;\;\;x \cdot \frac{y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r263307 = x;
double r263308 = y;
double r263309 = r263307 * r263308;
double r263310 = z;
double r263311 = r263309 * r263310;
double r263312 = r263310 * r263310;
double r263313 = t;
double r263314 = a;
double r263315 = r263313 * r263314;
double r263316 = r263312 - r263315;
double r263317 = sqrt(r263316);
double r263318 = r263311 / r263317;
return r263318;
}
double f(double x, double y, double z, double t, double a) {
double r263319 = z;
double r263320 = -4.610508646786433e+104;
bool r263321 = r263319 <= r263320;
double r263322 = x;
double r263323 = y;
double r263324 = r263322 * r263323;
double r263325 = -r263324;
double r263326 = 9.92598579242232e+124;
bool r263327 = r263319 <= r263326;
double r263328 = r263319 * r263319;
double r263329 = t;
double r263330 = a;
double r263331 = r263329 * r263330;
double r263332 = r263328 - r263331;
double r263333 = sqrt(r263332);
double r263334 = r263333 / r263319;
double r263335 = r263323 / r263334;
double r263336 = r263322 * r263335;
double r263337 = r263327 ? r263336 : r263324;
double r263338 = r263321 ? r263325 : r263337;
return r263338;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 25.0 |
|---|---|
| Target | 7.7 |
| Herbie | 6.2 |
if z < -4.610508646786433e+104Initial program 45.4
rmApplied associate-/l*43.4
rmApplied div-inv43.4
Simplified43.4
Taylor expanded around -inf 2.1
if -4.610508646786433e+104 < z < 9.92598579242232e+124Initial program 11.2
rmApplied associate-/l*9.2
rmApplied *-un-lft-identity9.2
Applied *-un-lft-identity9.2
Applied sqrt-prod9.2
Applied times-frac9.2
Applied times-frac9.0
Simplified9.0
if 9.92598579242232e+124 < z Initial program 47.3
rmApplied associate-/l*45.8
rmApplied div-inv45.8
Simplified45.8
Taylor expanded around inf 1.8
Final simplification6.2
herbie shell --seed 2019347 +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)))))