x \cdot \frac{\frac{y}{z} \cdot t}{t}\frac{x \cdot y}{z}double f(double x, double y, double z, double t) {
double r510136 = x;
double r510137 = y;
double r510138 = z;
double r510139 = r510137 / r510138;
double r510140 = t;
double r510141 = r510139 * r510140;
double r510142 = r510141 / r510140;
double r510143 = r510136 * r510142;
return r510143;
}
double f(double x, double y, double z, double __attribute__((unused)) t) {
double r510144 = x;
double r510145 = y;
double r510146 = r510144 * r510145;
double r510147 = z;
double r510148 = r510146 / r510147;
return r510148;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 15.1 |
|---|---|
| Target | 1.6 |
| Herbie | 6.0 |
Initial program 15.1
Simplified6.4
rmApplied add-cube-cbrt7.1
Applied add-cube-cbrt7.3
Applied times-frac7.3
Applied associate-*r*1.9
Final simplification6.0
herbie shell --seed 2019294
(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)))