Codec.Picture.Jpg.FastDct:referenceDct from JuicyPixels-3.2.6.1

Percentage Accurate: 27.0% → 30.0%
Time: 14.2s
Alternatives: 6
Speedup: 2.3×

Specification

?
\[\begin{array}{l} \\ \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) \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))))
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));
}
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
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));
}
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))
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 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
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]
\begin{array}{l}

\\
\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)
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 6 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 27.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \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) \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))))
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));
}
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
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));
}
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))
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 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
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]
\begin{array}{l}

\\
\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)
\end{array}

Alternative 1: 30.0% accurate, 2.0× speedup?

\[\begin{array}{l} z_m = \left|z\right| \\ \begin{array}{l} \mathbf{if}\;z\_m \leq 4.7 \cdot 10^{-6}:\\ \;\;\;\;\cos \left(\left(\left(\mathsf{fma}\left(2, y, 1\right) \cdot z\_m\right) \cdot t\right) \cdot -0.0625\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;\cos \left(\left(b \cdot t\right) \cdot -0.0625\right) \cdot x\\ \end{array} \end{array} \]
z_m = (fabs.f64 z)
(FPCore (x y z_m t a b)
 :precision binary64
 (if (<= z_m 4.7e-6)
   (* (cos (* (* (* (fma 2.0 y 1.0) z_m) t) -0.0625)) x)
   (* (cos (* (* b t) -0.0625)) x)))
z_m = fabs(z);
double code(double x, double y, double z_m, double t, double a, double b) {
	double tmp;
	if (z_m <= 4.7e-6) {
		tmp = cos((((fma(2.0, y, 1.0) * z_m) * t) * -0.0625)) * x;
	} else {
		tmp = cos(((b * t) * -0.0625)) * x;
	}
	return tmp;
}
z_m = abs(z)
function code(x, y, z_m, t, a, b)
	tmp = 0.0
	if (z_m <= 4.7e-6)
		tmp = Float64(cos(Float64(Float64(Float64(fma(2.0, y, 1.0) * z_m) * t) * -0.0625)) * x);
	else
		tmp = Float64(cos(Float64(Float64(b * t) * -0.0625)) * x);
	end
	return tmp
end
z_m = N[Abs[z], $MachinePrecision]
code[x_, y_, z$95$m_, t_, a_, b_] := If[LessEqual[z$95$m, 4.7e-6], N[(N[Cos[N[(N[(N[(N[(2.0 * y + 1.0), $MachinePrecision] * z$95$m), $MachinePrecision] * t), $MachinePrecision] * -0.0625), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision], N[(N[Cos[N[(N[(b * t), $MachinePrecision] * -0.0625), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision]]
\begin{array}{l}
z_m = \left|z\right|

\\
\begin{array}{l}
\mathbf{if}\;z\_m \leq 4.7 \cdot 10^{-6}:\\
\;\;\;\;\cos \left(\left(\left(\mathsf{fma}\left(2, y, 1\right) \cdot z\_m\right) \cdot t\right) \cdot -0.0625\right) \cdot x\\

\mathbf{else}:\\
\;\;\;\;\cos \left(\left(b \cdot t\right) \cdot -0.0625\right) \cdot x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 4.69999999999999989e-6

    1. Initial program 32.0%

      \[\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. Add Preprocessing
    3. Taylor expanded in a around inf

      \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \color{blue}{\left(\frac{1}{8} \cdot \left(a \cdot \left(b \cdot t\right)\right)\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \color{blue}{\left(\left(a \cdot \left(b \cdot t\right)\right) \cdot \frac{1}{8}\right)} \]
      2. lower-*.f64N/A

        \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \color{blue}{\left(\left(a \cdot \left(b \cdot t\right)\right) \cdot \frac{1}{8}\right)} \]
      3. *-commutativeN/A

        \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \left(\color{blue}{\left(\left(b \cdot t\right) \cdot a\right)} \cdot \frac{1}{8}\right) \]
      4. lower-*.f64N/A

        \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \left(\color{blue}{\left(\left(b \cdot t\right) \cdot a\right)} \cdot \frac{1}{8}\right) \]
      5. lower-*.f6432.9

        \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \left(\left(\color{blue}{\left(b \cdot t\right)} \cdot a\right) \cdot 0.125\right) \]
    5. Applied rewrites32.9%

      \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \color{blue}{\left(\left(\left(b \cdot t\right) \cdot a\right) \cdot 0.125\right)} \]
    6. Taylor expanded in z around 0

      \[\leadsto \color{blue}{x \cdot \cos \left(\frac{1}{16} \cdot \left(b \cdot \left(t \cdot \left(1 + 2 \cdot a\right)\right)\right)\right)} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{\cos \left(\frac{1}{16} \cdot \left(b \cdot \left(t \cdot \left(1 + 2 \cdot a\right)\right)\right)\right) \cdot x} \]
      2. lower-*.f64N/A

        \[\leadsto \color{blue}{\cos \left(\frac{1}{16} \cdot \left(b \cdot \left(t \cdot \left(1 + 2 \cdot a\right)\right)\right)\right) \cdot x} \]
      3. cos-neg-revN/A

        \[\leadsto \color{blue}{\cos \left(\mathsf{neg}\left(\frac{1}{16} \cdot \left(b \cdot \left(t \cdot \left(1 + 2 \cdot a\right)\right)\right)\right)\right)} \cdot x \]
      4. lower-cos.f64N/A

        \[\leadsto \color{blue}{\cos \left(\mathsf{neg}\left(\frac{1}{16} \cdot \left(b \cdot \left(t \cdot \left(1 + 2 \cdot a\right)\right)\right)\right)\right)} \cdot x \]
      5. distribute-lft-neg-inN/A

        \[\leadsto \cos \color{blue}{\left(\left(\mathsf{neg}\left(\frac{1}{16}\right)\right) \cdot \left(b \cdot \left(t \cdot \left(1 + 2 \cdot a\right)\right)\right)\right)} \cdot x \]
      6. metadata-evalN/A

        \[\leadsto \cos \left(\color{blue}{\frac{-1}{16}} \cdot \left(b \cdot \left(t \cdot \left(1 + 2 \cdot a\right)\right)\right)\right) \cdot x \]
      7. lower-*.f64N/A

        \[\leadsto \cos \color{blue}{\left(\frac{-1}{16} \cdot \left(b \cdot \left(t \cdot \left(1 + 2 \cdot a\right)\right)\right)\right)} \cdot x \]
      8. *-commutativeN/A

        \[\leadsto \cos \left(\frac{-1}{16} \cdot \color{blue}{\left(\left(t \cdot \left(1 + 2 \cdot a\right)\right) \cdot b\right)}\right) \cdot x \]
      9. lower-*.f64N/A

        \[\leadsto \cos \left(\frac{-1}{16} \cdot \color{blue}{\left(\left(t \cdot \left(1 + 2 \cdot a\right)\right) \cdot b\right)}\right) \cdot x \]
      10. *-commutativeN/A

        \[\leadsto \cos \left(\frac{-1}{16} \cdot \left(\color{blue}{\left(\left(1 + 2 \cdot a\right) \cdot t\right)} \cdot b\right)\right) \cdot x \]
      11. lower-*.f64N/A

        \[\leadsto \cos \left(\frac{-1}{16} \cdot \left(\color{blue}{\left(\left(1 + 2 \cdot a\right) \cdot t\right)} \cdot b\right)\right) \cdot x \]
      12. +-commutativeN/A

        \[\leadsto \cos \left(\frac{-1}{16} \cdot \left(\left(\color{blue}{\left(2 \cdot a + 1\right)} \cdot t\right) \cdot b\right)\right) \cdot x \]
      13. lower-fma.f6433.0

        \[\leadsto \cos \left(-0.0625 \cdot \left(\left(\color{blue}{\mathsf{fma}\left(2, a, 1\right)} \cdot t\right) \cdot b\right)\right) \cdot x \]
    8. Applied rewrites33.0%

      \[\leadsto \color{blue}{\cos \left(-0.0625 \cdot \left(\left(\mathsf{fma}\left(2, a, 1\right) \cdot t\right) \cdot b\right)\right) \cdot x} \]
    9. Taylor expanded in b around 0

      \[\leadsto \color{blue}{x \cdot \cos \left(\frac{1}{16} \cdot \left(t \cdot \left(z \cdot \left(1 + 2 \cdot y\right)\right)\right)\right)} \]
    10. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{\cos \left(\frac{1}{16} \cdot \left(t \cdot \left(z \cdot \left(1 + 2 \cdot y\right)\right)\right)\right) \cdot x} \]
      2. lower-*.f64N/A

        \[\leadsto \color{blue}{\cos \left(\frac{1}{16} \cdot \left(t \cdot \left(z \cdot \left(1 + 2 \cdot y\right)\right)\right)\right) \cdot x} \]
      3. cos-neg-revN/A

        \[\leadsto \color{blue}{\cos \left(\mathsf{neg}\left(\frac{1}{16} \cdot \left(t \cdot \left(z \cdot \left(1 + 2 \cdot y\right)\right)\right)\right)\right)} \cdot x \]
      4. lower-cos.f64N/A

        \[\leadsto \color{blue}{\cos \left(\mathsf{neg}\left(\frac{1}{16} \cdot \left(t \cdot \left(z \cdot \left(1 + 2 \cdot y\right)\right)\right)\right)\right)} \cdot x \]
      5. distribute-lft-neg-inN/A

        \[\leadsto \cos \color{blue}{\left(\left(\mathsf{neg}\left(\frac{1}{16}\right)\right) \cdot \left(t \cdot \left(z \cdot \left(1 + 2 \cdot y\right)\right)\right)\right)} \cdot x \]
      6. metadata-evalN/A

        \[\leadsto \cos \left(\color{blue}{\frac{-1}{16}} \cdot \left(t \cdot \left(z \cdot \left(1 + 2 \cdot y\right)\right)\right)\right) \cdot x \]
      7. lower-*.f64N/A

        \[\leadsto \cos \color{blue}{\left(\frac{-1}{16} \cdot \left(t \cdot \left(z \cdot \left(1 + 2 \cdot y\right)\right)\right)\right)} \cdot x \]
      8. *-commutativeN/A

        \[\leadsto \cos \left(\frac{-1}{16} \cdot \color{blue}{\left(\left(z \cdot \left(1 + 2 \cdot y\right)\right) \cdot t\right)}\right) \cdot x \]
      9. lower-*.f64N/A

        \[\leadsto \cos \left(\frac{-1}{16} \cdot \color{blue}{\left(\left(z \cdot \left(1 + 2 \cdot y\right)\right) \cdot t\right)}\right) \cdot x \]
      10. *-commutativeN/A

        \[\leadsto \cos \left(\frac{-1}{16} \cdot \left(\color{blue}{\left(\left(1 + 2 \cdot y\right) \cdot z\right)} \cdot t\right)\right) \cdot x \]
      11. lower-*.f64N/A

        \[\leadsto \cos \left(\frac{-1}{16} \cdot \left(\color{blue}{\left(\left(1 + 2 \cdot y\right) \cdot z\right)} \cdot t\right)\right) \cdot x \]
      12. +-commutativeN/A

        \[\leadsto \cos \left(\frac{-1}{16} \cdot \left(\left(\color{blue}{\left(2 \cdot y + 1\right)} \cdot z\right) \cdot t\right)\right) \cdot x \]
      13. lower-fma.f6434.4

        \[\leadsto \cos \left(-0.0625 \cdot \left(\left(\color{blue}{\mathsf{fma}\left(2, y, 1\right)} \cdot z\right) \cdot t\right)\right) \cdot x \]
    11. Applied rewrites34.4%

      \[\leadsto \color{blue}{\cos \left(-0.0625 \cdot \left(\left(\mathsf{fma}\left(2, y, 1\right) \cdot z\right) \cdot t\right)\right) \cdot x} \]

    if 4.69999999999999989e-6 < z

    1. Initial program 18.3%

      \[\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. Add Preprocessing
    3. Taylor expanded in a around inf

      \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \color{blue}{\left(\frac{1}{8} \cdot \left(a \cdot \left(b \cdot t\right)\right)\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \color{blue}{\left(\left(a \cdot \left(b \cdot t\right)\right) \cdot \frac{1}{8}\right)} \]
      2. lower-*.f64N/A

        \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \color{blue}{\left(\left(a \cdot \left(b \cdot t\right)\right) \cdot \frac{1}{8}\right)} \]
      3. *-commutativeN/A

        \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \left(\color{blue}{\left(\left(b \cdot t\right) \cdot a\right)} \cdot \frac{1}{8}\right) \]
      4. lower-*.f64N/A

        \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \left(\color{blue}{\left(\left(b \cdot t\right) \cdot a\right)} \cdot \frac{1}{8}\right) \]
      5. lower-*.f6418.8

        \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \left(\left(\color{blue}{\left(b \cdot t\right)} \cdot a\right) \cdot 0.125\right) \]
    5. Applied rewrites18.8%

      \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \color{blue}{\left(\left(\left(b \cdot t\right) \cdot a\right) \cdot 0.125\right)} \]
    6. Taylor expanded in z around 0

      \[\leadsto \color{blue}{x \cdot \cos \left(\frac{1}{16} \cdot \left(b \cdot \left(t \cdot \left(1 + 2 \cdot a\right)\right)\right)\right)} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{\cos \left(\frac{1}{16} \cdot \left(b \cdot \left(t \cdot \left(1 + 2 \cdot a\right)\right)\right)\right) \cdot x} \]
      2. lower-*.f64N/A

        \[\leadsto \color{blue}{\cos \left(\frac{1}{16} \cdot \left(b \cdot \left(t \cdot \left(1 + 2 \cdot a\right)\right)\right)\right) \cdot x} \]
      3. cos-neg-revN/A

        \[\leadsto \color{blue}{\cos \left(\mathsf{neg}\left(\frac{1}{16} \cdot \left(b \cdot \left(t \cdot \left(1 + 2 \cdot a\right)\right)\right)\right)\right)} \cdot x \]
      4. lower-cos.f64N/A

        \[\leadsto \color{blue}{\cos \left(\mathsf{neg}\left(\frac{1}{16} \cdot \left(b \cdot \left(t \cdot \left(1 + 2 \cdot a\right)\right)\right)\right)\right)} \cdot x \]
      5. distribute-lft-neg-inN/A

        \[\leadsto \cos \color{blue}{\left(\left(\mathsf{neg}\left(\frac{1}{16}\right)\right) \cdot \left(b \cdot \left(t \cdot \left(1 + 2 \cdot a\right)\right)\right)\right)} \cdot x \]
      6. metadata-evalN/A

        \[\leadsto \cos \left(\color{blue}{\frac{-1}{16}} \cdot \left(b \cdot \left(t \cdot \left(1 + 2 \cdot a\right)\right)\right)\right) \cdot x \]
      7. lower-*.f64N/A

        \[\leadsto \cos \color{blue}{\left(\frac{-1}{16} \cdot \left(b \cdot \left(t \cdot \left(1 + 2 \cdot a\right)\right)\right)\right)} \cdot x \]
      8. *-commutativeN/A

        \[\leadsto \cos \left(\frac{-1}{16} \cdot \color{blue}{\left(\left(t \cdot \left(1 + 2 \cdot a\right)\right) \cdot b\right)}\right) \cdot x \]
      9. lower-*.f64N/A

        \[\leadsto \cos \left(\frac{-1}{16} \cdot \color{blue}{\left(\left(t \cdot \left(1 + 2 \cdot a\right)\right) \cdot b\right)}\right) \cdot x \]
      10. *-commutativeN/A

        \[\leadsto \cos \left(\frac{-1}{16} \cdot \left(\color{blue}{\left(\left(1 + 2 \cdot a\right) \cdot t\right)} \cdot b\right)\right) \cdot x \]
      11. lower-*.f64N/A

        \[\leadsto \cos \left(\frac{-1}{16} \cdot \left(\color{blue}{\left(\left(1 + 2 \cdot a\right) \cdot t\right)} \cdot b\right)\right) \cdot x \]
      12. +-commutativeN/A

        \[\leadsto \cos \left(\frac{-1}{16} \cdot \left(\left(\color{blue}{\left(2 \cdot a + 1\right)} \cdot t\right) \cdot b\right)\right) \cdot x \]
      13. lower-fma.f6424.7

        \[\leadsto \cos \left(-0.0625 \cdot \left(\left(\color{blue}{\mathsf{fma}\left(2, a, 1\right)} \cdot t\right) \cdot b\right)\right) \cdot x \]
    8. Applied rewrites24.7%

      \[\leadsto \color{blue}{\cos \left(-0.0625 \cdot \left(\left(\mathsf{fma}\left(2, a, 1\right) \cdot t\right) \cdot b\right)\right) \cdot x} \]
    9. Taylor expanded in a around 0

      \[\leadsto \cos \left(\frac{-1}{16} \cdot \left(b \cdot t\right)\right) \cdot x \]
    10. Step-by-step derivation
      1. Applied rewrites25.5%

        \[\leadsto \cos \left(-0.0625 \cdot \left(b \cdot t\right)\right) \cdot x \]
    11. Recombined 2 regimes into one program.
    12. Final simplification32.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 4.7 \cdot 10^{-6}:\\ \;\;\;\;\cos \left(\left(\left(\mathsf{fma}\left(2, y, 1\right) \cdot z\right) \cdot t\right) \cdot -0.0625\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;\cos \left(\left(b \cdot t\right) \cdot -0.0625\right) \cdot x\\ \end{array} \]
    13. Add Preprocessing

    Alternative 2: 28.5% accurate, 2.1× speedup?

    \[\begin{array}{l} z_m = \left|z\right| \\ \cos \left(\left(\left(t \cdot 0.0625\right) \cdot \left(a \cdot 2\right)\right) \cdot b\right) \cdot \left(1 \cdot x\right) \end{array} \]
    z_m = (fabs.f64 z)
    (FPCore (x y z_m t a b)
     :precision binary64
     (* (cos (* (* (* t 0.0625) (* a 2.0)) b)) (* 1.0 x)))
    z_m = fabs(z);
    double code(double x, double y, double z_m, double t, double a, double b) {
    	return cos((((t * 0.0625) * (a * 2.0)) * b)) * (1.0 * x);
    }
    
    z_m = abs(z)
    real(8) function code(x, y, z_m, t, a, b)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z_m
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        code = cos((((t * 0.0625d0) * (a * 2.0d0)) * b)) * (1.0d0 * x)
    end function
    
    z_m = Math.abs(z);
    public static double code(double x, double y, double z_m, double t, double a, double b) {
    	return Math.cos((((t * 0.0625) * (a * 2.0)) * b)) * (1.0 * x);
    }
    
    z_m = math.fabs(z)
    def code(x, y, z_m, t, a, b):
    	return math.cos((((t * 0.0625) * (a * 2.0)) * b)) * (1.0 * x)
    
    z_m = abs(z)
    function code(x, y, z_m, t, a, b)
    	return Float64(cos(Float64(Float64(Float64(t * 0.0625) * Float64(a * 2.0)) * b)) * Float64(1.0 * x))
    end
    
    z_m = abs(z);
    function tmp = code(x, y, z_m, t, a, b)
    	tmp = cos((((t * 0.0625) * (a * 2.0)) * b)) * (1.0 * x);
    end
    
    z_m = N[Abs[z], $MachinePrecision]
    code[x_, y_, z$95$m_, t_, a_, b_] := N[(N[Cos[N[(N[(N[(t * 0.0625), $MachinePrecision] * N[(a * 2.0), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]], $MachinePrecision] * N[(1.0 * x), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    z_m = \left|z\right|
    
    \\
    \cos \left(\left(\left(t \cdot 0.0625\right) \cdot \left(a \cdot 2\right)\right) \cdot b\right) \cdot \left(1 \cdot x\right)
    \end{array}
    
    Derivation
    1. Initial program 28.4%

      \[\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. Add Preprocessing
    3. Applied rewrites28.2%

      \[\leadsto \left(x \cdot \color{blue}{\left(\sin \left(0.0625 \cdot \left(t \cdot \left(z \cdot \mathsf{fma}\left(2, y, 1\right)\right)\right)\right) \cdot 0 - \cos \left(\mathsf{fma}\left(0.0625 \cdot \left(t \cdot \mathsf{fma}\left(2, y, 1\right)\right), z, \mathsf{PI}\left(\right)\right)\right) \cdot 1\right)}\right) \cdot \cos \left(\frac{\left(\left(a \cdot 2 + 1\right) \cdot b\right) \cdot t}{16}\right) \]
    4. Taylor expanded in z around 0

      \[\leadsto \left(x \cdot \color{blue}{\left(-1 \cdot \cos \mathsf{PI}\left(\right)\right)}\right) \cdot \cos \left(\frac{\left(\left(a \cdot 2 + 1\right) \cdot b\right) \cdot t}{16}\right) \]
    5. Step-by-step derivation
      1. cos-PIN/A

        \[\leadsto \left(x \cdot \left(-1 \cdot \color{blue}{-1}\right)\right) \cdot \cos \left(\frac{\left(\left(a \cdot 2 + 1\right) \cdot b\right) \cdot t}{16}\right) \]
      2. metadata-eval30.7

        \[\leadsto \left(x \cdot \color{blue}{1}\right) \cdot \cos \left(\frac{\left(\left(a \cdot 2 + 1\right) \cdot b\right) \cdot t}{16}\right) \]
    6. Applied rewrites30.7%

      \[\leadsto \left(x \cdot \color{blue}{1}\right) \cdot \cos \left(\frac{\left(\left(a \cdot 2 + 1\right) \cdot b\right) \cdot t}{16}\right) \]
    7. Taylor expanded in a around inf

      \[\leadsto \left(x \cdot 1\right) \cdot \cos \left(\frac{\left(\color{blue}{\left(2 \cdot a\right)} \cdot b\right) \cdot t}{16}\right) \]
    8. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(x \cdot 1\right) \cdot \cos \left(\frac{\left(\color{blue}{\left(a \cdot 2\right)} \cdot b\right) \cdot t}{16}\right) \]
      2. lower-*.f6431.6

        \[\leadsto \left(x \cdot 1\right) \cdot \cos \left(\frac{\left(\color{blue}{\left(a \cdot 2\right)} \cdot b\right) \cdot t}{16}\right) \]
    9. Applied rewrites31.6%

      \[\leadsto \left(x \cdot 1\right) \cdot \cos \left(\frac{\left(\color{blue}{\left(a \cdot 2\right)} \cdot b\right) \cdot t}{16}\right) \]
    10. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \left(x \cdot 1\right) \cdot \cos \color{blue}{\left(\frac{\left(\left(a \cdot 2\right) \cdot b\right) \cdot t}{16}\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \left(x \cdot 1\right) \cdot \cos \left(\frac{\color{blue}{\left(\left(a \cdot 2\right) \cdot b\right) \cdot t}}{16}\right) \]
      3. associate-/l*N/A

        \[\leadsto \left(x \cdot 1\right) \cdot \cos \color{blue}{\left(\left(\left(a \cdot 2\right) \cdot b\right) \cdot \frac{t}{16}\right)} \]
      4. lift-*.f64N/A

        \[\leadsto \left(x \cdot 1\right) \cdot \cos \left(\color{blue}{\left(\left(a \cdot 2\right) \cdot b\right)} \cdot \frac{t}{16}\right) \]
      5. *-commutativeN/A

        \[\leadsto \left(x \cdot 1\right) \cdot \cos \left(\color{blue}{\left(b \cdot \left(a \cdot 2\right)\right)} \cdot \frac{t}{16}\right) \]
      6. associate-*l*N/A

        \[\leadsto \left(x \cdot 1\right) \cdot \cos \color{blue}{\left(b \cdot \left(\left(a \cdot 2\right) \cdot \frac{t}{16}\right)\right)} \]
      7. lower-*.f64N/A

        \[\leadsto \left(x \cdot 1\right) \cdot \cos \color{blue}{\left(b \cdot \left(\left(a \cdot 2\right) \cdot \frac{t}{16}\right)\right)} \]
      8. div-invN/A

        \[\leadsto \left(x \cdot 1\right) \cdot \cos \left(b \cdot \left(\left(a \cdot 2\right) \cdot \color{blue}{\left(t \cdot \frac{1}{16}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \left(x \cdot 1\right) \cdot \cos \left(b \cdot \left(\left(a \cdot 2\right) \cdot \left(t \cdot \color{blue}{\frac{1}{16}}\right)\right)\right) \]
      10. *-commutativeN/A

        \[\leadsto \left(x \cdot 1\right) \cdot \cos \left(b \cdot \left(\left(a \cdot 2\right) \cdot \color{blue}{\left(\frac{1}{16} \cdot t\right)}\right)\right) \]
      11. lower-*.f64N/A

        \[\leadsto \left(x \cdot 1\right) \cdot \cos \left(b \cdot \color{blue}{\left(\left(a \cdot 2\right) \cdot \left(\frac{1}{16} \cdot t\right)\right)}\right) \]
      12. lower-*.f64N/A

        \[\leadsto \left(x \cdot 1\right) \cdot \cos \left(b \cdot \left(\mathsf{Rewrite=>}\left(lower-*.f64, \left(2 \cdot a\right)\right) \cdot \color{blue}{\left(\frac{1}{16} \cdot t\right)}\right)\right) \]
    11. Applied rewrites31.6%

      \[\leadsto \left(x \cdot 1\right) \cdot \cos \color{blue}{\left(b \cdot \left(\left(2 \cdot a\right) \cdot \left(0.0625 \cdot t\right)\right)\right)} \]
    12. Final simplification31.6%

      \[\leadsto \cos \left(\left(\left(t \cdot 0.0625\right) \cdot \left(a \cdot 2\right)\right) \cdot b\right) \cdot \left(1 \cdot x\right) \]
    13. Add Preprocessing

    Alternative 3: 29.4% accurate, 2.3× speedup?

    \[\begin{array}{l} z_m = \left|z\right| \\ \cos \left(\left(b \cdot t\right) \cdot -0.0625\right) \cdot x \end{array} \]
    z_m = (fabs.f64 z)
    (FPCore (x y z_m t a b) :precision binary64 (* (cos (* (* b t) -0.0625)) x))
    z_m = fabs(z);
    double code(double x, double y, double z_m, double t, double a, double b) {
    	return cos(((b * t) * -0.0625)) * x;
    }
    
    z_m = abs(z)
    real(8) function code(x, y, z_m, t, a, b)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z_m
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        code = cos(((b * t) * (-0.0625d0))) * x
    end function
    
    z_m = Math.abs(z);
    public static double code(double x, double y, double z_m, double t, double a, double b) {
    	return Math.cos(((b * t) * -0.0625)) * x;
    }
    
    z_m = math.fabs(z)
    def code(x, y, z_m, t, a, b):
    	return math.cos(((b * t) * -0.0625)) * x
    
    z_m = abs(z)
    function code(x, y, z_m, t, a, b)
    	return Float64(cos(Float64(Float64(b * t) * -0.0625)) * x)
    end
    
    z_m = abs(z);
    function tmp = code(x, y, z_m, t, a, b)
    	tmp = cos(((b * t) * -0.0625)) * x;
    end
    
    z_m = N[Abs[z], $MachinePrecision]
    code[x_, y_, z$95$m_, t_, a_, b_] := N[(N[Cos[N[(N[(b * t), $MachinePrecision] * -0.0625), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision]
    
    \begin{array}{l}
    z_m = \left|z\right|
    
    \\
    \cos \left(\left(b \cdot t\right) \cdot -0.0625\right) \cdot x
    \end{array}
    
    Derivation
    1. Initial program 28.4%

      \[\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. Add Preprocessing
    3. Taylor expanded in a around inf

      \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \color{blue}{\left(\frac{1}{8} \cdot \left(a \cdot \left(b \cdot t\right)\right)\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \color{blue}{\left(\left(a \cdot \left(b \cdot t\right)\right) \cdot \frac{1}{8}\right)} \]
      2. lower-*.f64N/A

        \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \color{blue}{\left(\left(a \cdot \left(b \cdot t\right)\right) \cdot \frac{1}{8}\right)} \]
      3. *-commutativeN/A

        \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \left(\color{blue}{\left(\left(b \cdot t\right) \cdot a\right)} \cdot \frac{1}{8}\right) \]
      4. lower-*.f64N/A

        \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \left(\color{blue}{\left(\left(b \cdot t\right) \cdot a\right)} \cdot \frac{1}{8}\right) \]
      5. lower-*.f6429.3

        \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \left(\left(\color{blue}{\left(b \cdot t\right)} \cdot a\right) \cdot 0.125\right) \]
    5. Applied rewrites29.3%

      \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \color{blue}{\left(\left(\left(b \cdot t\right) \cdot a\right) \cdot 0.125\right)} \]
    6. Taylor expanded in z around 0

      \[\leadsto \color{blue}{x \cdot \cos \left(\frac{1}{16} \cdot \left(b \cdot \left(t \cdot \left(1 + 2 \cdot a\right)\right)\right)\right)} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{\cos \left(\frac{1}{16} \cdot \left(b \cdot \left(t \cdot \left(1 + 2 \cdot a\right)\right)\right)\right) \cdot x} \]
      2. lower-*.f64N/A

        \[\leadsto \color{blue}{\cos \left(\frac{1}{16} \cdot \left(b \cdot \left(t \cdot \left(1 + 2 \cdot a\right)\right)\right)\right) \cdot x} \]
      3. cos-neg-revN/A

        \[\leadsto \color{blue}{\cos \left(\mathsf{neg}\left(\frac{1}{16} \cdot \left(b \cdot \left(t \cdot \left(1 + 2 \cdot a\right)\right)\right)\right)\right)} \cdot x \]
      4. lower-cos.f64N/A

        \[\leadsto \color{blue}{\cos \left(\mathsf{neg}\left(\frac{1}{16} \cdot \left(b \cdot \left(t \cdot \left(1 + 2 \cdot a\right)\right)\right)\right)\right)} \cdot x \]
      5. distribute-lft-neg-inN/A

        \[\leadsto \cos \color{blue}{\left(\left(\mathsf{neg}\left(\frac{1}{16}\right)\right) \cdot \left(b \cdot \left(t \cdot \left(1 + 2 \cdot a\right)\right)\right)\right)} \cdot x \]
      6. metadata-evalN/A

        \[\leadsto \cos \left(\color{blue}{\frac{-1}{16}} \cdot \left(b \cdot \left(t \cdot \left(1 + 2 \cdot a\right)\right)\right)\right) \cdot x \]
      7. lower-*.f64N/A

        \[\leadsto \cos \color{blue}{\left(\frac{-1}{16} \cdot \left(b \cdot \left(t \cdot \left(1 + 2 \cdot a\right)\right)\right)\right)} \cdot x \]
      8. *-commutativeN/A

        \[\leadsto \cos \left(\frac{-1}{16} \cdot \color{blue}{\left(\left(t \cdot \left(1 + 2 \cdot a\right)\right) \cdot b\right)}\right) \cdot x \]
      9. lower-*.f64N/A

        \[\leadsto \cos \left(\frac{-1}{16} \cdot \color{blue}{\left(\left(t \cdot \left(1 + 2 \cdot a\right)\right) \cdot b\right)}\right) \cdot x \]
      10. *-commutativeN/A

        \[\leadsto \cos \left(\frac{-1}{16} \cdot \left(\color{blue}{\left(\left(1 + 2 \cdot a\right) \cdot t\right)} \cdot b\right)\right) \cdot x \]
      11. lower-*.f64N/A

        \[\leadsto \cos \left(\frac{-1}{16} \cdot \left(\color{blue}{\left(\left(1 + 2 \cdot a\right) \cdot t\right)} \cdot b\right)\right) \cdot x \]
      12. +-commutativeN/A

        \[\leadsto \cos \left(\frac{-1}{16} \cdot \left(\left(\color{blue}{\left(2 \cdot a + 1\right)} \cdot t\right) \cdot b\right)\right) \cdot x \]
      13. lower-fma.f6430.8

        \[\leadsto \cos \left(-0.0625 \cdot \left(\left(\color{blue}{\mathsf{fma}\left(2, a, 1\right)} \cdot t\right) \cdot b\right)\right) \cdot x \]
    8. Applied rewrites30.8%

      \[\leadsto \color{blue}{\cos \left(-0.0625 \cdot \left(\left(\mathsf{fma}\left(2, a, 1\right) \cdot t\right) \cdot b\right)\right) \cdot x} \]
    9. Taylor expanded in a around 0

      \[\leadsto \cos \left(\frac{-1}{16} \cdot \left(b \cdot t\right)\right) \cdot x \]
    10. Step-by-step derivation
      1. Applied rewrites31.3%

        \[\leadsto \cos \left(-0.0625 \cdot \left(b \cdot t\right)\right) \cdot x \]
      2. Final simplification31.3%

        \[\leadsto \cos \left(\left(b \cdot t\right) \cdot -0.0625\right) \cdot x \]
      3. Add Preprocessing

      Alternative 4: 3.1% accurate, 7.5× speedup?

      \[\begin{array}{l} z_m = \left|z\right| \\ \left(\left(-0.0078125 \cdot a\right) \cdot \left(\left(t \cdot x\right) \cdot \left(\left(b \cdot b\right) \cdot t\right)\right)\right) \cdot a \end{array} \]
      z_m = (fabs.f64 z)
      (FPCore (x y z_m t a b)
       :precision binary64
       (* (* (* -0.0078125 a) (* (* t x) (* (* b b) t))) a))
      z_m = fabs(z);
      double code(double x, double y, double z_m, double t, double a, double b) {
      	return ((-0.0078125 * a) * ((t * x) * ((b * b) * t))) * a;
      }
      
      z_m = abs(z)
      real(8) function code(x, y, z_m, t, a, b)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z_m
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          code = (((-0.0078125d0) * a) * ((t * x) * ((b * b) * t))) * a
      end function
      
      z_m = Math.abs(z);
      public static double code(double x, double y, double z_m, double t, double a, double b) {
      	return ((-0.0078125 * a) * ((t * x) * ((b * b) * t))) * a;
      }
      
      z_m = math.fabs(z)
      def code(x, y, z_m, t, a, b):
      	return ((-0.0078125 * a) * ((t * x) * ((b * b) * t))) * a
      
      z_m = abs(z)
      function code(x, y, z_m, t, a, b)
      	return Float64(Float64(Float64(-0.0078125 * a) * Float64(Float64(t * x) * Float64(Float64(b * b) * t))) * a)
      end
      
      z_m = abs(z);
      function tmp = code(x, y, z_m, t, a, b)
      	tmp = ((-0.0078125 * a) * ((t * x) * ((b * b) * t))) * a;
      end
      
      z_m = N[Abs[z], $MachinePrecision]
      code[x_, y_, z$95$m_, t_, a_, b_] := N[(N[(N[(-0.0078125 * a), $MachinePrecision] * N[(N[(t * x), $MachinePrecision] * N[(N[(b * b), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]
      
      \begin{array}{l}
      z_m = \left|z\right|
      
      \\
      \left(\left(-0.0078125 \cdot a\right) \cdot \left(\left(t \cdot x\right) \cdot \left(\left(b \cdot b\right) \cdot t\right)\right)\right) \cdot a
      \end{array}
      
      Derivation
      1. Initial program 28.4%

        \[\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. Add Preprocessing
      3. Taylor expanded in a around inf

        \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \color{blue}{\left(\frac{1}{8} \cdot \left(a \cdot \left(b \cdot t\right)\right)\right)} \]
      4. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \color{blue}{\left(\left(a \cdot \left(b \cdot t\right)\right) \cdot \frac{1}{8}\right)} \]
        2. lower-*.f64N/A

          \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \color{blue}{\left(\left(a \cdot \left(b \cdot t\right)\right) \cdot \frac{1}{8}\right)} \]
        3. *-commutativeN/A

          \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \left(\color{blue}{\left(\left(b \cdot t\right) \cdot a\right)} \cdot \frac{1}{8}\right) \]
        4. lower-*.f64N/A

          \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \left(\color{blue}{\left(\left(b \cdot t\right) \cdot a\right)} \cdot \frac{1}{8}\right) \]
        5. lower-*.f6429.3

          \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \left(\left(\color{blue}{\left(b \cdot t\right)} \cdot a\right) \cdot 0.125\right) \]
      5. Applied rewrites29.3%

        \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \color{blue}{\left(\left(\left(b \cdot t\right) \cdot a\right) \cdot 0.125\right)} \]
      6. Taylor expanded in t around 0

        \[\leadsto \color{blue}{x + {t}^{2} \cdot \left(x \cdot \left(\frac{-1}{512} \cdot \left({b}^{2} \cdot {\left(1 + 2 \cdot a\right)}^{2}\right) + \frac{-1}{512} \cdot \left({z}^{2} \cdot {\left(1 + 2 \cdot y\right)}^{2}\right)\right)\right)} \]
      7. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \color{blue}{{t}^{2} \cdot \left(x \cdot \left(\frac{-1}{512} \cdot \left({b}^{2} \cdot {\left(1 + 2 \cdot a\right)}^{2}\right) + \frac{-1}{512} \cdot \left({z}^{2} \cdot {\left(1 + 2 \cdot y\right)}^{2}\right)\right)\right) + x} \]
        2. associate-*r*N/A

          \[\leadsto \color{blue}{\left({t}^{2} \cdot x\right) \cdot \left(\frac{-1}{512} \cdot \left({b}^{2} \cdot {\left(1 + 2 \cdot a\right)}^{2}\right) + \frac{-1}{512} \cdot \left({z}^{2} \cdot {\left(1 + 2 \cdot y\right)}^{2}\right)\right)} + x \]
        3. lower-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left({t}^{2} \cdot x, \frac{-1}{512} \cdot \left({b}^{2} \cdot {\left(1 + 2 \cdot a\right)}^{2}\right) + \frac{-1}{512} \cdot \left({z}^{2} \cdot {\left(1 + 2 \cdot y\right)}^{2}\right), x\right)} \]
      8. Applied rewrites13.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\left(t \cdot t\right) \cdot x, -0.001953125 \cdot \mathsf{fma}\left({\left(\mathsf{fma}\left(2, a, 1\right)\right)}^{2}, b \cdot b, {\left(\mathsf{fma}\left(2, y, 1\right)\right)}^{2} \cdot \left(z \cdot z\right)\right), x\right)} \]
      9. Taylor expanded in a around inf

        \[\leadsto \frac{-1}{128} \cdot \color{blue}{\left({a}^{2} \cdot \left({b}^{2} \cdot \left({t}^{2} \cdot x\right)\right)\right)} \]
      10. Step-by-step derivation
        1. Applied rewrites2.0%

          \[\leadsto \left(-0.0078125 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(\left(\left(t \cdot t\right) \cdot x\right) \cdot \left(b \cdot b\right)\right)} \]
        2. Step-by-step derivation
          1. Applied rewrites2.9%

            \[\leadsto \left(\left(\left(\left(b \cdot b\right) \cdot t\right) \cdot \left(x \cdot t\right)\right) \cdot \left(-0.0078125 \cdot a\right)\right) \cdot a \]
          2. Final simplification2.9%

            \[\leadsto \left(\left(-0.0078125 \cdot a\right) \cdot \left(\left(t \cdot x\right) \cdot \left(\left(b \cdot b\right) \cdot t\right)\right)\right) \cdot a \]
          3. Add Preprocessing

          Alternative 5: 2.7% accurate, 7.5× speedup?

          \[\begin{array}{l} z_m = \left|z\right| \\ \left(\left(\left(\left(t \cdot t\right) \cdot x\right) \cdot b\right) \cdot \left(\left(a \cdot a\right) \cdot -0.0078125\right)\right) \cdot b \end{array} \]
          z_m = (fabs.f64 z)
          (FPCore (x y z_m t a b)
           :precision binary64
           (* (* (* (* (* t t) x) b) (* (* a a) -0.0078125)) b))
          z_m = fabs(z);
          double code(double x, double y, double z_m, double t, double a, double b) {
          	return ((((t * t) * x) * b) * ((a * a) * -0.0078125)) * b;
          }
          
          z_m = abs(z)
          real(8) function code(x, y, z_m, t, a, b)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8), intent (in) :: z_m
              real(8), intent (in) :: t
              real(8), intent (in) :: a
              real(8), intent (in) :: b
              code = ((((t * t) * x) * b) * ((a * a) * (-0.0078125d0))) * b
          end function
          
          z_m = Math.abs(z);
          public static double code(double x, double y, double z_m, double t, double a, double b) {
          	return ((((t * t) * x) * b) * ((a * a) * -0.0078125)) * b;
          }
          
          z_m = math.fabs(z)
          def code(x, y, z_m, t, a, b):
          	return ((((t * t) * x) * b) * ((a * a) * -0.0078125)) * b
          
          z_m = abs(z)
          function code(x, y, z_m, t, a, b)
          	return Float64(Float64(Float64(Float64(Float64(t * t) * x) * b) * Float64(Float64(a * a) * -0.0078125)) * b)
          end
          
          z_m = abs(z);
          function tmp = code(x, y, z_m, t, a, b)
          	tmp = ((((t * t) * x) * b) * ((a * a) * -0.0078125)) * b;
          end
          
          z_m = N[Abs[z], $MachinePrecision]
          code[x_, y_, z$95$m_, t_, a_, b_] := N[(N[(N[(N[(N[(t * t), $MachinePrecision] * x), $MachinePrecision] * b), $MachinePrecision] * N[(N[(a * a), $MachinePrecision] * -0.0078125), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]
          
          \begin{array}{l}
          z_m = \left|z\right|
          
          \\
          \left(\left(\left(\left(t \cdot t\right) \cdot x\right) \cdot b\right) \cdot \left(\left(a \cdot a\right) \cdot -0.0078125\right)\right) \cdot b
          \end{array}
          
          Derivation
          1. Initial program 28.4%

            \[\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. Add Preprocessing
          3. Taylor expanded in a around inf

            \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \color{blue}{\left(\frac{1}{8} \cdot \left(a \cdot \left(b \cdot t\right)\right)\right)} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \color{blue}{\left(\left(a \cdot \left(b \cdot t\right)\right) \cdot \frac{1}{8}\right)} \]
            2. lower-*.f64N/A

              \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \color{blue}{\left(\left(a \cdot \left(b \cdot t\right)\right) \cdot \frac{1}{8}\right)} \]
            3. *-commutativeN/A

              \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \left(\color{blue}{\left(\left(b \cdot t\right) \cdot a\right)} \cdot \frac{1}{8}\right) \]
            4. lower-*.f64N/A

              \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \left(\color{blue}{\left(\left(b \cdot t\right) \cdot a\right)} \cdot \frac{1}{8}\right) \]
            5. lower-*.f6429.3

              \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \left(\left(\color{blue}{\left(b \cdot t\right)} \cdot a\right) \cdot 0.125\right) \]
          5. Applied rewrites29.3%

            \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \color{blue}{\left(\left(\left(b \cdot t\right) \cdot a\right) \cdot 0.125\right)} \]
          6. Taylor expanded in t around 0

            \[\leadsto \color{blue}{x + {t}^{2} \cdot \left(x \cdot \left(\frac{-1}{512} \cdot \left({b}^{2} \cdot {\left(1 + 2 \cdot a\right)}^{2}\right) + \frac{-1}{512} \cdot \left({z}^{2} \cdot {\left(1 + 2 \cdot y\right)}^{2}\right)\right)\right)} \]
          7. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \color{blue}{{t}^{2} \cdot \left(x \cdot \left(\frac{-1}{512} \cdot \left({b}^{2} \cdot {\left(1 + 2 \cdot a\right)}^{2}\right) + \frac{-1}{512} \cdot \left({z}^{2} \cdot {\left(1 + 2 \cdot y\right)}^{2}\right)\right)\right) + x} \]
            2. associate-*r*N/A

              \[\leadsto \color{blue}{\left({t}^{2} \cdot x\right) \cdot \left(\frac{-1}{512} \cdot \left({b}^{2} \cdot {\left(1 + 2 \cdot a\right)}^{2}\right) + \frac{-1}{512} \cdot \left({z}^{2} \cdot {\left(1 + 2 \cdot y\right)}^{2}\right)\right)} + x \]
            3. lower-fma.f64N/A

              \[\leadsto \color{blue}{\mathsf{fma}\left({t}^{2} \cdot x, \frac{-1}{512} \cdot \left({b}^{2} \cdot {\left(1 + 2 \cdot a\right)}^{2}\right) + \frac{-1}{512} \cdot \left({z}^{2} \cdot {\left(1 + 2 \cdot y\right)}^{2}\right), x\right)} \]
          8. Applied rewrites13.4%

            \[\leadsto \color{blue}{\mathsf{fma}\left(\left(t \cdot t\right) \cdot x, -0.001953125 \cdot \mathsf{fma}\left({\left(\mathsf{fma}\left(2, a, 1\right)\right)}^{2}, b \cdot b, {\left(\mathsf{fma}\left(2, y, 1\right)\right)}^{2} \cdot \left(z \cdot z\right)\right), x\right)} \]
          9. Taylor expanded in a around inf

            \[\leadsto \frac{-1}{128} \cdot \color{blue}{\left({a}^{2} \cdot \left({b}^{2} \cdot \left({t}^{2} \cdot x\right)\right)\right)} \]
          10. Step-by-step derivation
            1. Applied rewrites2.0%

              \[\leadsto \left(-0.0078125 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(\left(\left(t \cdot t\right) \cdot x\right) \cdot \left(b \cdot b\right)\right)} \]
            2. Step-by-step derivation
              1. Applied rewrites2.6%

                \[\leadsto \left(\left(\left(a \cdot a\right) \cdot -0.0078125\right) \cdot \left(\left(\left(t \cdot t\right) \cdot x\right) \cdot b\right)\right) \cdot b \]
              2. Final simplification2.6%

                \[\leadsto \left(\left(\left(\left(t \cdot t\right) \cdot x\right) \cdot b\right) \cdot \left(\left(a \cdot a\right) \cdot -0.0078125\right)\right) \cdot b \]
              3. Add Preprocessing

              Alternative 6: 2.6% accurate, 7.5× speedup?

              \[\begin{array}{l} z_m = \left|z\right| \\ \left(\left(\left(\left(b \cdot b\right) \cdot x\right) \cdot t\right) \cdot t\right) \cdot \left(\left(a \cdot a\right) \cdot -0.0078125\right) \end{array} \]
              z_m = (fabs.f64 z)
              (FPCore (x y z_m t a b)
               :precision binary64
               (* (* (* (* (* b b) x) t) t) (* (* a a) -0.0078125)))
              z_m = fabs(z);
              double code(double x, double y, double z_m, double t, double a, double b) {
              	return ((((b * b) * x) * t) * t) * ((a * a) * -0.0078125);
              }
              
              z_m = abs(z)
              real(8) function code(x, y, z_m, t, a, b)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  real(8), intent (in) :: z_m
                  real(8), intent (in) :: t
                  real(8), intent (in) :: a
                  real(8), intent (in) :: b
                  code = ((((b * b) * x) * t) * t) * ((a * a) * (-0.0078125d0))
              end function
              
              z_m = Math.abs(z);
              public static double code(double x, double y, double z_m, double t, double a, double b) {
              	return ((((b * b) * x) * t) * t) * ((a * a) * -0.0078125);
              }
              
              z_m = math.fabs(z)
              def code(x, y, z_m, t, a, b):
              	return ((((b * b) * x) * t) * t) * ((a * a) * -0.0078125)
              
              z_m = abs(z)
              function code(x, y, z_m, t, a, b)
              	return Float64(Float64(Float64(Float64(Float64(b * b) * x) * t) * t) * Float64(Float64(a * a) * -0.0078125))
              end
              
              z_m = abs(z);
              function tmp = code(x, y, z_m, t, a, b)
              	tmp = ((((b * b) * x) * t) * t) * ((a * a) * -0.0078125);
              end
              
              z_m = N[Abs[z], $MachinePrecision]
              code[x_, y_, z$95$m_, t_, a_, b_] := N[(N[(N[(N[(N[(b * b), $MachinePrecision] * x), $MachinePrecision] * t), $MachinePrecision] * t), $MachinePrecision] * N[(N[(a * a), $MachinePrecision] * -0.0078125), $MachinePrecision]), $MachinePrecision]
              
              \begin{array}{l}
              z_m = \left|z\right|
              
              \\
              \left(\left(\left(\left(b \cdot b\right) \cdot x\right) \cdot t\right) \cdot t\right) \cdot \left(\left(a \cdot a\right) \cdot -0.0078125\right)
              \end{array}
              
              Derivation
              1. Initial program 28.4%

                \[\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. Add Preprocessing
              3. Taylor expanded in a around inf

                \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \color{blue}{\left(\frac{1}{8} \cdot \left(a \cdot \left(b \cdot t\right)\right)\right)} \]
              4. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \color{blue}{\left(\left(a \cdot \left(b \cdot t\right)\right) \cdot \frac{1}{8}\right)} \]
                2. lower-*.f64N/A

                  \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \color{blue}{\left(\left(a \cdot \left(b \cdot t\right)\right) \cdot \frac{1}{8}\right)} \]
                3. *-commutativeN/A

                  \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \left(\color{blue}{\left(\left(b \cdot t\right) \cdot a\right)} \cdot \frac{1}{8}\right) \]
                4. lower-*.f64N/A

                  \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \left(\color{blue}{\left(\left(b \cdot t\right) \cdot a\right)} \cdot \frac{1}{8}\right) \]
                5. lower-*.f6429.3

                  \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \left(\left(\color{blue}{\left(b \cdot t\right)} \cdot a\right) \cdot 0.125\right) \]
              5. Applied rewrites29.3%

                \[\leadsto \left(x \cdot \cos \left(\frac{\left(\left(y \cdot 2 + 1\right) \cdot z\right) \cdot t}{16}\right)\right) \cdot \cos \color{blue}{\left(\left(\left(b \cdot t\right) \cdot a\right) \cdot 0.125\right)} \]
              6. Taylor expanded in t around 0

                \[\leadsto \color{blue}{x + {t}^{2} \cdot \left(x \cdot \left(\frac{-1}{512} \cdot \left({b}^{2} \cdot {\left(1 + 2 \cdot a\right)}^{2}\right) + \frac{-1}{512} \cdot \left({z}^{2} \cdot {\left(1 + 2 \cdot y\right)}^{2}\right)\right)\right)} \]
              7. Step-by-step derivation
                1. +-commutativeN/A

                  \[\leadsto \color{blue}{{t}^{2} \cdot \left(x \cdot \left(\frac{-1}{512} \cdot \left({b}^{2} \cdot {\left(1 + 2 \cdot a\right)}^{2}\right) + \frac{-1}{512} \cdot \left({z}^{2} \cdot {\left(1 + 2 \cdot y\right)}^{2}\right)\right)\right) + x} \]
                2. associate-*r*N/A

                  \[\leadsto \color{blue}{\left({t}^{2} \cdot x\right) \cdot \left(\frac{-1}{512} \cdot \left({b}^{2} \cdot {\left(1 + 2 \cdot a\right)}^{2}\right) + \frac{-1}{512} \cdot \left({z}^{2} \cdot {\left(1 + 2 \cdot y\right)}^{2}\right)\right)} + x \]
                3. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left({t}^{2} \cdot x, \frac{-1}{512} \cdot \left({b}^{2} \cdot {\left(1 + 2 \cdot a\right)}^{2}\right) + \frac{-1}{512} \cdot \left({z}^{2} \cdot {\left(1 + 2 \cdot y\right)}^{2}\right), x\right)} \]
              8. Applied rewrites13.4%

                \[\leadsto \color{blue}{\mathsf{fma}\left(\left(t \cdot t\right) \cdot x, -0.001953125 \cdot \mathsf{fma}\left({\left(\mathsf{fma}\left(2, a, 1\right)\right)}^{2}, b \cdot b, {\left(\mathsf{fma}\left(2, y, 1\right)\right)}^{2} \cdot \left(z \cdot z\right)\right), x\right)} \]
              9. Taylor expanded in a around inf

                \[\leadsto \frac{-1}{128} \cdot \color{blue}{\left({a}^{2} \cdot \left({b}^{2} \cdot \left({t}^{2} \cdot x\right)\right)\right)} \]
              10. Step-by-step derivation
                1. Applied rewrites2.0%

                  \[\leadsto \left(-0.0078125 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(\left(\left(t \cdot t\right) \cdot x\right) \cdot \left(b \cdot b\right)\right)} \]
                2. Step-by-step derivation
                  1. Applied rewrites2.3%

                    \[\leadsto \left(-0.0078125 \cdot \left(a \cdot a\right)\right) \cdot \left(t \cdot \left(t \cdot \color{blue}{\left(\left(b \cdot b\right) \cdot x\right)}\right)\right) \]
                  2. Final simplification2.3%

                    \[\leadsto \left(\left(\left(\left(b \cdot b\right) \cdot x\right) \cdot t\right) \cdot t\right) \cdot \left(\left(a \cdot a\right) \cdot -0.0078125\right) \]
                  3. Add Preprocessing

                  Developer Target 1: 29.9% accurate, 1.1× speedup?

                  \[\begin{array}{l} \\ x \cdot \cos \left(\frac{b}{16} \cdot \frac{t}{\left(1 - a \cdot 2\right) + {\left(a \cdot 2\right)}^{2}}\right) \end{array} \]
                  (FPCore (x y z t a b)
                   :precision binary64
                   (* x (cos (* (/ b 16.0) (/ t (+ (- 1.0 (* a 2.0)) (pow (* a 2.0) 2.0)))))))
                  double code(double x, double y, double z, double t, double a, double b) {
                  	return x * cos(((b / 16.0) * (t / ((1.0 - (a * 2.0)) + pow((a * 2.0), 2.0)))));
                  }
                  
                  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(((b / 16.0d0) * (t / ((1.0d0 - (a * 2.0d0)) + ((a * 2.0d0) ** 2.0d0)))))
                  end function
                  
                  public static double code(double x, double y, double z, double t, double a, double b) {
                  	return x * Math.cos(((b / 16.0) * (t / ((1.0 - (a * 2.0)) + Math.pow((a * 2.0), 2.0)))));
                  }
                  
                  def code(x, y, z, t, a, b):
                  	return x * math.cos(((b / 16.0) * (t / ((1.0 - (a * 2.0)) + math.pow((a * 2.0), 2.0)))))
                  
                  function code(x, y, z, t, a, b)
                  	return Float64(x * cos(Float64(Float64(b / 16.0) * Float64(t / Float64(Float64(1.0 - Float64(a * 2.0)) + (Float64(a * 2.0) ^ 2.0))))))
                  end
                  
                  function tmp = code(x, y, z, t, a, b)
                  	tmp = x * cos(((b / 16.0) * (t / ((1.0 - (a * 2.0)) + ((a * 2.0) ^ 2.0)))));
                  end
                  
                  code[x_, y_, z_, t_, a_, b_] := N[(x * N[Cos[N[(N[(b / 16.0), $MachinePrecision] * N[(t / N[(N[(1.0 - N[(a * 2.0), $MachinePrecision]), $MachinePrecision] + N[Power[N[(a * 2.0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
                  
                  \begin{array}{l}
                  
                  \\
                  x \cdot \cos \left(\frac{b}{16} \cdot \frac{t}{\left(1 - a \cdot 2\right) + {\left(a \cdot 2\right)}^{2}}\right)
                  \end{array}
                  

                  Reproduce

                  ?
                  herbie shell --seed 2024298 
                  (FPCore (x y z t a b)
                    :name "Codec.Picture.Jpg.FastDct:referenceDct from JuicyPixels-3.2.6.1"
                    :precision binary64
                  
                    :alt
                    (! :herbie-platform default (* x (cos (* (/ b 16) (/ t (+ (- 1 (* a 2)) (pow (* a 2) 2)))))))
                  
                    (* (* x (cos (/ (* (* (+ (* y 2.0) 1.0) z) t) 16.0))) (cos (/ (* (* (+ (* a 2.0) 1.0) b) t) 16.0))))