\frac{x \cdot y}{z}\begin{array}{l}
\mathbf{if}\;x \cdot y = -\infty:\\
\;\;\;\;\frac{x}{z} \cdot y\\
\mathbf{elif}\;x \cdot y \le -2.666618308604909 \cdot 10^{-248}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{elif}\;x \cdot y \le 1.291536027190061 \cdot 10^{-88}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;x \cdot y \le 2.0802670635728964 \cdot 10^{198}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot y\\
\end{array}double f(double x, double y, double z) {
double r734263 = x;
double r734264 = y;
double r734265 = r734263 * r734264;
double r734266 = z;
double r734267 = r734265 / r734266;
return r734267;
}
double f(double x, double y, double z) {
double r734268 = x;
double r734269 = y;
double r734270 = r734268 * r734269;
double r734271 = -inf.0;
bool r734272 = r734270 <= r734271;
double r734273 = z;
double r734274 = r734268 / r734273;
double r734275 = r734274 * r734269;
double r734276 = -2.666618308604909e-248;
bool r734277 = r734270 <= r734276;
double r734278 = r734270 / r734273;
double r734279 = 1.291536027190061e-88;
bool r734280 = r734270 <= r734279;
double r734281 = r734269 / r734273;
double r734282 = r734268 * r734281;
double r734283 = 2.0802670635728964e+198;
bool r734284 = r734270 <= r734283;
double r734285 = r734284 ? r734278 : r734275;
double r734286 = r734280 ? r734282 : r734285;
double r734287 = r734277 ? r734278 : r734286;
double r734288 = r734272 ? r734275 : r734287;
return r734288;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.3 |
|---|---|
| Target | 6.0 |
| Herbie | 0.8 |
if (* x y) < -inf.0 or 2.0802670635728964e+198 < (* x y) Initial program 38.5
rmApplied associate-/l*1.0
rmApplied associate-/r/0.9
if -inf.0 < (* x y) < -2.666618308604909e-248 or 1.291536027190061e-88 < (* x y) < 2.0802670635728964e+198Initial program 0.2
if -2.666618308604909e-248 < (* x y) < 1.291536027190061e-88Initial program 8.6
rmApplied *-un-lft-identity8.6
Applied times-frac1.6
Simplified1.6
Final simplification0.8
herbie shell --seed 2020036 +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))