\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 r1425223 = x;
double r1425224 = y;
double r1425225 = r1425223 * r1425224;
double r1425226 = z;
double r1425227 = r1425225 / r1425226;
return r1425227;
}
double f(double x, double y, double z) {
double r1425228 = x;
double r1425229 = y;
double r1425230 = r1425228 * r1425229;
double r1425231 = z;
double r1425232 = r1425230 / r1425231;
double r1425233 = -inf.0;
bool r1425234 = r1425232 <= r1425233;
double r1425235 = 1.0;
double r1425236 = r1425231 / r1425228;
double r1425237 = r1425236 / r1425229;
double r1425238 = r1425235 / r1425237;
double r1425239 = -8.924200914805229e-307;
bool r1425240 = r1425232 <= r1425239;
double r1425241 = 0.0;
bool r1425242 = r1425232 <= r1425241;
double r1425243 = r1425231 / r1425229;
double r1425244 = r1425228 / r1425243;
double r1425245 = 3.0241590046493684e+292;
bool r1425246 = r1425232 <= r1425245;
double r1425247 = r1425229 / r1425231;
double r1425248 = r1425228 * r1425247;
double r1425249 = r1425246 ? r1425232 : r1425248;
double r1425250 = r1425242 ? r1425244 : r1425249;
double r1425251 = r1425240 ? r1425232 : r1425250;
double r1425252 = r1425234 ? r1425238 : r1425251;
return r1425252;
}




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 +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))