\frac{x \cdot y}{z}\begin{array}{l}
\mathbf{if}\;x \cdot y \le -6.19747986177150750809252245117595786488 \cdot 10^{145}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;x \cdot y \le -3.552575327556019379295511877737835951597 \cdot 10^{-209}:\\
\;\;\;\;\left(x \cdot y\right) \cdot \frac{1}{z}\\
\mathbf{elif}\;x \cdot y \le 1.185107420516714761464092917105521838974 \cdot 10^{-194}:\\
\;\;\;\;1 \cdot \frac{x}{\frac{z}{y}}\\
\mathbf{elif}\;x \cdot y \le 2.927841217235156761172687372675221348043 \cdot 10^{173}:\\
\;\;\;\;\left(x \cdot y\right) \cdot \frac{1}{z}\\
\mathbf{else}:\\
\;\;\;\;1 \cdot \frac{x}{\frac{z}{y}}\\
\end{array}double f(double x, double y, double z) {
double r904075 = x;
double r904076 = y;
double r904077 = r904075 * r904076;
double r904078 = z;
double r904079 = r904077 / r904078;
return r904079;
}
double f(double x, double y, double z) {
double r904080 = x;
double r904081 = y;
double r904082 = r904080 * r904081;
double r904083 = -6.197479861771508e+145;
bool r904084 = r904082 <= r904083;
double r904085 = z;
double r904086 = r904081 / r904085;
double r904087 = r904080 * r904086;
double r904088 = -3.5525753275560194e-209;
bool r904089 = r904082 <= r904088;
double r904090 = 1.0;
double r904091 = r904090 / r904085;
double r904092 = r904082 * r904091;
double r904093 = 1.1851074205167148e-194;
bool r904094 = r904082 <= r904093;
double r904095 = r904085 / r904081;
double r904096 = r904080 / r904095;
double r904097 = r904090 * r904096;
double r904098 = 2.927841217235157e+173;
bool r904099 = r904082 <= r904098;
double r904100 = r904099 ? r904092 : r904097;
double r904101 = r904094 ? r904097 : r904100;
double r904102 = r904089 ? r904092 : r904101;
double r904103 = r904084 ? r904087 : r904102;
return r904103;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 5.9 |
|---|---|
| Target | 6.1 |
| Herbie | 0.7 |
if (* x y) < -6.197479861771508e+145Initial program 17.4
rmApplied *-un-lft-identity17.4
Applied times-frac2.7
Simplified2.7
if -6.197479861771508e+145 < (* x y) < -3.5525753275560194e-209 or 1.1851074205167148e-194 < (* x y) < 2.927841217235157e+173Initial program 0.2
rmApplied div-inv0.3
if -3.5525753275560194e-209 < (* x y) < 1.1851074205167148e-194 or 2.927841217235157e+173 < (* x y) Initial program 12.7
rmApplied add-cube-cbrt13.1
Applied associate-/r*13.1
rmApplied *-un-lft-identity13.1
Applied cbrt-prod13.1
Applied *-un-lft-identity13.1
Applied times-frac13.1
Simplified13.1
Simplified0.8
Final simplification0.7
herbie shell --seed 2019362 +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))