\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 r790453 = x;
double r790454 = y;
double r790455 = r790453 * r790454;
double r790456 = z;
double r790457 = r790455 / r790456;
return r790457;
}
double f(double x, double y, double z) {
double r790458 = x;
double r790459 = y;
double r790460 = r790458 * r790459;
double r790461 = -inf.0;
bool r790462 = r790460 <= r790461;
double r790463 = z;
double r790464 = r790459 / r790463;
double r790465 = r790458 * r790464;
double r790466 = -7.121739380084154e-271;
bool r790467 = r790460 <= r790466;
double r790468 = r790460 / r790463;
double r790469 = -0.0;
bool r790470 = r790460 <= r790469;
double r790471 = r790463 / r790459;
double r790472 = r790458 / r790471;
double r790473 = 8.82087462455716e+264;
bool r790474 = r790460 <= r790473;
double r790475 = r790474 ? r790468 : r790472;
double r790476 = r790470 ? r790472 : r790475;
double r790477 = r790467 ? r790468 : r790476;
double r790478 = r790462 ? r790465 : r790477;
return r790478;
}




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
(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))