Average Error: 47.0 → 44.2
Time: 22.3s
Precision: binary64
Cost: 28868
\[\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) \]
\[\begin{array}{l} t_1 := \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{t \cdot \left(\left(1 + 2 \cdot a\right) \cdot b\right)}{16}\right)\\ \mathbf{if}\;t_1 \leq 5 \cdot 10^{+21}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
(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
 (let* ((t_1
         (*
          (* x (cos (/ (* (* (+ (* y 2.0) 1.0) z) t) 16.0)))
          (cos (/ (* t (* (+ 1.0 (* 2.0 a)) b)) 16.0)))))
   (if (<= t_1 5e+21) t_1 x)))
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) {
	double t_1 = (x * cos((((((y * 2.0) + 1.0) * z) * t) / 16.0))) * cos(((t * ((1.0 + (2.0 * a)) * b)) / 16.0));
	double tmp;
	if (t_1 <= 5e+21) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = (x * cos((((((y * 2.0d0) + 1.0d0) * z) * t) / 16.0d0))) * cos((((((a * 2.0d0) + 1.0d0) * b) * t) / 16.0d0))
end function
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (x * cos((((((y * 2.0d0) + 1.0d0) * z) * t) / 16.0d0))) * cos(((t * ((1.0d0 + (2.0d0 * a)) * b)) / 16.0d0))
    if (t_1 <= 5d+21) then
        tmp = t_1
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return (x * Math.cos((((((y * 2.0) + 1.0) * z) * t) / 16.0))) * Math.cos((((((a * 2.0) + 1.0) * b) * t) / 16.0));
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x * Math.cos((((((y * 2.0) + 1.0) * z) * t) / 16.0))) * Math.cos(((t * ((1.0 + (2.0 * a)) * b)) / 16.0));
	double tmp;
	if (t_1 <= 5e+21) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	return (x * math.cos((((((y * 2.0) + 1.0) * z) * t) / 16.0))) * math.cos((((((a * 2.0) + 1.0) * b) * t) / 16.0))
def code(x, y, z, t, a, b):
	t_1 = (x * math.cos((((((y * 2.0) + 1.0) * z) * t) / 16.0))) * math.cos(((t * ((1.0 + (2.0 * a)) * b)) / 16.0))
	tmp = 0
	if t_1 <= 5e+21:
		tmp = t_1
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a, b)
	return Float64(Float64(x * cos(Float64(Float64(Float64(Float64(Float64(y * 2.0) + 1.0) * z) * t) / 16.0))) * cos(Float64(Float64(Float64(Float64(Float64(a * 2.0) + 1.0) * b) * t) / 16.0)))
end
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x * cos(Float64(Float64(Float64(Float64(Float64(y * 2.0) + 1.0) * z) * t) / 16.0))) * cos(Float64(Float64(t * Float64(Float64(1.0 + Float64(2.0 * a)) * b)) / 16.0)))
	tmp = 0.0
	if (t_1 <= 5e+21)
		tmp = t_1;
	else
		tmp = x;
	end
	return tmp
end
function tmp = code(x, y, z, t, a, b)
	tmp = (x * cos((((((y * 2.0) + 1.0) * z) * t) / 16.0))) * cos((((((a * 2.0) + 1.0) * b) * t) / 16.0));
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (x * cos((((((y * 2.0) + 1.0) * z) * t) / 16.0))) * cos(((t * ((1.0 + (2.0 * a)) * b)) / 16.0));
	tmp = 0.0;
	if (t_1 <= 5e+21)
		tmp = t_1;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Cos[N[(N[(N[(N[(N[(y * 2.0), $MachinePrecision] + 1.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] / 16.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(N[(N[(N[(N[(a * 2.0), $MachinePrecision] + 1.0), $MachinePrecision] * b), $MachinePrecision] * t), $MachinePrecision] / 16.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * N[Cos[N[(N[(N[(N[(N[(y * 2.0), $MachinePrecision] + 1.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] / 16.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(N[(t * N[(N[(1.0 + N[(2.0 * a), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision] / 16.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 5e+21], t$95$1, x]]
\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)
\begin{array}{l}
t_1 := \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{t \cdot \left(\left(1 + 2 \cdot a\right) \cdot b\right)}{16}\right)\\
\mathbf{if}\;t_1 \leq 5 \cdot 10^{+21}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original47.0
Target45.1
Herbie44.2
\[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. Split input into 2 regimes
  2. if (*.f64 (*.f64 x (cos.f64 (/.f64 (*.f64 (*.f64 (+.f64 (*.f64 y 2) 1) z) t) 16))) (cos.f64 (/.f64 (*.f64 (*.f64 (+.f64 (*.f64 a 2) 1) b) t) 16))) < 5e21

    1. Initial program 34.9

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

    if 5e21 < (*.f64 (*.f64 x (cos.f64 (/.f64 (*.f64 (*.f64 (+.f64 (*.f64 y 2) 1) z) t) 16))) (cos.f64 (/.f64 (*.f64 (*.f64 (+.f64 (*.f64 a 2) 1) b) t) 16)))

    1. Initial program 56.6

      \[\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. Simplified56.2

      \[\leadsto \color{blue}{x \cdot \left(\cos \left(\left(z \cdot t\right) \cdot \mathsf{fma}\left(y, 0.125, 0.0625\right)\right) \cdot \cos \left(t \cdot \left(b \cdot \mathsf{fma}\left(a, 0.125, 0.0625\right)\right)\right)\right)} \]
      Proof
      (*.f64 x (*.f64 (cos.f64 (*.f64 (*.f64 z t) (fma.f64 y 1/8 1/16))) (cos.f64 (*.f64 t (*.f64 b (fma.f64 a 1/8 1/16)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 x (*.f64 (cos.f64 (*.f64 (*.f64 z t) (fma.f64 y (Rewrite<= metadata-eval (/.f64 2 16)) 1/16))) (cos.f64 (*.f64 t (*.f64 b (fma.f64 a 1/8 1/16)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 x (*.f64 (cos.f64 (*.f64 (*.f64 z t) (fma.f64 y (/.f64 2 16) (Rewrite<= metadata-eval (/.f64 1 16))))) (cos.f64 (*.f64 t (*.f64 b (fma.f64 a 1/8 1/16)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 x (*.f64 (cos.f64 (*.f64 (*.f64 z t) (Rewrite<= fma-def_binary64 (+.f64 (*.f64 y (/.f64 2 16)) (/.f64 1 16))))) (cos.f64 (*.f64 t (*.f64 b (fma.f64 a 1/8 1/16)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 x (*.f64 (cos.f64 (*.f64 (*.f64 z t) (+.f64 (Rewrite<= *-commutative_binary64 (*.f64 (/.f64 2 16) y)) (/.f64 1 16)))) (cos.f64 (*.f64 t (*.f64 b (fma.f64 a 1/8 1/16)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 x (*.f64 (cos.f64 (*.f64 (*.f64 z t) (+.f64 (Rewrite<= associate-/r/_binary64 (/.f64 2 (/.f64 16 y))) (/.f64 1 16)))) (cos.f64 (*.f64 t (*.f64 b (fma.f64 a 1/8 1/16)))))): 4 points increase in error, 2 points decrease in error
      (*.f64 x (*.f64 (cos.f64 (*.f64 (*.f64 z t) (+.f64 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 2 y) 16)) (/.f64 1 16)))) (cos.f64 (*.f64 t (*.f64 b (fma.f64 a 1/8 1/16)))))): 2 points increase in error, 4 points decrease in error
      (*.f64 x (*.f64 (cos.f64 (*.f64 (*.f64 z t) (+.f64 (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 y 2)) 16) (/.f64 1 16)))) (cos.f64 (*.f64 t (*.f64 b (fma.f64 a 1/8 1/16)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 x (*.f64 (cos.f64 (*.f64 (*.f64 z t) (+.f64 (/.f64 (Rewrite<= *-lft-identity_binary64 (*.f64 1 (*.f64 y 2))) 16) (/.f64 1 16)))) (cos.f64 (*.f64 t (*.f64 b (fma.f64 a 1/8 1/16)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 x (*.f64 (cos.f64 (*.f64 (*.f64 z t) (+.f64 (Rewrite=> associate-/l*_binary64 (/.f64 1 (/.f64 16 (*.f64 y 2)))) (/.f64 1 16)))) (cos.f64 (*.f64 t (*.f64 b (fma.f64 a 1/8 1/16)))))): 4 points increase in error, 2 points decrease in error
      (*.f64 x (*.f64 (cos.f64 (*.f64 (*.f64 z t) (+.f64 (Rewrite=> associate-/r/_binary64 (*.f64 (/.f64 1 16) (*.f64 y 2))) (/.f64 1 16)))) (cos.f64 (*.f64 t (*.f64 b (fma.f64 a 1/8 1/16)))))): 2 points increase in error, 4 points decrease in error
      (*.f64 x (*.f64 (cos.f64 (*.f64 (*.f64 z t) (+.f64 (Rewrite<= *-commutative_binary64 (*.f64 (*.f64 y 2) (/.f64 1 16))) (/.f64 1 16)))) (cos.f64 (*.f64 t (*.f64 b (fma.f64 a 1/8 1/16)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 x (*.f64 (cos.f64 (*.f64 (*.f64 z t) (Rewrite=> distribute-lft1-in_binary64 (*.f64 (+.f64 (*.f64 y 2) 1) (/.f64 1 16))))) (cos.f64 (*.f64 t (*.f64 b (fma.f64 a 1/8 1/16)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 x (*.f64 (cos.f64 (*.f64 (*.f64 z t) (Rewrite<= *-commutative_binary64 (*.f64 (/.f64 1 16) (+.f64 (*.f64 y 2) 1))))) (cos.f64 (*.f64 t (*.f64 b (fma.f64 a 1/8 1/16)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 x (*.f64 (cos.f64 (*.f64 (*.f64 z t) (Rewrite<= associate-/r/_binary64 (/.f64 1 (/.f64 16 (+.f64 (*.f64 y 2) 1)))))) (cos.f64 (*.f64 t (*.f64 b (fma.f64 a 1/8 1/16)))))): 4 points increase in error, 1 points decrease in error
      (*.f64 x (*.f64 (cos.f64 (*.f64 (*.f64 z t) (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 1 (+.f64 (*.f64 y 2) 1)) 16)))) (cos.f64 (*.f64 t (*.f64 b (fma.f64 a 1/8 1/16)))))): 1 points increase in error, 4 points decrease in error
      (*.f64 x (*.f64 (cos.f64 (*.f64 (*.f64 z t) (/.f64 (Rewrite=> *-lft-identity_binary64 (+.f64 (*.f64 y 2) 1)) 16))) (cos.f64 (*.f64 t (*.f64 b (fma.f64 a 1/8 1/16)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 x (*.f64 (cos.f64 (Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 (*.f64 z t) (+.f64 (*.f64 y 2) 1)) 16))) (cos.f64 (*.f64 t (*.f64 b (fma.f64 a 1/8 1/16)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 x (*.f64 (cos.f64 (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 (+.f64 (*.f64 y 2) 1) (*.f64 z t))) 16)) (cos.f64 (*.f64 t (*.f64 b (fma.f64 a 1/8 1/16)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 x (*.f64 (cos.f64 (/.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 (+.f64 (*.f64 y 2) 1) z) t)) 16)) (cos.f64 (*.f64 t (*.f64 b (fma.f64 a 1/8 1/16)))))): 10 points increase in error, 6 points decrease in error
      (*.f64 x (*.f64 (cos.f64 (/.f64 (*.f64 (*.f64 (+.f64 (*.f64 y 2) 1) z) t) 16)) (cos.f64 (*.f64 t (*.f64 b (fma.f64 a (Rewrite<= metadata-eval (/.f64 2 16)) 1/16)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 x (*.f64 (cos.f64 (/.f64 (*.f64 (*.f64 (+.f64 (*.f64 y 2) 1) z) t) 16)) (cos.f64 (*.f64 t (*.f64 b (fma.f64 a (/.f64 2 16) (Rewrite<= metadata-eval (/.f64 1 16)))))))): 0 points increase in error, 0 points decrease in error
      (*.f64 x (*.f64 (cos.f64 (/.f64 (*.f64 (*.f64 (+.f64 (*.f64 y 2) 1) z) t) 16)) (cos.f64 (*.f64 t (*.f64 b (Rewrite<= fma-def_binary64 (+.f64 (*.f64 a (/.f64 2 16)) (/.f64 1 16)))))))): 0 points increase in error, 0 points decrease in error
      (*.f64 x (*.f64 (cos.f64 (/.f64 (*.f64 (*.f64 (+.f64 (*.f64 y 2) 1) z) t) 16)) (cos.f64 (*.f64 t (*.f64 b (+.f64 (Rewrite<= *-commutative_binary64 (*.f64 (/.f64 2 16) a)) (/.f64 1 16))))))): 0 points increase in error, 0 points decrease in error
      (*.f64 x (*.f64 (cos.f64 (/.f64 (*.f64 (*.f64 (+.f64 (*.f64 y 2) 1) z) t) 16)) (cos.f64 (*.f64 t (*.f64 b (+.f64 (Rewrite=> *-commutative_binary64 (*.f64 a (/.f64 2 16))) (/.f64 1 16))))))): 0 points increase in error, 0 points decrease in error
      (*.f64 x (*.f64 (cos.f64 (/.f64 (*.f64 (*.f64 (+.f64 (*.f64 y 2) 1) z) t) 16)) (cos.f64 (*.f64 t (*.f64 b (+.f64 (*.f64 a (Rewrite=> metadata-eval 1/8)) (/.f64 1 16))))))): 0 points increase in error, 0 points decrease in error
      (*.f64 x (*.f64 (cos.f64 (/.f64 (*.f64 (*.f64 (+.f64 (*.f64 y 2) 1) z) t) 16)) (cos.f64 (*.f64 t (*.f64 b (+.f64 (*.f64 a (Rewrite<= metadata-eval (*.f64 2 1/16))) (/.f64 1 16))))))): 0 points increase in error, 0 points decrease in error
      (*.f64 x (*.f64 (cos.f64 (/.f64 (*.f64 (*.f64 (+.f64 (*.f64 y 2) 1) z) t) 16)) (cos.f64 (*.f64 t (*.f64 b (+.f64 (*.f64 a (*.f64 2 (Rewrite<= metadata-eval (/.f64 1 16)))) (/.f64 1 16))))))): 0 points increase in error, 0 points decrease in error
      (*.f64 x (*.f64 (cos.f64 (/.f64 (*.f64 (*.f64 (+.f64 (*.f64 y 2) 1) z) t) 16)) (cos.f64 (*.f64 t (*.f64 b (+.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 a 2) (/.f64 1 16))) (/.f64 1 16))))))): 0 points increase in error, 0 points decrease in error
      (*.f64 x (*.f64 (cos.f64 (/.f64 (*.f64 (*.f64 (+.f64 (*.f64 y 2) 1) z) t) 16)) (cos.f64 (*.f64 t (*.f64 b (Rewrite=> distribute-lft1-in_binary64 (*.f64 (+.f64 (*.f64 a 2) 1) (/.f64 1 16)))))))): 0 points increase in error, 0 points decrease in error
      (*.f64 x (*.f64 (cos.f64 (/.f64 (*.f64 (*.f64 (+.f64 (*.f64 y 2) 1) z) t) 16)) (cos.f64 (*.f64 t (*.f64 b (Rewrite<= *-commutative_binary64 (*.f64 (/.f64 1 16) (+.f64 (*.f64 a 2) 1)))))))): 0 points increase in error, 0 points decrease in error
      (*.f64 x (*.f64 (cos.f64 (/.f64 (*.f64 (*.f64 (+.f64 (*.f64 y 2) 1) z) t) 16)) (cos.f64 (*.f64 t (*.f64 b (Rewrite<= associate-/r/_binary64 (/.f64 1 (/.f64 16 (+.f64 (*.f64 a 2) 1))))))))): 1 points increase in error, 2 points decrease in error
      (*.f64 x (*.f64 (cos.f64 (/.f64 (*.f64 (*.f64 (+.f64 (*.f64 y 2) 1) z) t) 16)) (cos.f64 (*.f64 t (*.f64 b (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 1 (+.f64 (*.f64 a 2) 1)) 16))))))): 2 points increase in error, 1 points decrease in error
      (*.f64 x (*.f64 (cos.f64 (/.f64 (*.f64 (*.f64 (+.f64 (*.f64 y 2) 1) z) t) 16)) (cos.f64 (*.f64 t (*.f64 b (/.f64 (Rewrite=> *-lft-identity_binary64 (+.f64 (*.f64 a 2) 1)) 16)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 x (*.f64 (cos.f64 (/.f64 (*.f64 (*.f64 (+.f64 (*.f64 y 2) 1) z) t) 16)) (cos.f64 (*.f64 t (Rewrite<= *-commutative_binary64 (*.f64 (/.f64 (+.f64 (*.f64 a 2) 1) 16) b)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 x (*.f64 (cos.f64 (/.f64 (*.f64 (*.f64 (+.f64 (*.f64 y 2) 1) z) t) 16)) (cos.f64 (*.f64 t (Rewrite=> associate-*l/_binary64 (/.f64 (*.f64 (+.f64 (*.f64 a 2) 1) b) 16)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 x (*.f64 (cos.f64 (/.f64 (*.f64 (*.f64 (+.f64 (*.f64 y 2) 1) z) t) 16)) (cos.f64 (Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 t (*.f64 (+.f64 (*.f64 a 2) 1) b)) 16))))): 0 points increase in error, 0 points decrease in error
      (*.f64 x (*.f64 (cos.f64 (/.f64 (*.f64 (*.f64 (+.f64 (*.f64 y 2) 1) z) t) 16)) (cos.f64 (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 (*.f64 (+.f64 (*.f64 a 2) 1) b) t)) 16)))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 x (cos.f64 (/.f64 (*.f64 (*.f64 (+.f64 (*.f64 y 2) 1) z) t) 16))) (cos.f64 (/.f64 (*.f64 (*.f64 (+.f64 (*.f64 a 2) 1) b) t) 16)))): 9 points increase in error, 10 points decrease in error
    3. Applied egg-rr55.7

      \[\leadsto x \cdot \left(\cos \left(\left(z \cdot t\right) \cdot \mathsf{fma}\left(y, 0.125, 0.0625\right)\right) \cdot \cos \color{blue}{\left({\left(\sqrt[3]{b \cdot \left(\mathsf{fma}\left(0.125, a, 0.0625\right) \cdot t\right)}\right)}^{3}\right)}\right) \]
    4. Taylor expanded in a around 0 55.0

      \[\leadsto x \cdot \left(\cos \left(\left(z \cdot t\right) \cdot \mathsf{fma}\left(y, 0.125, 0.0625\right)\right) \cdot \cos \left({\left(\sqrt[3]{\color{blue}{0.0625 \cdot \left(t \cdot b\right)}}\right)}^{3}\right)\right) \]
    5. Simplified55.0

      \[\leadsto x \cdot \left(\cos \left(\left(z \cdot t\right) \cdot \mathsf{fma}\left(y, 0.125, 0.0625\right)\right) \cdot \cos \left({\left(\sqrt[3]{\color{blue}{t \cdot \left(0.0625 \cdot b\right)}}\right)}^{3}\right)\right) \]
      Proof
      (*.f64 t (*.f64 1/16 b)): 0 points increase in error, 0 points decrease in error
      (*.f64 t (Rewrite=> *-commutative_binary64 (*.f64 b 1/16))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 t b) 1/16)): 0 points increase in error, 0 points decrease in error
      (Rewrite<= *-commutative_binary64 (*.f64 1/16 (*.f64 t b))): 0 points increase in error, 0 points decrease in error
    6. Taylor expanded in z around 0 53.1

      \[\leadsto x \cdot \left(\color{blue}{1} \cdot \cos \left({\left(\sqrt[3]{t \cdot \left(0.0625 \cdot b\right)}\right)}^{3}\right)\right) \]
    7. Taylor expanded in t around 0 51.7

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification44.2

    \[\leadsto \begin{array}{l} \mathbf{if}\;\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{t \cdot \left(\left(1 + 2 \cdot a\right) \cdot b\right)}{16}\right) \leq 5 \cdot 10^{+21}:\\ \;\;\;\;\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{t \cdot \left(\left(1 + 2 \cdot a\right) \cdot b\right)}{16}\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternatives

Alternative 1
Error44.8
Cost64
\[x \]

Error

Reproduce

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