\frac{x \cdot y}{z}\begin{array}{l}
\mathbf{if}\;\frac{x \cdot y}{z} = -\infty:\\
\;\;\;\;\frac{x}{z} \cdot y\\
\mathbf{elif}\;\frac{x \cdot y}{z} \le -1.6297677216893168 \cdot 10^{-306}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{\sqrt[3]{z} \cdot \sqrt[3]{z}} \cdot \frac{x}{\frac{\sqrt[3]{z}}{\sqrt[3]{y}}}\\
\end{array}double f(double x, double y, double z) {
double r794311 = x;
double r794312 = y;
double r794313 = r794311 * r794312;
double r794314 = z;
double r794315 = r794313 / r794314;
return r794315;
}
double f(double x, double y, double z) {
double r794316 = x;
double r794317 = y;
double r794318 = r794316 * r794317;
double r794319 = z;
double r794320 = r794318 / r794319;
double r794321 = -inf.0;
bool r794322 = r794320 <= r794321;
double r794323 = r794316 / r794319;
double r794324 = r794323 * r794317;
double r794325 = -1.6297677216893168e-306;
bool r794326 = r794320 <= r794325;
double r794327 = cbrt(r794317);
double r794328 = r794327 * r794327;
double r794329 = cbrt(r794319);
double r794330 = r794329 * r794329;
double r794331 = r794328 / r794330;
double r794332 = r794329 / r794327;
double r794333 = r794316 / r794332;
double r794334 = r794331 * r794333;
double r794335 = r794326 ? r794320 : r794334;
double r794336 = r794322 ? r794324 : r794335;
return r794336;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.4 |
|---|---|
| Target | 6.3 |
| Herbie | 1.2 |
if (/ (* x y) z) < -inf.0Initial program 64.0
rmApplied associate-/l*0.3
rmApplied associate-/r/0.2
if -inf.0 < (/ (* x y) z) < -1.6297677216893168e-306Initial program 0.6
if -1.6297677216893168e-306 < (/ (* x y) z) Initial program 7.4
rmApplied associate-/l*5.2
rmApplied add-cube-cbrt5.8
Applied add-cube-cbrt6.0
Applied times-frac6.0
Applied *-un-lft-identity6.0
Applied times-frac1.7
Simplified1.6
Final simplification1.2
herbie shell --seed 2020049
(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))