x \cdot \frac{\frac{y}{z} \cdot t}{t}x \cdot \frac{y}{z}double f(double x, double y, double z, double t) {
double r363840 = x;
double r363841 = y;
double r363842 = z;
double r363843 = r363841 / r363842;
double r363844 = t;
double r363845 = r363843 * r363844;
double r363846 = r363845 / r363844;
double r363847 = r363840 * r363846;
return r363847;
}
double f(double x, double y, double z, double __attribute__((unused)) t) {
double r363848 = x;
double r363849 = y;
double r363850 = z;
double r363851 = r363849 / r363850;
double r363852 = r363848 * r363851;
return r363852;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 14.5 |
|---|---|
| Target | 1.7 |
| Herbie | 6.2 |
if (/ y z) < 2.9568082620179477e-170Initial program 14.6
Simplified6.7
rmApplied *-un-lft-identity6.7
Applied add-cube-cbrt7.4
Applied times-frac7.4
Applied associate-*r*5.0
Simplified5.0
rmApplied associate-*r/5.9
Simplified5.1
rmApplied *-un-lft-identity5.1
Applied times-frac4.8
Simplified4.8
if 2.9568082620179477e-170 < (/ y z) < 1.2283202023430539e+235Initial program 9.2
Simplified0.3
if 1.2283202023430539e+235 < (/ y z) Initial program 46.0
Simplified35.4
rmApplied *-un-lft-identity35.4
Applied add-cube-cbrt35.9
Applied times-frac35.9
Applied associate-*r*9.4
Simplified9.4
rmApplied associate-*r/1.4
Simplified0.4
Taylor expanded around 0 0.4
Final simplification6.2
herbie shell --seed 2019304
(FPCore (x y z t)
:name "Graphics.Rendering.Chart.Backend.Diagrams:calcFontMetrics from Chart-diagrams-1.5.1, B"
:precision binary64
:herbie-target
(if (< (/ (* (/ y z) t) t) -1.20672205123045005e245) (/ y (/ z x)) (if (< (/ (* (/ y z) t) t) -5.90752223693390633e-275) (* x (/ y z)) (if (< (/ (* (/ y z) t) t) 5.65895442315341522e-65) (/ y (/ z x)) (if (< (/ (* (/ y z) t) t) 2.0087180502407133e217) (* x (/ y z)) (/ (* y x) z)))))
(* x (/ (* (/ y z) t) t)))