\frac{x \cdot y}{z}\begin{array}{l}
\mathbf{if}\;z \le 2.39259709741611536 \cdot 10^{-307}:\\
\;\;\;\;\frac{x}{z} \cdot y\\
\mathbf{elif}\;z \le 1.08745764864859695 \cdot 10^{-70}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{elif}\;z \le 1.4101106747621872 \cdot 10^{212}:\\
\;\;\;\;\frac{x}{z} \cdot y\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\end{array}double f(double x, double y, double z) {
double r457247 = x;
double r457248 = y;
double r457249 = r457247 * r457248;
double r457250 = z;
double r457251 = r457249 / r457250;
return r457251;
}
double f(double x, double y, double z) {
double r457252 = z;
double r457253 = 2.3925970974161154e-307;
bool r457254 = r457252 <= r457253;
double r457255 = x;
double r457256 = r457255 / r457252;
double r457257 = y;
double r457258 = r457256 * r457257;
double r457259 = 1.087457648648597e-70;
bool r457260 = r457252 <= r457259;
double r457261 = r457252 / r457257;
double r457262 = r457255 / r457261;
double r457263 = 1.4101106747621872e+212;
bool r457264 = r457252 <= r457263;
double r457265 = r457257 / r457252;
double r457266 = r457255 * r457265;
double r457267 = r457264 ? r457258 : r457266;
double r457268 = r457260 ? r457262 : r457267;
double r457269 = r457254 ? r457258 : r457268;
return r457269;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.2 |
|---|---|
| Target | 6.2 |
| Herbie | 6.3 |
if z < 2.3925970974161154e-307 or 1.087457648648597e-70 < z < 1.4101106747621872e+212Initial program 5.3
rmApplied *-un-lft-identity5.3
Applied times-frac5.2
Simplified5.2
rmApplied *-un-lft-identity5.2
Applied add-cube-cbrt6.0
Applied times-frac6.0
Applied associate-*r*4.4
Simplified4.4
Taylor expanded around 0 5.3
Simplified5.8
if 2.3925970974161154e-307 < z < 1.087457648648597e-70Initial program 9.3
rmApplied associate-/l*8.6
if 1.4101106747621872e+212 < z Initial program 7.6
rmApplied *-un-lft-identity7.6
Applied times-frac7.2
Simplified7.2
Final simplification6.3
herbie shell --seed 2019198
(FPCore (x y z)
:name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, A"
:herbie-target
(if (< z -4.262230790519429e-138) (/ (* x y) z) (if (< z 1.7042130660650472e-164) (/ x (/ z y)) (* (/ x z) y)))
(/ (* x y) z))