\frac{x \cdot y}{z}\begin{array}{l}
\mathbf{if}\;x \cdot y \le -1.926622627642983907222823390598358692722 \cdot 10^{158}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;x \cdot y \le -1.247759449621090803465755159668841719159 \cdot 10^{-277} \lor \neg \left(x \cdot y \le 1.137508288798888459719974341598011528755 \cdot 10^{-219}\right):\\
\;\;\;\;\left(x \cdot y\right) \cdot \frac{1}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{z}{x}}\\
\end{array}double f(double x, double y, double z) {
double r595134 = x;
double r595135 = y;
double r595136 = r595134 * r595135;
double r595137 = z;
double r595138 = r595136 / r595137;
return r595138;
}
double f(double x, double y, double z) {
double r595139 = x;
double r595140 = y;
double r595141 = r595139 * r595140;
double r595142 = -1.926622627642984e+158;
bool r595143 = r595141 <= r595142;
double r595144 = z;
double r595145 = r595140 / r595144;
double r595146 = r595139 * r595145;
double r595147 = -1.2477594496210908e-277;
bool r595148 = r595141 <= r595147;
double r595149 = 1.1375082887988885e-219;
bool r595150 = r595141 <= r595149;
double r595151 = !r595150;
bool r595152 = r595148 || r595151;
double r595153 = 1.0;
double r595154 = r595153 / r595144;
double r595155 = r595141 * r595154;
double r595156 = r595144 / r595139;
double r595157 = r595140 / r595156;
double r595158 = r595152 ? r595155 : r595157;
double r595159 = r595143 ? r595146 : r595158;
return r595159;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.2 |
|---|---|
| Target | 6.0 |
| Herbie | 1.9 |
if (* x y) < -1.926622627642984e+158Initial program 20.0
rmApplied *-un-lft-identity20.0
Applied times-frac2.1
Simplified2.1
if -1.926622627642984e+158 < (* x y) < -1.2477594496210908e-277 or 1.1375082887988885e-219 < (* x y) Initial program 2.3
rmApplied div-inv2.4
if -1.2477594496210908e-277 < (* x y) < 1.1375082887988885e-219Initial program 13.6
rmApplied clear-num14.0
rmApplied add-cube-cbrt14.0
Applied associate-/l*14.0
Simplified14.0
rmApplied *-un-lft-identity14.0
Applied times-frac1.1
Applied associate-/r*0.4
Simplified0.3
Final simplification1.9
herbie shell --seed 2019212
(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))