\frac{x \cdot y}{z}\begin{array}{l}
\mathbf{if}\;\frac{x \cdot y}{z} = -\infty:\\
\;\;\;\;\frac{1}{\frac{\frac{z}{x}}{y}}\\
\mathbf{elif}\;\frac{x \cdot y}{z} \le -8.92420091480522906 \cdot 10^{-307}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{elif}\;\frac{x \cdot y}{z} \le 0.0:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{elif}\;\frac{x \cdot y}{z} \le 3.0241590046493684 \cdot 10^{292}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\end{array}double f(double x, double y, double z) {
double r734274 = x;
double r734275 = y;
double r734276 = r734274 * r734275;
double r734277 = z;
double r734278 = r734276 / r734277;
return r734278;
}
double f(double x, double y, double z) {
double r734279 = x;
double r734280 = y;
double r734281 = r734279 * r734280;
double r734282 = z;
double r734283 = r734281 / r734282;
double r734284 = -inf.0;
bool r734285 = r734283 <= r734284;
double r734286 = 1.0;
double r734287 = r734282 / r734279;
double r734288 = r734287 / r734280;
double r734289 = r734286 / r734288;
double r734290 = -8.924200914805229e-307;
bool r734291 = r734283 <= r734290;
double r734292 = 0.0;
bool r734293 = r734283 <= r734292;
double r734294 = r734282 / r734280;
double r734295 = r734279 / r734294;
double r734296 = 3.0241590046493684e+292;
bool r734297 = r734283 <= r734296;
double r734298 = r734280 / r734282;
double r734299 = r734279 * r734298;
double r734300 = r734297 ? r734283 : r734299;
double r734301 = r734293 ? r734295 : r734300;
double r734302 = r734291 ? r734283 : r734301;
double r734303 = r734285 ? r734289 : r734302;
return r734303;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.0 |
|---|---|
| Target | 6.1 |
| Herbie | 0.5 |
if (/ (* x y) z) < -inf.0Initial program 64.0
rmApplied clear-num64.0
rmApplied associate-/r*0.3
if -inf.0 < (/ (* x y) z) < -8.924200914805229e-307 or 0.0 < (/ (* x y) z) < 3.0241590046493684e+292Initial program 0.5
if -8.924200914805229e-307 < (/ (* x y) z) < 0.0Initial program 10.7
rmApplied associate-/l*0.4
if 3.0241590046493684e+292 < (/ (* x y) z) Initial program 53.3
rmApplied *-un-lft-identity53.3
Applied times-frac3.1
Simplified3.1
Final simplification0.5
herbie shell --seed 2020034
(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))