x \cdot \frac{\frac{y}{z} \cdot t}{t}\begin{array}{l}
\mathbf{if}\;\frac{y}{z} \le -6.29544524415545219149038523268139908958 \cdot 10^{285}:\\
\;\;\;\;\left(x \cdot y\right) \cdot \frac{1}{z}\\
\mathbf{elif}\;\frac{y}{z} \le -1.575588880456927846517204610144689059531 \cdot 10^{-286}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{elif}\;\frac{y}{z} \le 3.757059281014894097749857788400547545613 \cdot 10^{-220}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{elif}\;\frac{y}{z} \le 1.409130514825537046443418609777720419861 \cdot 10^{217}:\\
\;\;\;\;\frac{y}{z} \cdot x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\end{array}double f(double x, double y, double z, double t) {
double r494641 = x;
double r494642 = y;
double r494643 = z;
double r494644 = r494642 / r494643;
double r494645 = t;
double r494646 = r494644 * r494645;
double r494647 = r494646 / r494645;
double r494648 = r494641 * r494647;
return r494648;
}
double f(double x, double y, double z, double __attribute__((unused)) t) {
double r494649 = y;
double r494650 = z;
double r494651 = r494649 / r494650;
double r494652 = -6.295445244155452e+285;
bool r494653 = r494651 <= r494652;
double r494654 = x;
double r494655 = r494654 * r494649;
double r494656 = 1.0;
double r494657 = r494656 / r494650;
double r494658 = r494655 * r494657;
double r494659 = -1.5755888804569278e-286;
bool r494660 = r494651 <= r494659;
double r494661 = r494650 / r494649;
double r494662 = r494654 / r494661;
double r494663 = 3.757059281014894e-220;
bool r494664 = r494651 <= r494663;
double r494665 = r494655 / r494650;
double r494666 = 1.409130514825537e+217;
bool r494667 = r494651 <= r494666;
double r494668 = r494651 * r494654;
double r494669 = r494654 / r494650;
double r494670 = r494649 * r494669;
double r494671 = r494667 ? r494668 : r494670;
double r494672 = r494664 ? r494665 : r494671;
double r494673 = r494660 ? r494662 : r494672;
double r494674 = r494653 ? r494658 : r494673;
return r494674;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 14.7 |
|---|---|
| Target | 1.6 |
| Herbie | 0.3 |
if (/ y z) < -6.295445244155452e+285Initial program 58.1
Simplified0.2
rmApplied div-inv0.3
if -6.295445244155452e+285 < (/ y z) < -1.5755888804569278e-286Initial program 10.7
Simplified7.7
rmApplied associate-/l*0.2
if -1.5755888804569278e-286 < (/ y z) < 3.757059281014894e-220Initial program 18.8
Simplified0.3
rmApplied associate-/l*15.6
Taylor expanded around 0 0.3
if 3.757059281014894e-220 < (/ y z) < 1.409130514825537e+217Initial program 8.1
Simplified9.2
rmApplied associate-/l*0.2
Taylor expanded around 0 9.2
rmApplied *-un-lft-identity9.2
Applied times-frac0.2
Simplified0.2
if 1.409130514825537e+217 < (/ y z) Initial program 44.0
Simplified1.0
rmApplied associate-/l*29.0
Taylor expanded around 0 1.0
Taylor expanded around 0 1.0
Simplified0.4
Final simplification0.3
herbie shell --seed 2019194
(FPCore (x y z t)
:name "Graphics.Rendering.Chart.Backend.Diagrams:calcFontMetrics from Chart-diagrams-1.5.1, B"
:herbie-target
(if (< (/ (* (/ y z) t) t) -1.20672205123045e+245) (/ y (/ z x)) (if (< (/ (* (/ y z) t) t) -5.907522236933906e-275) (* x (/ y z)) (if (< (/ (* (/ y z) t) t) 5.658954423153415e-65) (/ y (/ z x)) (if (< (/ (* (/ y z) t) t) 2.0087180502407133e+217) (* x (/ y z)) (/ (* y x) z)))))
(* x (/ (* (/ y z) t) t)))