\frac{x \cdot y}{z}\begin{array}{l}
\mathbf{if}\;x \cdot y \le -1.4388707905139013 \cdot 10^{211} \lor \neg \left(x \cdot y \le -2.8697693066874046 \cdot 10^{-264} \lor \neg \left(x \cdot y \le 1.0101772655541281 \cdot 10^{-183}\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 r725267 = x;
double r725268 = y;
double r725269 = r725267 * r725268;
double r725270 = z;
double r725271 = r725269 / r725270;
return r725271;
}
double f(double x, double y, double z) {
double r725272 = x;
double r725273 = y;
double r725274 = r725272 * r725273;
double r725275 = -1.4388707905139013e+211;
bool r725276 = r725274 <= r725275;
double r725277 = -2.8697693066874046e-264;
bool r725278 = r725274 <= r725277;
double r725279 = 1.0101772655541281e-183;
bool r725280 = r725274 <= r725279;
double r725281 = !r725280;
bool r725282 = r725278 || r725281;
double r725283 = !r725282;
bool r725284 = r725276 || r725283;
double r725285 = z;
double r725286 = r725285 / r725273;
double r725287 = r725272 / r725286;
double r725288 = r725274 / r725285;
double r725289 = r725284 ? r725287 : r725288;
return r725289;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.0 |
|---|---|
| Target | 6.4 |
| Herbie | 1.7 |
if (* x y) < -1.4388707905139013e+211 or -2.8697693066874046e-264 < (* x y) < 1.0101772655541281e-183Initial program 14.8
rmApplied associate-/l*0.5
if -1.4388707905139013e+211 < (* x y) < -2.8697693066874046e-264 or 1.0101772655541281e-183 < (* x y) Initial program 2.2
Final simplification1.7
herbie shell --seed 2020033 +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))