\frac{x \cdot y}{z}\begin{array}{l}
\mathbf{if}\;\frac{x \cdot y}{z} = -\infty:\\
\;\;\;\;{\left(\frac{x}{\frac{z}{y}}\right)}^{1}\\
\mathbf{elif}\;\frac{x \cdot y}{z} \le -2.75403327231568085421125185005337842666 \cdot 10^{-316}:\\
\;\;\;\;{\left(\frac{x \cdot y}{z}\right)}^{1}\\
\mathbf{elif}\;\frac{x \cdot y}{z} \le 0.0:\\
\;\;\;\;{\left(x \cdot \frac{y}{z}\right)}^{1}\\
\mathbf{elif}\;\frac{x \cdot y}{z} \le 3.90915317948964794762777056224645120804 \cdot 10^{266}:\\
\;\;\;\;{\left(\frac{x \cdot y}{z}\right)}^{1}\\
\mathbf{else}:\\
\;\;\;\;{\left(x \cdot \frac{y}{z}\right)}^{1}\\
\end{array}double f(double x, double y, double z) {
double r748317 = x;
double r748318 = y;
double r748319 = r748317 * r748318;
double r748320 = z;
double r748321 = r748319 / r748320;
return r748321;
}
double f(double x, double y, double z) {
double r748322 = x;
double r748323 = y;
double r748324 = r748322 * r748323;
double r748325 = z;
double r748326 = r748324 / r748325;
double r748327 = -inf.0;
bool r748328 = r748326 <= r748327;
double r748329 = r748325 / r748323;
double r748330 = r748322 / r748329;
double r748331 = 1.0;
double r748332 = pow(r748330, r748331);
double r748333 = -2.7540332723157e-316;
bool r748334 = r748326 <= r748333;
double r748335 = pow(r748326, r748331);
double r748336 = 0.0;
bool r748337 = r748326 <= r748336;
double r748338 = r748323 / r748325;
double r748339 = r748322 * r748338;
double r748340 = pow(r748339, r748331);
double r748341 = 3.909153179489648e+266;
bool r748342 = r748326 <= r748341;
double r748343 = r748342 ? r748335 : r748340;
double r748344 = r748337 ? r748340 : r748343;
double r748345 = r748334 ? r748335 : r748344;
double r748346 = r748328 ? r748332 : r748345;
return r748346;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.5 |
|---|---|
| Target | 6.5 |
| Herbie | 0.7 |
if (/ (* x y) z) < -inf.0Initial program 64.0
rmApplied add-cube-cbrt64.0
Applied times-frac1.3
rmApplied pow11.3
Applied pow11.3
Applied pow-prod-down1.3
Simplified64.0
rmApplied associate-/l*0.2
if -inf.0 < (/ (* x y) z) < -2.7540332723157e-316 or 0.0 < (/ (* x y) z) < 3.909153179489648e+266Initial program 2.2
rmApplied add-cube-cbrt3.2
Applied times-frac6.4
rmApplied pow16.4
Applied pow16.4
Applied pow-prod-down6.4
Simplified2.2
if -2.7540332723157e-316 < (/ (* x y) z) < 0.0 or 3.909153179489648e+266 < (/ (* x y) z) Initial program 18.8
rmApplied add-cube-cbrt18.9
Applied times-frac2.1
rmApplied pow12.1
Applied pow12.1
Applied pow-prod-down2.1
Simplified18.8
rmApplied div-inv18.8
rmApplied associate-*l*2.1
Simplified2.1
Final simplification0.7
herbie shell --seed 2020001
(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))