\frac{x \cdot y}{z}\begin{array}{l}
\mathbf{if}\;x \cdot y = -\infty:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{elif}\;x \cdot y \le -7.92636400136768842 \cdot 10^{-208}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{elif}\;x \cdot y \le 2.68166276423310295 \cdot 10^{-233}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;x \cdot y \le 7.8533070445434405 \cdot 10^{220}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{\frac{z}{y}}{x}}\\
\end{array}double f(double x, double y, double z) {
double r722549 = x;
double r722550 = y;
double r722551 = r722549 * r722550;
double r722552 = z;
double r722553 = r722551 / r722552;
return r722553;
}
double f(double x, double y, double z) {
double r722554 = x;
double r722555 = y;
double r722556 = r722554 * r722555;
double r722557 = -inf.0;
bool r722558 = r722556 <= r722557;
double r722559 = z;
double r722560 = r722559 / r722555;
double r722561 = r722554 / r722560;
double r722562 = -7.926364001367688e-208;
bool r722563 = r722556 <= r722562;
double r722564 = r722556 / r722559;
double r722565 = 2.681662764233103e-233;
bool r722566 = r722556 <= r722565;
double r722567 = r722555 / r722559;
double r722568 = r722554 * r722567;
double r722569 = 7.85330704454344e+220;
bool r722570 = r722556 <= r722569;
double r722571 = 1.0;
double r722572 = r722560 / r722554;
double r722573 = r722571 / r722572;
double r722574 = r722570 ? r722564 : r722573;
double r722575 = r722566 ? r722568 : r722574;
double r722576 = r722563 ? r722564 : r722575;
double r722577 = r722558 ? r722561 : r722576;
return r722577;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.6 |
|---|---|
| Target | 6.5 |
| Herbie | 0.3 |
if (* x y) < -inf.0Initial program 64.0
rmApplied associate-/l*0.3
if -inf.0 < (* x y) < -7.926364001367688e-208 or 2.681662764233103e-233 < (* x y) < 7.85330704454344e+220Initial program 0.3
if -7.926364001367688e-208 < (* x y) < 2.681662764233103e-233Initial program 11.8
rmApplied *-un-lft-identity11.8
Applied times-frac0.4
Simplified0.4
if 7.85330704454344e+220 < (* x y) Initial program 31.8
rmApplied associate-/l*0.8
rmApplied clear-num0.9
Final simplification0.3
herbie shell --seed 2020064
(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))