Average Error: 46.2 → 45.7
Time: 18.9s
Precision: binary64
\[\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 \left(\cos \left(0.0625 \cdot \left(z \cdot t\right)\right) \cdot \cos \left(\left(z \cdot t\right) \cdot \left(y \cdot 0.125\right)\right) - \left(\sqrt[3]{\sin \left(0.0625 \cdot \left(z \cdot t\right)\right)} \cdot \left(\sqrt[3]{\sin \left(0.0625 \cdot \left(z \cdot t\right)\right)} \cdot \sqrt[3]{\sin \left(0.0625 \cdot \left(z \cdot t\right)\right)}\right)\right) \cdot \sin \left(\left(z \cdot t\right) \cdot \left(y \cdot 0.125\right)\right)\right)\right) \cdot \cos \left(\sqrt[3]{\left(t \cdot b\right) \cdot \left(0.0625 + 0.125 \cdot a\right)} \cdot \left(\sqrt[3]{\left(t \cdot b\right) \cdot \left(0.0625 + 0.125 \cdot a\right)} \cdot \sqrt[3]{\left(t \cdot b\right) \cdot \left(0.0625 + 0.125 \cdot a\right)}\right)\right)\]
\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 \left(\cos \left(0.0625 \cdot \left(z \cdot t\right)\right) \cdot \cos \left(\left(z \cdot t\right) \cdot \left(y \cdot 0.125\right)\right) - \left(\sqrt[3]{\sin \left(0.0625 \cdot \left(z \cdot t\right)\right)} \cdot \left(\sqrt[3]{\sin \left(0.0625 \cdot \left(z \cdot t\right)\right)} \cdot \sqrt[3]{\sin \left(0.0625 \cdot \left(z \cdot t\right)\right)}\right)\right) \cdot \sin \left(\left(z \cdot t\right) \cdot \left(y \cdot 0.125\right)\right)\right)\right) \cdot \cos \left(\sqrt[3]{\left(t \cdot b\right) \cdot \left(0.0625 + 0.125 \cdot a\right)} \cdot \left(\sqrt[3]{\left(t \cdot b\right) \cdot \left(0.0625 + 0.125 \cdot a\right)} \cdot \sqrt[3]{\left(t \cdot b\right) \cdot \left(0.0625 + 0.125 \cdot a\right)}\right)\right)
(FPCore (x y z t a b)
 :precision binary64
 (*
  (* x (cos (/ (* (* (+ (* y 2.0) 1.0) z) t) 16.0)))
  (cos (/ (* (* (+ (* a 2.0) 1.0) b) t) 16.0))))
(FPCore (x y z t a b)
 :precision binary64
 (*
  (*
   x
   (-
    (* (cos (* 0.0625 (* z t))) (cos (* (* z t) (* y 0.125))))
    (*
     (*
      (cbrt (sin (* 0.0625 (* z t))))
      (* (cbrt (sin (* 0.0625 (* z t)))) (cbrt (sin (* 0.0625 (* z t))))))
     (sin (* (* z t) (* y 0.125))))))
  (cos
   (*
    (cbrt (* (* t b) (+ 0.0625 (* 0.125 a))))
    (*
     (cbrt (* (* t b) (+ 0.0625 (* 0.125 a))))
     (cbrt (* (* t b) (+ 0.0625 (* 0.125 a)))))))))
double code(double x, double y, double z, double t, double a, double b) {
	return (x * cos(((((y * 2.0) + 1.0) * z) * t) / 16.0)) * cos(((((a * 2.0) + 1.0) * b) * t) / 16.0);
}
double code(double x, double y, double z, double t, double a, double b) {
	return (x * ((cos(0.0625 * (z * t)) * cos((z * t) * (y * 0.125))) - ((cbrt(sin(0.0625 * (z * t))) * (cbrt(sin(0.0625 * (z * t))) * cbrt(sin(0.0625 * (z * t))))) * sin((z * t) * (y * 0.125))))) * cos(cbrt((t * b) * (0.0625 + (0.125 * a))) * (cbrt((t * b) * (0.0625 + (0.125 * a))) * cbrt((t * b) * (0.0625 + (0.125 * a)))));
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Bits error versus b

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original46.2
Target44.6
Herbie45.7
\[x \cdot \cos \left(\frac{b}{16} \cdot \frac{t}{\left(1 - a \cdot 2\right) + {\left(a \cdot 2\right)}^{2}}\right)\]

Derivation

  1. Initial program 46.2

    \[\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)\]
  2. Simplified45.7

    \[\leadsto \color{blue}{\left(x \cdot \cos \left(\left(z \cdot t\right) \cdot \left(0.0625 + y \cdot 0.125\right)\right)\right) \cdot \cos \left(\left(t \cdot b\right) \cdot \left(0.0625 + a \cdot 0.125\right)\right)}\]
  3. Using strategy rm
  4. Applied add-cube-cbrt_binary64_2534745.7

    \[\leadsto \left(x \cdot \cos \left(\left(z \cdot t\right) \cdot \left(0.0625 + y \cdot 0.125\right)\right)\right) \cdot \cos \color{blue}{\left(\left(\sqrt[3]{\left(t \cdot b\right) \cdot \left(0.0625 + a \cdot 0.125\right)} \cdot \sqrt[3]{\left(t \cdot b\right) \cdot \left(0.0625 + a \cdot 0.125\right)}\right) \cdot \sqrt[3]{\left(t \cdot b\right) \cdot \left(0.0625 + a \cdot 0.125\right)}\right)}\]
  5. Simplified45.7

    \[\leadsto \left(x \cdot \cos \left(\left(z \cdot t\right) \cdot \left(0.0625 + y \cdot 0.125\right)\right)\right) \cdot \cos \left(\color{blue}{\left(\sqrt[3]{\left(t \cdot b\right) \cdot \left(0.0625 + 0.125 \cdot a\right)} \cdot \sqrt[3]{\left(t \cdot b\right) \cdot \left(0.0625 + 0.125 \cdot a\right)}\right)} \cdot \sqrt[3]{\left(t \cdot b\right) \cdot \left(0.0625 + a \cdot 0.125\right)}\right)\]
  6. Simplified45.7

    \[\leadsto \left(x \cdot \cos \left(\left(z \cdot t\right) \cdot \left(0.0625 + y \cdot 0.125\right)\right)\right) \cdot \cos \left(\left(\sqrt[3]{\left(t \cdot b\right) \cdot \left(0.0625 + 0.125 \cdot a\right)} \cdot \sqrt[3]{\left(t \cdot b\right) \cdot \left(0.0625 + 0.125 \cdot a\right)}\right) \cdot \color{blue}{\sqrt[3]{\left(t \cdot b\right) \cdot \left(0.0625 + 0.125 \cdot a\right)}}\right)\]
  7. Using strategy rm
  8. Applied distribute-rgt-in_binary64_2526245.7

    \[\leadsto \left(x \cdot \cos \color{blue}{\left(0.0625 \cdot \left(z \cdot t\right) + \left(y \cdot 0.125\right) \cdot \left(z \cdot t\right)\right)}\right) \cdot \cos \left(\left(\sqrt[3]{\left(t \cdot b\right) \cdot \left(0.0625 + 0.125 \cdot a\right)} \cdot \sqrt[3]{\left(t \cdot b\right) \cdot \left(0.0625 + 0.125 \cdot a\right)}\right) \cdot \sqrt[3]{\left(t \cdot b\right) \cdot \left(0.0625 + 0.125 \cdot a\right)}\right)\]
  9. Applied cos-sum_binary64_2544645.7

    \[\leadsto \left(x \cdot \color{blue}{\left(\cos \left(0.0625 \cdot \left(z \cdot t\right)\right) \cdot \cos \left(\left(y \cdot 0.125\right) \cdot \left(z \cdot t\right)\right) - \sin \left(0.0625 \cdot \left(z \cdot t\right)\right) \cdot \sin \left(\left(y \cdot 0.125\right) \cdot \left(z \cdot t\right)\right)\right)}\right) \cdot \cos \left(\left(\sqrt[3]{\left(t \cdot b\right) \cdot \left(0.0625 + 0.125 \cdot a\right)} \cdot \sqrt[3]{\left(t \cdot b\right) \cdot \left(0.0625 + 0.125 \cdot a\right)}\right) \cdot \sqrt[3]{\left(t \cdot b\right) \cdot \left(0.0625 + 0.125 \cdot a\right)}\right)\]
  10. Simplified45.7

    \[\leadsto \left(x \cdot \left(\color{blue}{\cos \left(0.0625 \cdot \left(z \cdot t\right)\right) \cdot \cos \left(\left(z \cdot t\right) \cdot \left(y \cdot 0.125\right)\right)} - \sin \left(0.0625 \cdot \left(z \cdot t\right)\right) \cdot \sin \left(\left(y \cdot 0.125\right) \cdot \left(z \cdot t\right)\right)\right)\right) \cdot \cos \left(\left(\sqrt[3]{\left(t \cdot b\right) \cdot \left(0.0625 + 0.125 \cdot a\right)} \cdot \sqrt[3]{\left(t \cdot b\right) \cdot \left(0.0625 + 0.125 \cdot a\right)}\right) \cdot \sqrt[3]{\left(t \cdot b\right) \cdot \left(0.0625 + 0.125 \cdot a\right)}\right)\]
  11. Simplified45.7

    \[\leadsto \left(x \cdot \left(\cos \left(0.0625 \cdot \left(z \cdot t\right)\right) \cdot \cos \left(\left(z \cdot t\right) \cdot \left(y \cdot 0.125\right)\right) - \color{blue}{\sin \left(0.0625 \cdot \left(z \cdot t\right)\right) \cdot \sin \left(\left(z \cdot t\right) \cdot \left(y \cdot 0.125\right)\right)}\right)\right) \cdot \cos \left(\left(\sqrt[3]{\left(t \cdot b\right) \cdot \left(0.0625 + 0.125 \cdot a\right)} \cdot \sqrt[3]{\left(t \cdot b\right) \cdot \left(0.0625 + 0.125 \cdot a\right)}\right) \cdot \sqrt[3]{\left(t \cdot b\right) \cdot \left(0.0625 + 0.125 \cdot a\right)}\right)\]
  12. Using strategy rm
  13. Applied add-cube-cbrt_binary64_2534745.7

    \[\leadsto \left(x \cdot \left(\cos \left(0.0625 \cdot \left(z \cdot t\right)\right) \cdot \cos \left(\left(z \cdot t\right) \cdot \left(y \cdot 0.125\right)\right) - \color{blue}{\left(\left(\sqrt[3]{\sin \left(0.0625 \cdot \left(z \cdot t\right)\right)} \cdot \sqrt[3]{\sin \left(0.0625 \cdot \left(z \cdot t\right)\right)}\right) \cdot \sqrt[3]{\sin \left(0.0625 \cdot \left(z \cdot t\right)\right)}\right)} \cdot \sin \left(\left(z \cdot t\right) \cdot \left(y \cdot 0.125\right)\right)\right)\right) \cdot \cos \left(\left(\sqrt[3]{\left(t \cdot b\right) \cdot \left(0.0625 + 0.125 \cdot a\right)} \cdot \sqrt[3]{\left(t \cdot b\right) \cdot \left(0.0625 + 0.125 \cdot a\right)}\right) \cdot \sqrt[3]{\left(t \cdot b\right) \cdot \left(0.0625 + 0.125 \cdot a\right)}\right)\]
  14. Simplified45.7

    \[\leadsto \left(x \cdot \left(\cos \left(0.0625 \cdot \left(z \cdot t\right)\right) \cdot \cos \left(\left(z \cdot t\right) \cdot \left(y \cdot 0.125\right)\right) - \left(\color{blue}{\left(\sqrt[3]{\sin \left(0.0625 \cdot \left(t \cdot z\right)\right)} \cdot \sqrt[3]{\sin \left(0.0625 \cdot \left(t \cdot z\right)\right)}\right)} \cdot \sqrt[3]{\sin \left(0.0625 \cdot \left(z \cdot t\right)\right)}\right) \cdot \sin \left(\left(z \cdot t\right) \cdot \left(y \cdot 0.125\right)\right)\right)\right) \cdot \cos \left(\left(\sqrt[3]{\left(t \cdot b\right) \cdot \left(0.0625 + 0.125 \cdot a\right)} \cdot \sqrt[3]{\left(t \cdot b\right) \cdot \left(0.0625 + 0.125 \cdot a\right)}\right) \cdot \sqrt[3]{\left(t \cdot b\right) \cdot \left(0.0625 + 0.125 \cdot a\right)}\right)\]
  15. Simplified45.7

    \[\leadsto \left(x \cdot \left(\cos \left(0.0625 \cdot \left(z \cdot t\right)\right) \cdot \cos \left(\left(z \cdot t\right) \cdot \left(y \cdot 0.125\right)\right) - \left(\left(\sqrt[3]{\sin \left(0.0625 \cdot \left(t \cdot z\right)\right)} \cdot \sqrt[3]{\sin \left(0.0625 \cdot \left(t \cdot z\right)\right)}\right) \cdot \color{blue}{\sqrt[3]{\sin \left(0.0625 \cdot \left(t \cdot z\right)\right)}}\right) \cdot \sin \left(\left(z \cdot t\right) \cdot \left(y \cdot 0.125\right)\right)\right)\right) \cdot \cos \left(\left(\sqrt[3]{\left(t \cdot b\right) \cdot \left(0.0625 + 0.125 \cdot a\right)} \cdot \sqrt[3]{\left(t \cdot b\right) \cdot \left(0.0625 + 0.125 \cdot a\right)}\right) \cdot \sqrt[3]{\left(t \cdot b\right) \cdot \left(0.0625 + 0.125 \cdot a\right)}\right)\]
  16. Final simplification45.7

    \[\leadsto \left(x \cdot \left(\cos \left(0.0625 \cdot \left(z \cdot t\right)\right) \cdot \cos \left(\left(z \cdot t\right) \cdot \left(y \cdot 0.125\right)\right) - \left(\sqrt[3]{\sin \left(0.0625 \cdot \left(z \cdot t\right)\right)} \cdot \left(\sqrt[3]{\sin \left(0.0625 \cdot \left(z \cdot t\right)\right)} \cdot \sqrt[3]{\sin \left(0.0625 \cdot \left(z \cdot t\right)\right)}\right)\right) \cdot \sin \left(\left(z \cdot t\right) \cdot \left(y \cdot 0.125\right)\right)\right)\right) \cdot \cos \left(\sqrt[3]{\left(t \cdot b\right) \cdot \left(0.0625 + 0.125 \cdot a\right)} \cdot \left(\sqrt[3]{\left(t \cdot b\right) \cdot \left(0.0625 + 0.125 \cdot a\right)} \cdot \sqrt[3]{\left(t \cdot b\right) \cdot \left(0.0625 + 0.125 \cdot a\right)}\right)\right)\]

Reproduce

herbie shell --seed 2020342 
(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))))