\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 -3.303760412052484390435489424481917742401 \cdot 10^{-243} \lor \neg \left(x \cdot y \le 6.866383191027284350312248499135040834178 \cdot 10^{-240}\right) \land x \cdot y \le 8.123647290761479259839095592609619592255 \cdot 10^{143}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\end{array}double f(double x, double y, double z) {
double r523179 = x;
double r523180 = y;
double r523181 = r523179 * r523180;
double r523182 = z;
double r523183 = r523181 / r523182;
return r523183;
}
double f(double x, double y, double z) {
double r523184 = x;
double r523185 = y;
double r523186 = r523184 * r523185;
double r523187 = -inf.0;
bool r523188 = r523186 <= r523187;
double r523189 = z;
double r523190 = r523185 / r523189;
double r523191 = r523184 * r523190;
double r523192 = -3.3037604120524844e-243;
bool r523193 = r523186 <= r523192;
double r523194 = 6.866383191027284e-240;
bool r523195 = r523186 <= r523194;
double r523196 = !r523195;
double r523197 = 8.12364729076148e+143;
bool r523198 = r523186 <= r523197;
bool r523199 = r523196 && r523198;
bool r523200 = r523193 || r523199;
double r523201 = r523186 / r523189;
double r523202 = r523189 / r523185;
double r523203 = r523184 / r523202;
double r523204 = r523200 ? r523201 : r523203;
double r523205 = r523188 ? r523191 : r523204;
return r523205;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.0 |
|---|---|
| Target | 6.0 |
| Herbie | 0.5 |
if (* x y) < -inf.0Initial program 64.0
rmApplied *-un-lft-identity64.0
Applied times-frac0.2
Simplified0.2
if -inf.0 < (* x y) < -3.3037604120524844e-243 or 6.866383191027284e-240 < (* x y) < 8.12364729076148e+143Initial program 0.2
if -3.3037604120524844e-243 < (* x y) < 6.866383191027284e-240 or 8.12364729076148e+143 < (* x y) Initial program 13.8
rmApplied associate-/l*0.9
Final simplification0.5
herbie shell --seed 2019209
(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.70421306606504721e-164) (/ x (/ z y)) (* (/ x z) y)))
(/ (* x y) z))