\frac{x \cdot y}{z}\begin{array}{l}
\mathbf{if}\;x \cdot y = -\infty:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;x \cdot y \le -7.121739380084154 \cdot 10^{-271}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{elif}\;x \cdot y \le -0.0:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{elif}\;x \cdot y \le 8.8208746245571606 \cdot 10^{264}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\end{array}double f(double x, double y, double z) {
double r3522 = x;
double r3523 = y;
double r3524 = r3522 * r3523;
double r3525 = z;
double r3526 = r3524 / r3525;
return r3526;
}
double f(double x, double y, double z) {
double r3527 = x;
double r3528 = y;
double r3529 = r3527 * r3528;
double r3530 = -inf.0;
bool r3531 = r3529 <= r3530;
double r3532 = z;
double r3533 = r3528 / r3532;
double r3534 = r3527 * r3533;
double r3535 = -7.121739380084154e-271;
bool r3536 = r3529 <= r3535;
double r3537 = r3529 / r3532;
double r3538 = -0.0;
bool r3539 = r3529 <= r3538;
double r3540 = r3532 / r3528;
double r3541 = r3527 / r3540;
double r3542 = 8.82087462455716e+264;
bool r3543 = r3529 <= r3542;
double r3544 = r3543 ? r3537 : r3541;
double r3545 = r3539 ? r3541 : r3544;
double r3546 = r3536 ? r3537 : r3545;
double r3547 = r3531 ? r3534 : r3546;
return r3547;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.4 |
|---|---|
| Target | 6.5 |
| Herbie | 0.3 |
if (* x y) < -inf.0Initial program 64.0
rmApplied *-un-lft-identity64.0
Applied times-frac0.3
Simplified0.3
if -inf.0 < (* x y) < -7.121739380084154e-271 or -0.0 < (* x y) < 8.82087462455716e+264Initial program 0.3
if -7.121739380084154e-271 < (* x y) < -0.0 or 8.82087462455716e+264 < (* x y) Initial program 22.7
rmApplied associate-/l*0.1
Final simplification0.3
herbie shell --seed 2020025 +o rules:numerics
(FPCore (x y z)
:name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, A"
:precision binary64
:herbie-target
(if (< z -4.262230790519429e-138) (/ (* x y) z) (if (< z 1.7042130660650472e-164) (/ x (/ z y)) (* (/ x z) y)))
(/ (* x y) z))