\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 -7.121739380084154 \cdot 10^{-271}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{elif}\;x \cdot y \le -0.0:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{elif}\;x \cdot y \le 8.8208746245571606 \cdot 10^{264}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\end{array}double f(double x, double y, double z) {
double r4307 = x;
double r4308 = y;
double r4309 = r4307 * r4308;
double r4310 = z;
double r4311 = r4309 / r4310;
return r4311;
}
double f(double x, double y, double z) {
double r4312 = x;
double r4313 = y;
double r4314 = r4312 * r4313;
double r4315 = -inf.0;
bool r4316 = r4314 <= r4315;
double r4317 = z;
double r4318 = r4313 / r4317;
double r4319 = r4312 * r4318;
double r4320 = -7.121739380084154e-271;
bool r4321 = r4314 <= r4320;
double r4322 = r4314 / r4317;
double r4323 = -0.0;
bool r4324 = r4314 <= r4323;
double r4325 = r4317 / r4313;
double r4326 = r4312 / r4325;
double r4327 = 8.82087462455716e+264;
bool r4328 = r4314 <= r4327;
double r4329 = r4328 ? r4322 : r4326;
double r4330 = r4324 ? r4326 : r4329;
double r4331 = r4321 ? r4322 : r4330;
double r4332 = r4316 ? r4319 : r4331;
return r4332;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.4 |
|---|---|
| Target | 6.5 |
| Herbie | 0.3 |
if (* x y) < -inf.0Initial program 64.0
rmApplied *-un-lft-identity64.0
Applied times-frac0.3
Simplified0.3
if -inf.0 < (* x y) < -7.121739380084154e-271 or -0.0 < (* x y) < 8.82087462455716e+264Initial program 0.3
if -7.121739380084154e-271 < (* x y) < -0.0 or 8.82087462455716e+264 < (* x y) Initial program 22.7
rmApplied associate-/l*0.1
Final simplification0.3
herbie shell --seed 2020025
(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))