\frac{x \cdot y}{z}\begin{array}{l}
\mathbf{if}\;x \cdot y \le -7.725807749934587 \cdot 10^{96}:\\
\;\;\;\;\frac{x}{z} \cdot y\\
\mathbf{elif}\;x \cdot y \le -3.0807367441454416 \cdot 10^{-282}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{elif}\;x \cdot y \le -0.0:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;x \cdot y \le 5.31151602867187701 \cdot 10^{255}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{1}{\frac{x}{\frac{z}{y}}}}\\
\end{array}double f(double x, double y, double z) {
double r791946 = x;
double r791947 = y;
double r791948 = r791946 * r791947;
double r791949 = z;
double r791950 = r791948 / r791949;
return r791950;
}
double f(double x, double y, double z) {
double r791951 = x;
double r791952 = y;
double r791953 = r791951 * r791952;
double r791954 = -7.725807749934587e+96;
bool r791955 = r791953 <= r791954;
double r791956 = z;
double r791957 = r791951 / r791956;
double r791958 = r791957 * r791952;
double r791959 = -3.0807367441454416e-282;
bool r791960 = r791953 <= r791959;
double r791961 = r791953 / r791956;
double r791962 = -0.0;
bool r791963 = r791953 <= r791962;
double r791964 = r791952 / r791956;
double r791965 = r791951 * r791964;
double r791966 = 5.311516028671877e+255;
bool r791967 = r791953 <= r791966;
double r791968 = 1.0;
double r791969 = r791956 / r791952;
double r791970 = r791951 / r791969;
double r791971 = r791968 / r791970;
double r791972 = r791968 / r791971;
double r791973 = r791967 ? r791961 : r791972;
double r791974 = r791963 ? r791965 : r791973;
double r791975 = r791960 ? r791961 : r791974;
double r791976 = r791955 ? r791958 : r791975;
return r791976;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.3 |
|---|---|
| Target | 6.4 |
| Herbie | 0.8 |
if (* x y) < -7.725807749934587e+96Initial program 14.6
rmApplied associate-/l*3.3
rmApplied associate-/r/4.1
if -7.725807749934587e+96 < (* x y) < -3.0807367441454416e-282 or -0.0 < (* x y) < 5.311516028671877e+255Initial program 0.4
if -3.0807367441454416e-282 < (* x y) < -0.0Initial program 17.6
rmApplied *-un-lft-identity17.6
Applied times-frac0.1
Simplified0.1
if 5.311516028671877e+255 < (* x y) Initial program 40.0
rmApplied associate-/l*0.3
rmApplied clear-num0.3
rmApplied *-un-lft-identity0.3
Applied *-un-lft-identity0.3
Applied times-frac0.3
Applied associate-/l*0.4
Final simplification0.8
herbie shell --seed 2020060
(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))