\left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \left(\frac{\left(\left(a \cdot 2 + 1\right) \cdot b\right) \cdot t}{16}\right)\left(x \cdot \sqrt[3]{{\left(\cos \left(\frac{\left(y \cdot 2 + 1\right) \cdot \left(z \cdot t\right)}{16}\right)\right)}^{3}}\right) \cdot \sqrt[3]{{\left(\cos \left(\frac{\left(a \cdot 2 + 1\right) \cdot \left(b \cdot t\right)}{16}\right)\right)}^{3}}double code(double x, double y, double z, double t, double a, double b) {
return ((double) (((double) (x * ((double) cos(((double) (((double) (((double) (((double) (((double) (y * 2.0)) + 1.0)) * z)) * t)) / 16.0)))))) * ((double) cos(((double) (((double) (((double) (((double) (((double) (a * 2.0)) + 1.0)) * b)) * t)) / 16.0))))));
}
double code(double x, double y, double z, double t, double a, double b) {
return ((double) (((double) (x * ((double) cbrt(((double) pow(((double) cos(((double) (((double) (((double) (((double) (y * 2.0)) + 1.0)) * ((double) (z * t)))) / 16.0)))), 3.0)))))) * ((double) cbrt(((double) pow(((double) cos(((double) (((double) (((double) (((double) (a * 2.0)) + 1.0)) * ((double) (b * t)))) / 16.0)))), 3.0))))));
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a




Bits error versus b
Results
| Original | 45.5 |
|---|---|
| Target | 43.8 |
| Herbie | 45.0 |
Initial program 45.5
rmApplied associate-*l*45.2
rmApplied associate-*l*45.0
rmApplied add-cbrt-cube45.0
Simplified45.0
rmApplied add-cbrt-cube45.0
Simplified45.0
Final simplification45.0
herbie shell --seed 2020148
(FPCore (x y z t a b)
:name "Codec.Picture.Jpg.FastDct:referenceDct from JuicyPixels-3.2.6.1"
:precision binary64
:herbie-target
(* x (cos (* (/ b 16.0) (/ t (+ (- 1.0 (* a 2.0)) (pow (* a 2.0) 2.0))))))
(* (* x (cos (/ (* (* (+ (* y 2.0) 1.0) z) t) 16.0))) (cos (/ (* (* (+ (* a 2.0) 1.0) b) t) 16.0))))