\frac{x \cdot y}{z}\begin{array}{l}
\mathbf{if}\;x \cdot y \le -1.005819449333334765447075052665383266355 \cdot 10^{141}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{elif}\;x \cdot y \le -6.34222541448496204100028812111103077968 \cdot 10^{-175}:\\
\;\;\;\;\frac{1}{z \cdot \frac{1}{x \cdot y}}\\
\mathbf{elif}\;x \cdot y \le 1.973790963784374190322581308699654202128 \cdot 10^{-123}:\\
\;\;\;\;\frac{y}{\frac{z}{x}}\\
\mathbf{elif}\;x \cdot y \le 2.652501867890780483390436172253209237796 \cdot 10^{102}:\\
\;\;\;\;\frac{1}{z \cdot \frac{1}{x \cdot y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\end{array}double f(double x, double y, double z) {
double r471426 = x;
double r471427 = y;
double r471428 = r471426 * r471427;
double r471429 = z;
double r471430 = r471428 / r471429;
return r471430;
}
double f(double x, double y, double z) {
double r471431 = x;
double r471432 = y;
double r471433 = r471431 * r471432;
double r471434 = -1.0058194493333348e+141;
bool r471435 = r471433 <= r471434;
double r471436 = z;
double r471437 = r471436 / r471432;
double r471438 = r471431 / r471437;
double r471439 = -6.342225414484962e-175;
bool r471440 = r471433 <= r471439;
double r471441 = 1.0;
double r471442 = r471441 / r471433;
double r471443 = r471436 * r471442;
double r471444 = r471441 / r471443;
double r471445 = 1.9737909637843742e-123;
bool r471446 = r471433 <= r471445;
double r471447 = r471436 / r471431;
double r471448 = r471432 / r471447;
double r471449 = 2.6525018678907805e+102;
bool r471450 = r471433 <= r471449;
double r471451 = r471450 ? r471444 : r471438;
double r471452 = r471446 ? r471448 : r471451;
double r471453 = r471440 ? r471444 : r471452;
double r471454 = r471435 ? r471438 : r471453;
return r471454;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.0 |
|---|---|
| Target | 6.5 |
| Herbie | 1.4 |
if (* x y) < -1.0058194493333348e+141 or 2.6525018678907805e+102 < (* x y) Initial program 15.3
rmApplied clear-num15.4
rmApplied *-un-lft-identity15.4
Applied add-cube-cbrt15.4
Applied times-frac15.4
Simplified15.4
Simplified2.7
if -1.0058194493333348e+141 < (* x y) < -6.342225414484962e-175 or 1.9737909637843742e-123 < (* x y) < 2.6525018678907805e+102Initial program 0.3
rmApplied clear-num0.6
rmApplied div-inv0.6
if -6.342225414484962e-175 < (* x y) < 1.9737909637843742e-123Initial program 7.9
rmApplied clear-num8.3
rmApplied div-inv8.9
Taylor expanded around 0 7.9
Simplified1.5
Final simplification1.4
herbie shell --seed 2019322 +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))