\frac{x \cdot y}{z}\begin{array}{l}
\mathbf{if}\;x \cdot y \le -5.899145090483621243407591608868938844895 \cdot 10^{275}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;x \cdot y \le -4.740188247183417662311772579191743839341 \cdot 10^{-201}:\\
\;\;\;\;\frac{1}{z} \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;x \cdot y \le 2.796489205112816623953257005668039638224 \cdot 10^{-171}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{elif}\;x \cdot y \le 2.345913877288735097014094340963252524817 \cdot 10^{180}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\end{array}double f(double x, double y, double z) {
double r28530127 = x;
double r28530128 = y;
double r28530129 = r28530127 * r28530128;
double r28530130 = z;
double r28530131 = r28530129 / r28530130;
return r28530131;
}
double f(double x, double y, double z) {
double r28530132 = x;
double r28530133 = y;
double r28530134 = r28530132 * r28530133;
double r28530135 = -5.899145090483621e+275;
bool r28530136 = r28530134 <= r28530135;
double r28530137 = z;
double r28530138 = r28530133 / r28530137;
double r28530139 = r28530132 * r28530138;
double r28530140 = -4.740188247183418e-201;
bool r28530141 = r28530134 <= r28530140;
double r28530142 = 1.0;
double r28530143 = r28530142 / r28530137;
double r28530144 = r28530143 * r28530134;
double r28530145 = 2.7964892051128166e-171;
bool r28530146 = r28530134 <= r28530145;
double r28530147 = r28530137 / r28530133;
double r28530148 = r28530132 / r28530147;
double r28530149 = 2.345913877288735e+180;
bool r28530150 = r28530134 <= r28530149;
double r28530151 = r28530134 / r28530137;
double r28530152 = r28530150 ? r28530151 : r28530148;
double r28530153 = r28530146 ? r28530148 : r28530152;
double r28530154 = r28530141 ? r28530144 : r28530153;
double r28530155 = r28530136 ? r28530139 : r28530154;
return r28530155;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.2 |
|---|---|
| Target | 6.3 |
| Herbie | 0.5 |
if (* x y) < -5.899145090483621e+275Initial program 49.2
rmApplied *-un-lft-identity49.2
Applied times-frac0.4
Simplified0.4
if -5.899145090483621e+275 < (* x y) < -4.740188247183418e-201Initial program 0.3
rmApplied div-inv0.3
if -4.740188247183418e-201 < (* x y) < 2.7964892051128166e-171 or 2.345913877288735e+180 < (* x y) Initial program 11.6
rmApplied associate-/l*0.8
if 2.7964892051128166e-171 < (* x y) < 2.345913877288735e+180Initial program 0.3
Final simplification0.5
herbie shell --seed 2019171 +o rules:numerics
(FPCore (x y z)
:name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, A"
:herbie-target
(if (< z -4.262230790519429e-138) (/ (* x y) z) (if (< z 1.7042130660650472e-164) (/ x (/ z y)) (* (/ x z) y)))
(/ (* x y) z))