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 r421797 = x;
double r421798 = y;
double r421799 = z;
double r421800 = r421798 / r421799;
double r421801 = t;
double r421802 = r421800 * r421801;
double r421803 = r421802 / r421801;
double r421804 = r421797 * r421803;
return r421804;
}
double f(double x, double y, double z, double __attribute__((unused)) t) {
double r421805 = x;
double r421806 = y;
double r421807 = r421805 * r421806;
double r421808 = z;
double r421809 = r421807 / r421808;
return r421809;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 14.7 |
|---|---|
| Target | 1.6 |
| Herbie | 5.9 |
Initial program 14.7
Simplified6.3
rmApplied add-cube-cbrt7.1
Applied add-cube-cbrt7.3
Applied times-frac7.3
Applied associate-*r*2.1
Final simplification5.9
herbie shell --seed 1978988140
(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)))