\frac{x \cdot y}{z}\begin{array}{l}
\mathbf{if}\;x \cdot y = -\infty:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;x \cdot y \le -8.262890138825605465511184669818653865175 \cdot 10^{-174} \lor \neg \left(x \cdot y \le 1.775239536769126579734755404861004766773 \cdot 10^{-219}\right) \land x \cdot y \le 4.654103577641758604718829078963007975589 \cdot 10^{206}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot y\\
\end{array}double f(double x, double y, double z) {
double r549280 = x;
double r549281 = y;
double r549282 = r549280 * r549281;
double r549283 = z;
double r549284 = r549282 / r549283;
return r549284;
}
double f(double x, double y, double z) {
double r549285 = x;
double r549286 = y;
double r549287 = r549285 * r549286;
double r549288 = -inf.0;
bool r549289 = r549287 <= r549288;
double r549290 = z;
double r549291 = r549286 / r549290;
double r549292 = r549285 * r549291;
double r549293 = -8.262890138825605e-174;
bool r549294 = r549287 <= r549293;
double r549295 = 1.7752395367691266e-219;
bool r549296 = r549287 <= r549295;
double r549297 = !r549296;
double r549298 = 4.6541035776417586e+206;
bool r549299 = r549287 <= r549298;
bool r549300 = r549297 && r549299;
bool r549301 = r549294 || r549300;
double r549302 = r549287 / r549290;
double r549303 = r549285 / r549290;
double r549304 = r549303 * r549286;
double r549305 = r549301 ? r549302 : r549304;
double r549306 = r549289 ? r549292 : r549305;
return r549306;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.5 |
|---|---|
| Target | 6.5 |
| Herbie | 0.4 |
if (* x y) < -inf.0Initial program 64.0
rmApplied *-un-lft-identity64.0
Applied times-frac0.3
Simplified0.3
if -inf.0 < (* x y) < -8.262890138825605e-174 or 1.7752395367691266e-219 < (* x y) < 4.6541035776417586e+206Initial program 0.2
if -8.262890138825605e-174 < (* x y) < 1.7752395367691266e-219 or 4.6541035776417586e+206 < (* x y) Initial program 13.4
rmApplied associate-/l*0.8
rmApplied associate-/r/0.7
Final simplification0.4
herbie shell --seed 2019326 +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))