\frac{x \cdot y}{z}\begin{array}{l}
\mathbf{if}\;x \cdot y \le -5.390377895817917772419668299668841422542 \cdot 10^{281} \lor \neg \left(x \cdot y \le -4.298687061087267567138297560273868903463 \cdot 10^{-207} \lor \neg \left(x \cdot y \le 2.409831597479541575498163389776208009711 \cdot 10^{-281} \lor \neg \left(x \cdot y \le 1.63604859057193362863482232436108847646 \cdot 10^{179}\right)\right)\right):\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\end{array}double f(double x, double y, double z) {
double r637583 = x;
double r637584 = y;
double r637585 = r637583 * r637584;
double r637586 = z;
double r637587 = r637585 / r637586;
return r637587;
}
double f(double x, double y, double z) {
double r637588 = x;
double r637589 = y;
double r637590 = r637588 * r637589;
double r637591 = -5.390377895817918e+281;
bool r637592 = r637590 <= r637591;
double r637593 = -4.2986870610872676e-207;
bool r637594 = r637590 <= r637593;
double r637595 = 2.4098315974795416e-281;
bool r637596 = r637590 <= r637595;
double r637597 = 1.6360485905719336e+179;
bool r637598 = r637590 <= r637597;
double r637599 = !r637598;
bool r637600 = r637596 || r637599;
double r637601 = !r637600;
bool r637602 = r637594 || r637601;
double r637603 = !r637602;
bool r637604 = r637592 || r637603;
double r637605 = z;
double r637606 = r637605 / r637589;
double r637607 = r637588 / r637606;
double r637608 = r637590 / r637605;
double r637609 = r637604 ? r637607 : r637608;
return r637609;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.0 |
|---|---|
| Target | 6.5 |
| Herbie | 0.4 |
if (* x y) < -5.390377895817918e+281 or -4.2986870610872676e-207 < (* x y) < 2.4098315974795416e-281 or 1.6360485905719336e+179 < (* x y) Initial program 18.5
rmApplied clear-num18.8
rmApplied *-un-lft-identity18.8
Applied add-cube-cbrt18.8
Applied times-frac18.8
Simplified18.8
Simplified18.5
rmApplied associate-/l*0.7
if -5.390377895817918e+281 < (* x y) < -4.2986870610872676e-207 or 2.4098315974795416e-281 < (* x y) < 1.6360485905719336e+179Initial program 0.2
rmApplied clear-num0.6
rmApplied *-un-lft-identity0.6
Applied add-cube-cbrt0.6
Applied times-frac0.6
Simplified0.6
Simplified0.2
Final simplification0.4
herbie shell --seed 2019322
(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.70421306606504721e-164) (/ x (/ z y)) (* (/ x z) y)))
(/ (* x y) z))