\frac{x \cdot y}{z}\begin{array}{l}
\mathbf{if}\;x \cdot y = -\infty:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;x \cdot y \le -1.8728392574617784 \cdot 10^{-186}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{elif}\;x \cdot y \le 2.83270628172182268 \cdot 10^{-206}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{elif}\;x \cdot y \le 1.4178882238079705 \cdot 10^{214}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot y\\
\end{array}double f(double x, double y, double z) {
double r704854 = x;
double r704855 = y;
double r704856 = r704854 * r704855;
double r704857 = z;
double r704858 = r704856 / r704857;
return r704858;
}
double f(double x, double y, double z) {
double r704859 = x;
double r704860 = y;
double r704861 = r704859 * r704860;
double r704862 = -inf.0;
bool r704863 = r704861 <= r704862;
double r704864 = z;
double r704865 = r704860 / r704864;
double r704866 = r704859 * r704865;
double r704867 = -1.8728392574617784e-186;
bool r704868 = r704861 <= r704867;
double r704869 = r704861 / r704864;
double r704870 = 2.8327062817218227e-206;
bool r704871 = r704861 <= r704870;
double r704872 = r704864 / r704860;
double r704873 = r704859 / r704872;
double r704874 = 1.4178882238079705e+214;
bool r704875 = r704861 <= r704874;
double r704876 = r704859 / r704864;
double r704877 = r704876 * r704860;
double r704878 = r704875 ? r704869 : r704877;
double r704879 = r704871 ? r704873 : r704878;
double r704880 = r704868 ? r704869 : r704879;
double r704881 = r704863 ? r704866 : r704880;
return r704881;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.7 |
|---|---|
| Target | 6.2 |
| Herbie | 0.4 |
if (* x y) < -inf.0Initial program 64.0
rmApplied *-un-lft-identity64.0
Applied times-frac0.3
Simplified0.3
if -inf.0 < (* x y) < -1.8728392574617784e-186 or 2.8327062817218227e-206 < (* x y) < 1.4178882238079705e+214Initial program 0.2
rmApplied associate-/l*9.0
Taylor expanded around 0 0.2
if -1.8728392574617784e-186 < (* x y) < 2.8327062817218227e-206Initial program 11.0
rmApplied associate-/l*0.5
if 1.4178882238079705e+214 < (* x y) Initial program 30.0
rmApplied associate-/l*1.0
rmApplied associate-/r/1.0
Final simplification0.4
herbie shell --seed 2020039
(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))