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) (x * ((double) (((double) cos(((double) (((double) cbrt(((double) (((double) (y * 2.0)) + 1.0)))) * ((double) (((double) cbrt(((double) (((double) (y * 2.0)) + 1.0)))) * ((double) (((double) cbrt(((double) (((double) (y * 2.0)) + 1.0)))) * ((double) (z * ((double) (t / 16.0)))))))))))) * ((double) cos(((double) (t * ((double) (b * 0.0625))))))))));
}




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 | 46.3 |
|---|---|
| Target | 44.7 |
| Herbie | 45.6 |
Initial program 46.3
Simplified46.0
Taylor expanded around inf 45.8
Simplified45.8
rmApplied add-cube-cbrt45.8
Applied associate-*l*45.7
Simplified45.8
rmApplied associate-*l*45.8
Simplified45.7
Taylor expanded around 0 45.6
Simplified45.6
Final simplification45.6
herbie shell --seed 2020191
(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))))