\frac{x \cdot y}{z}\begin{array}{l}
\mathbf{if}\;x \cdot y \le -1.20767702168173617 \cdot 10^{-132} \lor \neg \left(x \cdot y \le 0.0 \lor \neg \left(x \cdot y \le 1.4448027941880176 \cdot 10^{194}\right)\right):\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\end{array}double f(double x, double y, double z) {
double r801451 = x;
double r801452 = y;
double r801453 = r801451 * r801452;
double r801454 = z;
double r801455 = r801453 / r801454;
return r801455;
}
double f(double x, double y, double z) {
double r801456 = x;
double r801457 = y;
double r801458 = r801456 * r801457;
double r801459 = -1.2076770216817362e-132;
bool r801460 = r801458 <= r801459;
double r801461 = 0.0;
bool r801462 = r801458 <= r801461;
double r801463 = 1.4448027941880176e+194;
bool r801464 = r801458 <= r801463;
double r801465 = !r801464;
bool r801466 = r801462 || r801465;
double r801467 = !r801466;
bool r801468 = r801460 || r801467;
double r801469 = z;
double r801470 = r801458 / r801469;
double r801471 = r801469 / r801457;
double r801472 = r801456 / r801471;
double r801473 = r801468 ? r801470 : r801472;
return r801473;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.3 |
|---|---|
| Target | 6.2 |
| Herbie | 2.2 |
if (* x y) < -1.2076770216817362e-132 or 0.0 < (* x y) < 1.4448027941880176e+194Initial program 2.8
if -1.2076770216817362e-132 < (* x y) < 0.0 or 1.4448027941880176e+194 < (* x y) Initial program 13.7
rmApplied associate-/l*1.0
Final simplification2.2
herbie shell --seed 2020024 +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))