Lanczos kernel

Percentage Accurate: 97.9% → 97.9%
Time: 14.0s
Alternatives: 14
Speedup: 1.0×

Specification

?
\[\left(10^{-5} \leq x \land x \leq 1\right) \land \left(1 \leq tau \land tau \leq 5\right)\]
\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x \cdot \pi\right) \cdot tau\\ \frac{\sin t\_1}{t\_1} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi} \end{array} \end{array} \]
(FPCore (x tau)
 :precision binary32
 (let* ((t_1 (* (* x PI) tau)))
   (* (/ (sin t_1) t_1) (/ (sin (* x PI)) (* x PI)))))
float code(float x, float tau) {
	float t_1 = (x * ((float) M_PI)) * tau;
	return (sinf(t_1) / t_1) * (sinf((x * ((float) M_PI))) / (x * ((float) M_PI)));
}
function code(x, tau)
	t_1 = Float32(Float32(x * Float32(pi)) * tau)
	return Float32(Float32(sin(t_1) / t_1) * Float32(sin(Float32(x * Float32(pi))) / Float32(x * Float32(pi))))
end
function tmp = code(x, tau)
	t_1 = (x * single(pi)) * tau;
	tmp = (sin(t_1) / t_1) * (sin((x * single(pi))) / (x * single(pi)));
end
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(x \cdot \pi\right) \cdot tau\\
\frac{\sin t\_1}{t\_1} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi}
\end{array}
\end{array}

Sampling outcomes in binary32 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 14 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: 97.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x \cdot \pi\right) \cdot tau\\ \frac{\sin t\_1}{t\_1} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi} \end{array} \end{array} \]
(FPCore (x tau)
 :precision binary32
 (let* ((t_1 (* (* x PI) tau)))
   (* (/ (sin t_1) t_1) (/ (sin (* x PI)) (* x PI)))))
float code(float x, float tau) {
	float t_1 = (x * ((float) M_PI)) * tau;
	return (sinf(t_1) / t_1) * (sinf((x * ((float) M_PI))) / (x * ((float) M_PI)));
}
function code(x, tau)
	t_1 = Float32(Float32(x * Float32(pi)) * tau)
	return Float32(Float32(sin(t_1) / t_1) * Float32(sin(Float32(x * Float32(pi))) / Float32(x * Float32(pi))))
end
function tmp = code(x, tau)
	t_1 = (x * single(pi)) * tau;
	tmp = (sin(t_1) / t_1) * (sin((x * single(pi))) / (x * single(pi)));
end
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(x \cdot \pi\right) \cdot tau\\
\frac{\sin t\_1}{t\_1} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi}
\end{array}
\end{array}

Alternative 1: 97.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x \cdot \pi\right) \cdot tau\\ \frac{\sin t\_1}{t\_1} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi} \end{array} \end{array} \]
(FPCore (x tau)
 :precision binary32
 (let* ((t_1 (* (* x PI) tau)))
   (* (/ (sin t_1) t_1) (/ (sin (* x PI)) (* x PI)))))
float code(float x, float tau) {
	float t_1 = (x * ((float) M_PI)) * tau;
	return (sinf(t_1) / t_1) * (sinf((x * ((float) M_PI))) / (x * ((float) M_PI)));
}
function code(x, tau)
	t_1 = Float32(Float32(x * Float32(pi)) * tau)
	return Float32(Float32(sin(t_1) / t_1) * Float32(sin(Float32(x * Float32(pi))) / Float32(x * Float32(pi))))
end
function tmp = code(x, tau)
	t_1 = (x * single(pi)) * tau;
	tmp = (sin(t_1) / t_1) * (sin((x * single(pi))) / (x * single(pi)));
end
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(x \cdot \pi\right) \cdot tau\\
\frac{\sin t\_1}{t\_1} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi}
\end{array}
\end{array}
Derivation
  1. Initial program 98.1%

    \[\frac{\sin \left(\left(x \cdot \pi\right) \cdot tau\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi} \]
  2. Add Preprocessing
  3. Add Preprocessing

Alternative 2: 97.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(\pi \cdot tau\right)\\ \sin t\_1 \cdot \frac{\sin \left(x \cdot \pi\right)}{\left(x \cdot \pi\right) \cdot t\_1} \end{array} \end{array} \]
(FPCore (x tau)
 :precision binary32
 (let* ((t_1 (* x (* PI tau))))
   (* (sin t_1) (/ (sin (* x PI)) (* (* x PI) t_1)))))
float code(float x, float tau) {
	float t_1 = x * (((float) M_PI) * tau);
	return sinf(t_1) * (sinf((x * ((float) M_PI))) / ((x * ((float) M_PI)) * t_1));
}
function code(x, tau)
	t_1 = Float32(x * Float32(Float32(pi) * tau))
	return Float32(sin(t_1) * Float32(sin(Float32(x * Float32(pi))) / Float32(Float32(x * Float32(pi)) * t_1)))
end
function tmp = code(x, tau)
	t_1 = x * (single(pi) * tau);
	tmp = sin(t_1) * (sin((x * single(pi))) / ((x * single(pi)) * t_1));
end
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \left(\pi \cdot tau\right)\\
\sin t\_1 \cdot \frac{\sin \left(x \cdot \pi\right)}{\left(x \cdot \pi\right) \cdot t\_1}
\end{array}
\end{array}
Derivation
  1. Initial program 98.1%

    \[\frac{\sin \left(\left(x \cdot \pi\right) \cdot tau\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi} \]
  2. Add Preprocessing
  3. Taylor expanded in x around inf

    \[\leadsto \color{blue}{\frac{\sin \left(tau \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{tau \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)}} \]
  4. Step-by-step derivation
    1. associate-/l*N/A

      \[\leadsto \color{blue}{\sin \left(tau \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{tau \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)}} \]
    2. *-lowering-*.f32N/A

      \[\leadsto \color{blue}{\sin \left(tau \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{tau \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)}} \]
    3. sin-lowering-sin.f32N/A

      \[\leadsto \color{blue}{\sin \left(tau \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{tau \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)} \]
    4. *-commutativeN/A

      \[\leadsto \sin \color{blue}{\left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)} \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{tau \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)} \]
    5. associate-*r*N/A

      \[\leadsto \sin \color{blue}{\left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)} \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{tau \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)} \]
    6. *-commutativeN/A

      \[\leadsto \sin \left(x \cdot \color{blue}{\left(tau \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{tau \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)} \]
    7. *-lowering-*.f32N/A

      \[\leadsto \sin \color{blue}{\left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{tau \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)} \]
    8. *-lowering-*.f32N/A

      \[\leadsto \sin \left(x \cdot \color{blue}{\left(tau \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{tau \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)} \]
    9. PI-lowering-PI.f32N/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{tau \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)} \]
    10. associate-*r*N/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\color{blue}{\left(tau \cdot {x}^{2}\right) \cdot {\mathsf{PI}\left(\right)}^{2}}} \]
    11. unpow2N/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\left(tau \cdot {x}^{2}\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)}} \]
    12. associate-*r*N/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\color{blue}{\left(\left(tau \cdot {x}^{2}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)}} \]
    13. associate-/r*N/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\frac{\frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\left(tau \cdot {x}^{2}\right) \cdot \mathsf{PI}\left(\right)}}{\mathsf{PI}\left(\right)}} \]
    14. associate-/l/N/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\mathsf{PI}\left(\right) \cdot \left(\left(tau \cdot {x}^{2}\right) \cdot \mathsf{PI}\left(\right)\right)}} \]
    15. /-lowering-/.f32N/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\mathsf{PI}\left(\right) \cdot \left(\left(tau \cdot {x}^{2}\right) \cdot \mathsf{PI}\left(\right)\right)}} \]
  5. Simplified96.8%

    \[\leadsto \color{blue}{\sin \left(x \cdot \left(tau \cdot \pi\right)\right) \cdot \frac{\sin \left(x \cdot \pi\right)}{\pi \cdot \left(\left(\left(x \cdot x\right) \cdot tau\right) \cdot \pi\right)}} \]
  6. Step-by-step derivation
    1. associate-*l*N/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\left(x \cdot x\right) \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right)}} \]
    2. *-commutativeN/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\mathsf{PI}\left(\right) \cdot \left(\left(x \cdot x\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot tau\right)}\right)} \]
    3. associate-*l*N/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\mathsf{PI}\left(\right) \cdot \color{blue}{\left(x \cdot \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)\right)}} \]
    4. associate-*l*N/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\color{blue}{\left(\mathsf{PI}\left(\right) \cdot x\right) \cdot \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}} \]
    5. *-commutativeN/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\color{blue}{\left(x \cdot \mathsf{PI}\left(\right)\right)} \cdot \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)} \]
    6. *-commutativeN/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\color{blue}{\left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right) \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)}} \]
    7. *-lowering-*.f32N/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\color{blue}{\left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right) \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)}} \]
    8. *-lowering-*.f32N/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\color{blue}{\left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)} \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)} \]
    9. *-lowering-*.f32N/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\left(x \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot tau\right)}\right) \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)} \]
    10. PI-lowering-PI.f32N/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\left(x \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot tau\right)\right) \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)} \]
    11. *-lowering-*.f32N/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right) \cdot \color{blue}{\left(x \cdot \mathsf{PI}\left(\right)\right)}} \]
    12. PI-lowering-PI.f3297.7

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \pi\right)\right) \cdot \frac{\sin \left(x \cdot \pi\right)}{\left(x \cdot \left(\pi \cdot tau\right)\right) \cdot \left(x \cdot \color{blue}{\pi}\right)} \]
  7. Applied egg-rr97.7%

    \[\leadsto \sin \left(x \cdot \left(tau \cdot \pi\right)\right) \cdot \frac{\sin \left(x \cdot \pi\right)}{\color{blue}{\left(x \cdot \left(\pi \cdot tau\right)\right) \cdot \left(x \cdot \pi\right)}} \]
  8. Final simplification97.7%

    \[\leadsto \sin \left(x \cdot \left(\pi \cdot tau\right)\right) \cdot \frac{\sin \left(x \cdot \pi\right)}{\left(x \cdot \pi\right) \cdot \left(x \cdot \left(\pi \cdot tau\right)\right)} \]
  9. Add Preprocessing

Alternative 3: 97.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(\pi \cdot tau\right)\\ \sin t\_1 \cdot \frac{\sin \left(x \cdot \pi\right)}{\pi \cdot \left(x \cdot t\_1\right)} \end{array} \end{array} \]
(FPCore (x tau)
 :precision binary32
 (let* ((t_1 (* x (* PI tau))))
   (* (sin t_1) (/ (sin (* x PI)) (* PI (* x t_1))))))
float code(float x, float tau) {
	float t_1 = x * (((float) M_PI) * tau);
	return sinf(t_1) * (sinf((x * ((float) M_PI))) / (((float) M_PI) * (x * t_1)));
}
function code(x, tau)
	t_1 = Float32(x * Float32(Float32(pi) * tau))
	return Float32(sin(t_1) * Float32(sin(Float32(x * Float32(pi))) / Float32(Float32(pi) * Float32(x * t_1))))
end
function tmp = code(x, tau)
	t_1 = x * (single(pi) * tau);
	tmp = sin(t_1) * (sin((x * single(pi))) / (single(pi) * (x * t_1)));
end
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \left(\pi \cdot tau\right)\\
\sin t\_1 \cdot \frac{\sin \left(x \cdot \pi\right)}{\pi \cdot \left(x \cdot t\_1\right)}
\end{array}
\end{array}
Derivation
  1. Initial program 98.1%

    \[\frac{\sin \left(\left(x \cdot \pi\right) \cdot tau\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi} \]
  2. Add Preprocessing
  3. Taylor expanded in x around inf

    \[\leadsto \color{blue}{\frac{\sin \left(tau \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{tau \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)}} \]
  4. Step-by-step derivation
    1. associate-/l*N/A

      \[\leadsto \color{blue}{\sin \left(tau \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{tau \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)}} \]
    2. *-lowering-*.f32N/A

      \[\leadsto \color{blue}{\sin \left(tau \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{tau \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)}} \]
    3. sin-lowering-sin.f32N/A

      \[\leadsto \color{blue}{\sin \left(tau \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{tau \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)} \]
    4. *-commutativeN/A

      \[\leadsto \sin \color{blue}{\left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)} \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{tau \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)} \]
    5. associate-*r*N/A

      \[\leadsto \sin \color{blue}{\left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)} \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{tau \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)} \]
    6. *-commutativeN/A

      \[\leadsto \sin \left(x \cdot \color{blue}{\left(tau \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{tau \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)} \]
    7. *-lowering-*.f32N/A

      \[\leadsto \sin \color{blue}{\left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{tau \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)} \]
    8. *-lowering-*.f32N/A

      \[\leadsto \sin \left(x \cdot \color{blue}{\left(tau \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{tau \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)} \]
    9. PI-lowering-PI.f32N/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{tau \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)} \]
    10. associate-*r*N/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\color{blue}{\left(tau \cdot {x}^{2}\right) \cdot {\mathsf{PI}\left(\right)}^{2}}} \]
    11. unpow2N/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\left(tau \cdot {x}^{2}\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)}} \]
    12. associate-*r*N/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\color{blue}{\left(\left(tau \cdot {x}^{2}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)}} \]
    13. associate-/r*N/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\frac{\frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\left(tau \cdot {x}^{2}\right) \cdot \mathsf{PI}\left(\right)}}{\mathsf{PI}\left(\right)}} \]
    14. associate-/l/N/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\mathsf{PI}\left(\right) \cdot \left(\left(tau \cdot {x}^{2}\right) \cdot \mathsf{PI}\left(\right)\right)}} \]
    15. /-lowering-/.f32N/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\mathsf{PI}\left(\right) \cdot \left(\left(tau \cdot {x}^{2}\right) \cdot \mathsf{PI}\left(\right)\right)}} \]
  5. Simplified96.8%

    \[\leadsto \color{blue}{\sin \left(x \cdot \left(tau \cdot \pi\right)\right) \cdot \frac{\sin \left(x \cdot \pi\right)}{\pi \cdot \left(\left(\left(x \cdot x\right) \cdot tau\right) \cdot \pi\right)}} \]
  6. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\color{blue}{\left(\left(\left(x \cdot x\right) \cdot tau\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)}} \]
    2. *-lowering-*.f32N/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\color{blue}{\left(\left(\left(x \cdot x\right) \cdot tau\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)}} \]
    3. associate-*l*N/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\color{blue}{\left(\left(x \cdot x\right) \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \mathsf{PI}\left(\right)} \]
    4. *-commutativeN/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\left(\left(x \cdot x\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot tau\right)}\right) \cdot \mathsf{PI}\left(\right)} \]
    5. associate-*l*N/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\color{blue}{\left(x \cdot \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)\right)} \cdot \mathsf{PI}\left(\right)} \]
    6. *-lowering-*.f32N/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\color{blue}{\left(x \cdot \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)\right)} \cdot \mathsf{PI}\left(\right)} \]
    7. *-lowering-*.f32N/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\left(x \cdot \color{blue}{\left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}\right) \cdot \mathsf{PI}\left(\right)} \]
    8. *-lowering-*.f32N/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\left(x \cdot \left(x \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot tau\right)}\right)\right) \cdot \mathsf{PI}\left(\right)} \]
    9. PI-lowering-PI.f32N/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\left(x \cdot \left(x \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot tau\right)\right)\right) \cdot \mathsf{PI}\left(\right)} \]
    10. PI-lowering-PI.f3297.3

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \pi\right)\right) \cdot \frac{\sin \left(x \cdot \pi\right)}{\left(x \cdot \left(x \cdot \left(\pi \cdot tau\right)\right)\right) \cdot \color{blue}{\pi}} \]
  7. Applied egg-rr97.3%

    \[\leadsto \sin \left(x \cdot \left(tau \cdot \pi\right)\right) \cdot \frac{\sin \left(x \cdot \pi\right)}{\color{blue}{\left(x \cdot \left(x \cdot \left(\pi \cdot tau\right)\right)\right) \cdot \pi}} \]
  8. Final simplification97.3%

    \[\leadsto \sin \left(x \cdot \left(\pi \cdot tau\right)\right) \cdot \frac{\sin \left(x \cdot \pi\right)}{\pi \cdot \left(x \cdot \left(x \cdot \left(\pi \cdot tau\right)\right)\right)} \]
  9. Add Preprocessing

Alternative 4: 96.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \sin \left(x \cdot \left(\pi \cdot tau\right)\right) \cdot \frac{\sin \left(x \cdot \pi\right)}{\pi \cdot \left(\pi \cdot \left(x \cdot \left(x \cdot tau\right)\right)\right)} \end{array} \]
(FPCore (x tau)
 :precision binary32
 (* (sin (* x (* PI tau))) (/ (sin (* x PI)) (* PI (* PI (* x (* x tau)))))))
float code(float x, float tau) {
	return sinf((x * (((float) M_PI) * tau))) * (sinf((x * ((float) M_PI))) / (((float) M_PI) * (((float) M_PI) * (x * (x * tau)))));
}
function code(x, tau)
	return Float32(sin(Float32(x * Float32(Float32(pi) * tau))) * Float32(sin(Float32(x * Float32(pi))) / Float32(Float32(pi) * Float32(Float32(pi) * Float32(x * Float32(x * tau))))))
end
function tmp = code(x, tau)
	tmp = sin((x * (single(pi) * tau))) * (sin((x * single(pi))) / (single(pi) * (single(pi) * (x * (x * tau)))));
end
\begin{array}{l}

\\
\sin \left(x \cdot \left(\pi \cdot tau\right)\right) \cdot \frac{\sin \left(x \cdot \pi\right)}{\pi \cdot \left(\pi \cdot \left(x \cdot \left(x \cdot tau\right)\right)\right)}
\end{array}
Derivation
  1. Initial program 98.1%

    \[\frac{\sin \left(\left(x \cdot \pi\right) \cdot tau\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi} \]
  2. Add Preprocessing
  3. Taylor expanded in x around inf

    \[\leadsto \color{blue}{\frac{\sin \left(tau \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{tau \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)}} \]
  4. Step-by-step derivation
    1. associate-/l*N/A

      \[\leadsto \color{blue}{\sin \left(tau \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{tau \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)}} \]
    2. *-lowering-*.f32N/A

      \[\leadsto \color{blue}{\sin \left(tau \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{tau \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)}} \]
    3. sin-lowering-sin.f32N/A

      \[\leadsto \color{blue}{\sin \left(tau \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{tau \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)} \]
    4. *-commutativeN/A

      \[\leadsto \sin \color{blue}{\left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)} \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{tau \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)} \]
    5. associate-*r*N/A

      \[\leadsto \sin \color{blue}{\left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)} \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{tau \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)} \]
    6. *-commutativeN/A

      \[\leadsto \sin \left(x \cdot \color{blue}{\left(tau \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{tau \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)} \]
    7. *-lowering-*.f32N/A

      \[\leadsto \sin \color{blue}{\left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{tau \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)} \]
    8. *-lowering-*.f32N/A

      \[\leadsto \sin \left(x \cdot \color{blue}{\left(tau \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{tau \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)} \]
    9. PI-lowering-PI.f32N/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{tau \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)} \]
    10. associate-*r*N/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\color{blue}{\left(tau \cdot {x}^{2}\right) \cdot {\mathsf{PI}\left(\right)}^{2}}} \]
    11. unpow2N/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\left(tau \cdot {x}^{2}\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)}} \]
    12. associate-*r*N/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\color{blue}{\left(\left(tau \cdot {x}^{2}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)}} \]
    13. associate-/r*N/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\frac{\frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\left(tau \cdot {x}^{2}\right) \cdot \mathsf{PI}\left(\right)}}{\mathsf{PI}\left(\right)}} \]
    14. associate-/l/N/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\mathsf{PI}\left(\right) \cdot \left(\left(tau \cdot {x}^{2}\right) \cdot \mathsf{PI}\left(\right)\right)}} \]
    15. /-lowering-/.f32N/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\mathsf{PI}\left(\right) \cdot \left(\left(tau \cdot {x}^{2}\right) \cdot \mathsf{PI}\left(\right)\right)}} \]
  5. Simplified96.8%

    \[\leadsto \color{blue}{\sin \left(x \cdot \left(tau \cdot \pi\right)\right) \cdot \frac{\sin \left(x \cdot \pi\right)}{\pi \cdot \left(\left(\left(x \cdot x\right) \cdot tau\right) \cdot \pi\right)}} \]
  6. Step-by-step derivation
    1. *-lowering-*.f32N/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\left(\left(x \cdot x\right) \cdot tau\right) \cdot \mathsf{PI}\left(\right)\right)}} \]
    2. associate-*l*N/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\mathsf{PI}\left(\right) \cdot \left(\color{blue}{\left(x \cdot \left(x \cdot tau\right)\right)} \cdot \mathsf{PI}\left(\right)\right)} \]
    3. *-lowering-*.f32N/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\mathsf{PI}\left(\right) \cdot \left(\color{blue}{\left(x \cdot \left(x \cdot tau\right)\right)} \cdot \mathsf{PI}\left(\right)\right)} \]
    4. *-lowering-*.f32N/A

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\mathsf{PI}\left(\right) \cdot \left(\left(x \cdot \color{blue}{\left(x \cdot tau\right)}\right) \cdot \mathsf{PI}\left(\right)\right)} \]
    5. PI-lowering-PI.f3296.8

      \[\leadsto \sin \left(x \cdot \left(tau \cdot \pi\right)\right) \cdot \frac{\sin \left(x \cdot \pi\right)}{\pi \cdot \left(\left(x \cdot \left(x \cdot tau\right)\right) \cdot \color{blue}{\pi}\right)} \]
  7. Applied egg-rr96.8%

    \[\leadsto \sin \left(x \cdot \left(tau \cdot \pi\right)\right) \cdot \frac{\sin \left(x \cdot \pi\right)}{\pi \cdot \color{blue}{\left(\left(x \cdot \left(x \cdot tau\right)\right) \cdot \pi\right)}} \]
  8. Final simplification96.8%

    \[\leadsto \sin \left(x \cdot \left(\pi \cdot tau\right)\right) \cdot \frac{\sin \left(x \cdot \pi\right)}{\pi \cdot \left(\pi \cdot \left(x \cdot \left(x \cdot tau\right)\right)\right)} \]
  9. Add Preprocessing

Alternative 5: 91.4% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x \cdot \pi\right) \cdot tau\\ \frac{\sin t\_1}{t\_1} \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(\left(\pi \cdot \pi\right) \cdot \left(\pi \cdot \pi\right), \left(x \cdot x\right) \cdot 0.008333333333333333, \left(\pi \cdot \pi\right) \cdot -0.16666666666666666\right), 1\right) \end{array} \end{array} \]
(FPCore (x tau)
 :precision binary32
 (let* ((t_1 (* (* x PI) tau)))
   (*
    (/ (sin t_1) t_1)
    (fma
     (* x x)
     (fma
      (* (* PI PI) (* PI PI))
      (* (* x x) 0.008333333333333333)
      (* (* PI PI) -0.16666666666666666))
     1.0))))
float code(float x, float tau) {
	float t_1 = (x * ((float) M_PI)) * tau;
	return (sinf(t_1) / t_1) * fmaf((x * x), fmaf(((((float) M_PI) * ((float) M_PI)) * (((float) M_PI) * ((float) M_PI))), ((x * x) * 0.008333333333333333f), ((((float) M_PI) * ((float) M_PI)) * -0.16666666666666666f)), 1.0f);
}
function code(x, tau)
	t_1 = Float32(Float32(x * Float32(pi)) * tau)
	return Float32(Float32(sin(t_1) / t_1) * fma(Float32(x * x), fma(Float32(Float32(Float32(pi) * Float32(pi)) * Float32(Float32(pi) * Float32(pi))), Float32(Float32(x * x) * Float32(0.008333333333333333)), Float32(Float32(Float32(pi) * Float32(pi)) * Float32(-0.16666666666666666))), Float32(1.0)))
end
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(x \cdot \pi\right) \cdot tau\\
\frac{\sin t\_1}{t\_1} \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(\left(\pi \cdot \pi\right) \cdot \left(\pi \cdot \pi\right), \left(x \cdot x\right) \cdot 0.008333333333333333, \left(\pi \cdot \pi\right) \cdot -0.16666666666666666\right), 1\right)
\end{array}
\end{array}
Derivation
  1. Initial program 98.1%

    \[\frac{\sin \left(\left(x \cdot \pi\right) \cdot tau\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. add-sqr-sqrtN/A

      \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \frac{\sin \left(x \cdot \color{blue}{\left(\sqrt{\mathsf{PI}\left(\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}\right)}{x \cdot \mathsf{PI}\left(\right)} \]
    2. associate-*r*N/A

      \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \frac{\sin \color{blue}{\left(\left(x \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}}{x \cdot \mathsf{PI}\left(\right)} \]
    3. *-commutativeN/A

      \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \frac{\sin \left(\color{blue}{\left(\sqrt{\mathsf{PI}\left(\right)} \cdot x\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}{x \cdot \mathsf{PI}\left(\right)} \]
    4. *-lowering-*.f32N/A

      \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \frac{\sin \color{blue}{\left(\left(\sqrt{\mathsf{PI}\left(\right)} \cdot x\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}}{x \cdot \mathsf{PI}\left(\right)} \]
    5. *-commutativeN/A

      \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \frac{\sin \left(\color{blue}{\left(x \cdot \sqrt{\mathsf{PI}\left(\right)}\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}{x \cdot \mathsf{PI}\left(\right)} \]
    6. *-lowering-*.f32N/A

      \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \frac{\sin \left(\color{blue}{\left(x \cdot \sqrt{\mathsf{PI}\left(\right)}\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}{x \cdot \mathsf{PI}\left(\right)} \]
    7. sqrt-lowering-sqrt.f32N/A

      \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \frac{\sin \left(\left(x \cdot \color{blue}{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}{x \cdot \mathsf{PI}\left(\right)} \]
    8. PI-lowering-PI.f32N/A

      \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \frac{\sin \left(\left(x \cdot \sqrt{\color{blue}{\mathsf{PI}\left(\right)}}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}{x \cdot \mathsf{PI}\left(\right)} \]
    9. sqrt-lowering-sqrt.f32N/A

      \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \frac{\sin \left(\left(x \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \color{blue}{\sqrt{\mathsf{PI}\left(\right)}}\right)}{x \cdot \mathsf{PI}\left(\right)} \]
    10. PI-lowering-PI.f3297.4

      \[\leadsto \frac{\sin \left(\left(x \cdot \pi\right) \cdot tau\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \frac{\sin \left(\left(x \cdot \sqrt{\pi}\right) \cdot \sqrt{\color{blue}{\pi}}\right)}{x \cdot \pi} \]
  4. Applied egg-rr97.4%

    \[\leadsto \frac{\sin \left(\left(x \cdot \pi\right) \cdot tau\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \frac{\sin \color{blue}{\left(\left(x \cdot \sqrt{\pi}\right) \cdot \sqrt{\pi}\right)}}{x \cdot \pi} \]
  5. Taylor expanded in x around 0

    \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \color{blue}{\left(1 + {x}^{2} \cdot \left(\frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{120} \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)} \]
  6. Step-by-step derivation
    1. +-commutativeN/A

      \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \color{blue}{\left({x}^{2} \cdot \left(\frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{120} \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right) + 1\right)} \]
    2. accelerator-lowering-fma.f32N/A

      \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \color{blue}{\mathsf{fma}\left({x}^{2}, \frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{120} \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right), 1\right)} \]
  7. Simplified92.2%

    \[\leadsto \frac{\sin \left(\left(x \cdot \pi\right) \cdot tau\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \color{blue}{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(\left(\pi \cdot \pi\right) \cdot \left(\pi \cdot \pi\right), \left(x \cdot x\right) \cdot 0.008333333333333333, -0.16666666666666666 \cdot \left(\pi \cdot \pi\right)\right), 1\right)} \]
  8. Final simplification92.2%

    \[\leadsto \frac{\sin \left(\left(x \cdot \pi\right) \cdot tau\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(\left(\pi \cdot \pi\right) \cdot \left(\pi \cdot \pi\right), \left(x \cdot x\right) \cdot 0.008333333333333333, \left(\pi \cdot \pi\right) \cdot -0.16666666666666666\right), 1\right) \]
  9. Add Preprocessing

Alternative 6: 85.3% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x \cdot \pi\right) \cdot tau\\ \frac{\sin t\_1}{t\_1} \cdot \mathsf{fma}\left(x \cdot x, \left(\pi \cdot \pi\right) \cdot -0.16666666666666666, 1\right) \end{array} \end{array} \]
(FPCore (x tau)
 :precision binary32
 (let* ((t_1 (* (* x PI) tau)))
   (* (/ (sin t_1) t_1) (fma (* x x) (* (* PI PI) -0.16666666666666666) 1.0))))
float code(float x, float tau) {
	float t_1 = (x * ((float) M_PI)) * tau;
	return (sinf(t_1) / t_1) * fmaf((x * x), ((((float) M_PI) * ((float) M_PI)) * -0.16666666666666666f), 1.0f);
}
function code(x, tau)
	t_1 = Float32(Float32(x * Float32(pi)) * tau)
	return Float32(Float32(sin(t_1) / t_1) * fma(Float32(x * x), Float32(Float32(Float32(pi) * Float32(pi)) * Float32(-0.16666666666666666)), Float32(1.0)))
end
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(x \cdot \pi\right) \cdot tau\\
\frac{\sin t\_1}{t\_1} \cdot \mathsf{fma}\left(x \cdot x, \left(\pi \cdot \pi\right) \cdot -0.16666666666666666, 1\right)
\end{array}
\end{array}
Derivation
  1. Initial program 98.1%

    \[\frac{\sin \left(\left(x \cdot \pi\right) \cdot tau\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. add-sqr-sqrtN/A

      \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \frac{\sin \left(x \cdot \color{blue}{\left(\sqrt{\mathsf{PI}\left(\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}\right)}{x \cdot \mathsf{PI}\left(\right)} \]
    2. associate-*r*N/A

      \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \frac{\sin \color{blue}{\left(\left(x \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}}{x \cdot \mathsf{PI}\left(\right)} \]
    3. *-commutativeN/A

      \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \frac{\sin \left(\color{blue}{\left(\sqrt{\mathsf{PI}\left(\right)} \cdot x\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}{x \cdot \mathsf{PI}\left(\right)} \]
    4. *-lowering-*.f32N/A

      \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \frac{\sin \color{blue}{\left(\left(\sqrt{\mathsf{PI}\left(\right)} \cdot x\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}}{x \cdot \mathsf{PI}\left(\right)} \]
    5. *-commutativeN/A

      \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \frac{\sin \left(\color{blue}{\left(x \cdot \sqrt{\mathsf{PI}\left(\right)}\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}{x \cdot \mathsf{PI}\left(\right)} \]
    6. *-lowering-*.f32N/A

      \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \frac{\sin \left(\color{blue}{\left(x \cdot \sqrt{\mathsf{PI}\left(\right)}\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}{x \cdot \mathsf{PI}\left(\right)} \]
    7. sqrt-lowering-sqrt.f32N/A

      \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \frac{\sin \left(\left(x \cdot \color{blue}{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}{x \cdot \mathsf{PI}\left(\right)} \]
    8. PI-lowering-PI.f32N/A

      \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \frac{\sin \left(\left(x \cdot \sqrt{\color{blue}{\mathsf{PI}\left(\right)}}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}{x \cdot \mathsf{PI}\left(\right)} \]
    9. sqrt-lowering-sqrt.f32N/A

      \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \frac{\sin \left(\left(x \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \color{blue}{\sqrt{\mathsf{PI}\left(\right)}}\right)}{x \cdot \mathsf{PI}\left(\right)} \]
    10. PI-lowering-PI.f3297.4

      \[\leadsto \frac{\sin \left(\left(x \cdot \pi\right) \cdot tau\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \frac{\sin \left(\left(x \cdot \sqrt{\pi}\right) \cdot \sqrt{\color{blue}{\pi}}\right)}{x \cdot \pi} \]
  4. Applied egg-rr97.4%

    \[\leadsto \frac{\sin \left(\left(x \cdot \pi\right) \cdot tau\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \frac{\sin \color{blue}{\left(\left(x \cdot \sqrt{\pi}\right) \cdot \sqrt{\pi}\right)}}{x \cdot \pi} \]
  5. Taylor expanded in x around 0

    \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \color{blue}{\left(1 + \frac{-1}{6} \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \]
  6. Step-by-step derivation
    1. +-commutativeN/A

      \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \color{blue}{\left(\frac{-1}{6} \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + 1\right)} \]
    2. *-commutativeN/A

      \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \left(\color{blue}{\left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot \frac{-1}{6}} + 1\right) \]
    3. associate-*r*N/A

      \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \left(\color{blue}{{x}^{2} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \frac{-1}{6}\right)} + 1\right) \]
    4. *-commutativeN/A

      \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \left({x}^{2} \cdot \color{blue}{\left(\frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2}\right)} + 1\right) \]
    5. accelerator-lowering-fma.f32N/A

      \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \color{blue}{\mathsf{fma}\left({x}^{2}, \frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2}, 1\right)} \]
    6. unpow2N/A

      \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2}, 1\right) \]
    7. *-lowering-*.f32N/A

      \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2}, 1\right) \]
    8. *-lowering-*.f32N/A

      \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \mathsf{fma}\left(x \cdot x, \color{blue}{\frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2}}, 1\right) \]
    9. unpow2N/A

      \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \mathsf{fma}\left(x \cdot x, \frac{-1}{6} \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)}, 1\right) \]
    10. *-lowering-*.f32N/A

      \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \mathsf{fma}\left(x \cdot x, \frac{-1}{6} \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)}, 1\right) \]
    11. PI-lowering-PI.f32N/A

      \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \mathsf{fma}\left(x \cdot x, \frac{-1}{6} \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right)\right), 1\right) \]
    12. PI-lowering-PI.f3287.1

      \[\leadsto \frac{\sin \left(\left(x \cdot \pi\right) \cdot tau\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \mathsf{fma}\left(x \cdot x, -0.16666666666666666 \cdot \left(\pi \cdot \color{blue}{\pi}\right), 1\right) \]
  7. Simplified87.1%

    \[\leadsto \frac{\sin \left(\left(x \cdot \pi\right) \cdot tau\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \color{blue}{\mathsf{fma}\left(x \cdot x, -0.16666666666666666 \cdot \left(\pi \cdot \pi\right), 1\right)} \]
  8. Final simplification87.1%

    \[\leadsto \frac{\sin \left(\left(x \cdot \pi\right) \cdot tau\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \mathsf{fma}\left(x \cdot x, \left(\pi \cdot \pi\right) \cdot -0.16666666666666666, 1\right) \]
  9. Add Preprocessing

Alternative 7: 84.5% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\pi \cdot \pi\right) \cdot \left(\pi \cdot \pi\right)\\ \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(0.008333333333333333, t\_1 \cdot \left(\left(tau \cdot tau\right) \cdot \left(tau \cdot tau\right)\right), t\_1 \cdot \mathsf{fma}\left(tau \cdot tau, 0.027777777777777776, 0.008333333333333333\right)\right), \left(\pi \cdot \pi\right) \cdot \mathsf{fma}\left(-0.16666666666666666, tau \cdot tau, -0.16666666666666666\right)\right), 1\right) \end{array} \end{array} \]
(FPCore (x tau)
 :precision binary32
 (let* ((t_1 (* (* PI PI) (* PI PI))))
   (fma
    (* x x)
    (fma
     (* x x)
     (fma
      0.008333333333333333
      (* t_1 (* (* tau tau) (* tau tau)))
      (* t_1 (fma (* tau tau) 0.027777777777777776 0.008333333333333333)))
     (* (* PI PI) (fma -0.16666666666666666 (* tau tau) -0.16666666666666666)))
    1.0)))
float code(float x, float tau) {
	float t_1 = (((float) M_PI) * ((float) M_PI)) * (((float) M_PI) * ((float) M_PI));
	return fmaf((x * x), fmaf((x * x), fmaf(0.008333333333333333f, (t_1 * ((tau * tau) * (tau * tau))), (t_1 * fmaf((tau * tau), 0.027777777777777776f, 0.008333333333333333f))), ((((float) M_PI) * ((float) M_PI)) * fmaf(-0.16666666666666666f, (tau * tau), -0.16666666666666666f))), 1.0f);
}
function code(x, tau)
	t_1 = Float32(Float32(Float32(pi) * Float32(pi)) * Float32(Float32(pi) * Float32(pi)))
	return fma(Float32(x * x), fma(Float32(x * x), fma(Float32(0.008333333333333333), Float32(t_1 * Float32(Float32(tau * tau) * Float32(tau * tau))), Float32(t_1 * fma(Float32(tau * tau), Float32(0.027777777777777776), Float32(0.008333333333333333)))), Float32(Float32(Float32(pi) * Float32(pi)) * fma(Float32(-0.16666666666666666), Float32(tau * tau), Float32(-0.16666666666666666)))), Float32(1.0))
end
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(\pi \cdot \pi\right) \cdot \left(\pi \cdot \pi\right)\\
\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(0.008333333333333333, t\_1 \cdot \left(\left(tau \cdot tau\right) \cdot \left(tau \cdot tau\right)\right), t\_1 \cdot \mathsf{fma}\left(tau \cdot tau, 0.027777777777777776, 0.008333333333333333\right)\right), \left(\pi \cdot \pi\right) \cdot \mathsf{fma}\left(-0.16666666666666666, tau \cdot tau, -0.16666666666666666\right)\right), 1\right)
\end{array}
\end{array}
Derivation
  1. Initial program 98.1%

    \[\frac{\sin \left(\left(x \cdot \pi\right) \cdot tau\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. associate-*r/N/A

      \[\leadsto \color{blue}{\frac{\frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{x \cdot \mathsf{PI}\left(\right)}} \]
    2. /-lowering-/.f32N/A

      \[\leadsto \color{blue}{\frac{\frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{x \cdot \mathsf{PI}\left(\right)}} \]
  4. Applied egg-rr98.0%

    \[\leadsto \color{blue}{\frac{\frac{\sin \left(x \cdot \left(\pi \cdot tau\right)\right)}{x \cdot \left(\pi \cdot tau\right)} \cdot \sin \left(x \cdot \pi\right)}{x \cdot \pi}} \]
  5. Step-by-step derivation
    1. associate-/l*N/A

      \[\leadsto \color{blue}{\frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)} \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{x \cdot \mathsf{PI}\left(\right)}} \]
    2. clear-numN/A

      \[\leadsto \color{blue}{\frac{1}{\frac{x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)}{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}}} \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \]
    3. frac-timesN/A

      \[\leadsto \color{blue}{\frac{1 \cdot \sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\frac{x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)}{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)} \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)}} \]
    4. *-lft-identityN/A

      \[\leadsto \frac{\color{blue}{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}}{\frac{x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)}{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)} \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)} \]
    5. /-lowering-/.f32N/A

      \[\leadsto \color{blue}{\frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\frac{x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)}{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)} \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)}} \]
    6. sin-lowering-sin.f32N/A

      \[\leadsto \frac{\color{blue}{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}}{\frac{x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)}{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)} \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)} \]
    7. *-lowering-*.f32N/A

      \[\leadsto \frac{\sin \color{blue}{\left(x \cdot \mathsf{PI}\left(\right)\right)}}{\frac{x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)}{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)} \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)} \]
    8. PI-lowering-PI.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)}{\frac{x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)}{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)} \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)} \]
    9. *-lowering-*.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\color{blue}{\frac{x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)}{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)} \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)}} \]
  6. Applied egg-rr97.7%

    \[\leadsto \color{blue}{\frac{\sin \left(x \cdot \pi\right)}{\frac{x \cdot \left(\pi \cdot tau\right)}{\sin \left(x \cdot \left(\pi \cdot tau\right)\right)} \cdot \left(x \cdot \pi\right)}} \]
  7. Taylor expanded in x around 0

    \[\leadsto \color{blue}{1 + {x}^{2} \cdot \left(\frac{-1}{6} \cdot \left({tau}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + \left(\frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2} + {x}^{2} \cdot \left(\frac{1}{120} \cdot \left({tau}^{4} \cdot {\mathsf{PI}\left(\right)}^{4}\right) + \left(\frac{1}{120} \cdot {\mathsf{PI}\left(\right)}^{4} + \frac{1}{36} \cdot \left({tau}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right)} \]
  8. Step-by-step derivation
    1. +-commutativeN/A

      \[\leadsto \color{blue}{{x}^{2} \cdot \left(\frac{-1}{6} \cdot \left({tau}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + \left(\frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2} + {x}^{2} \cdot \left(\frac{1}{120} \cdot \left({tau}^{4} \cdot {\mathsf{PI}\left(\right)}^{4}\right) + \left(\frac{1}{120} \cdot {\mathsf{PI}\left(\right)}^{4} + \frac{1}{36} \cdot \left({tau}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right) + 1} \]
    2. accelerator-lowering-fma.f32N/A

      \[\leadsto \color{blue}{\mathsf{fma}\left({x}^{2}, \frac{-1}{6} \cdot \left({tau}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + \left(\frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2} + {x}^{2} \cdot \left(\frac{1}{120} \cdot \left({tau}^{4} \cdot {\mathsf{PI}\left(\right)}^{4}\right) + \left(\frac{1}{120} \cdot {\mathsf{PI}\left(\right)}^{4} + \frac{1}{36} \cdot \left({tau}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right), 1\right)} \]
  9. Simplified85.6%

    \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(0.008333333333333333, \left(\left(tau \cdot tau\right) \cdot \left(tau \cdot tau\right)\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot \left(\pi \cdot \pi\right)\right), \left(\left(\pi \cdot \pi\right) \cdot \left(\pi \cdot \pi\right)\right) \cdot \mathsf{fma}\left(tau \cdot tau, 0.027777777777777776, 0.008333333333333333\right)\right), \left(\pi \cdot \pi\right) \cdot \mathsf{fma}\left(-0.16666666666666666, tau \cdot tau, -0.16666666666666666\right)\right), 1\right)} \]
  10. Final simplification85.6%

    \[\leadsto \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(0.008333333333333333, \left(\left(\pi \cdot \pi\right) \cdot \left(\pi \cdot \pi\right)\right) \cdot \left(\left(tau \cdot tau\right) \cdot \left(tau \cdot tau\right)\right), \left(\left(\pi \cdot \pi\right) \cdot \left(\pi \cdot \pi\right)\right) \cdot \mathsf{fma}\left(tau \cdot tau, 0.027777777777777776, 0.008333333333333333\right)\right), \left(\pi \cdot \pi\right) \cdot \mathsf{fma}\left(-0.16666666666666666, tau \cdot tau, -0.16666666666666666\right)\right), 1\right) \]
  11. Add Preprocessing

Alternative 8: 83.9% accurate, 2.7× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, \left(\left(\pi \cdot \pi\right) \cdot \left(\pi \cdot \pi\right)\right) \cdot \mathsf{fma}\left(0.008333333333333333, \left(tau \cdot tau\right) \cdot \left(tau \cdot tau\right), \left(tau \cdot tau\right) \cdot 0.027777777777777776\right), \left(\pi \cdot \pi\right) \cdot \mathsf{fma}\left(-0.16666666666666666, tau \cdot tau, -0.16666666666666666\right)\right), 1\right) \end{array} \]
(FPCore (x tau)
 :precision binary32
 (fma
  (* x x)
  (fma
   (* x x)
   (*
    (* (* PI PI) (* PI PI))
    (fma
     0.008333333333333333
     (* (* tau tau) (* tau tau))
     (* (* tau tau) 0.027777777777777776)))
   (* (* PI PI) (fma -0.16666666666666666 (* tau tau) -0.16666666666666666)))
  1.0))
float code(float x, float tau) {
	return fmaf((x * x), fmaf((x * x), (((((float) M_PI) * ((float) M_PI)) * (((float) M_PI) * ((float) M_PI))) * fmaf(0.008333333333333333f, ((tau * tau) * (tau * tau)), ((tau * tau) * 0.027777777777777776f))), ((((float) M_PI) * ((float) M_PI)) * fmaf(-0.16666666666666666f, (tau * tau), -0.16666666666666666f))), 1.0f);
}
function code(x, tau)
	return fma(Float32(x * x), fma(Float32(x * x), Float32(Float32(Float32(Float32(pi) * Float32(pi)) * Float32(Float32(pi) * Float32(pi))) * fma(Float32(0.008333333333333333), Float32(Float32(tau * tau) * Float32(tau * tau)), Float32(Float32(tau * tau) * Float32(0.027777777777777776)))), Float32(Float32(Float32(pi) * Float32(pi)) * fma(Float32(-0.16666666666666666), Float32(tau * tau), Float32(-0.16666666666666666)))), Float32(1.0))
end
\begin{array}{l}

\\
\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, \left(\left(\pi \cdot \pi\right) \cdot \left(\pi \cdot \pi\right)\right) \cdot \mathsf{fma}\left(0.008333333333333333, \left(tau \cdot tau\right) \cdot \left(tau \cdot tau\right), \left(tau \cdot tau\right) \cdot 0.027777777777777776\right), \left(\pi \cdot \pi\right) \cdot \mathsf{fma}\left(-0.16666666666666666, tau \cdot tau, -0.16666666666666666\right)\right), 1\right)
\end{array}
Derivation
  1. Initial program 98.1%

    \[\frac{\sin \left(\left(x \cdot \pi\right) \cdot tau\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. associate-/r*N/A

      \[\leadsto \color{blue}{\frac{\frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{x \cdot \mathsf{PI}\left(\right)}}{tau}} \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \]
    2. frac-timesN/A

      \[\leadsto \color{blue}{\frac{\frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{tau \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)}} \]
    3. *-commutativeN/A

      \[\leadsto \frac{\frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\color{blue}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau}} \]
    4. associate-/l*N/A

      \[\leadsto \color{blue}{\frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau}} \]
    5. *-lft-identityN/A

      \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \frac{\color{blue}{1 \cdot \sin \left(x \cdot \mathsf{PI}\left(\right)\right)}}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \]
    6. associate-*l/N/A

      \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \color{blue}{\left(\frac{1}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \sin \left(x \cdot \mathsf{PI}\left(\right)\right)\right)} \]
    7. *-lowering-*.f32N/A

      \[\leadsto \color{blue}{\frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \left(\frac{1}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \sin \left(x \cdot \mathsf{PI}\left(\right)\right)\right)} \]
  4. Applied egg-rr97.6%

    \[\leadsto \color{blue}{\frac{\sin \left(x \cdot \left(\pi \cdot tau\right)\right)}{x \cdot \pi} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \left(\pi \cdot tau\right)}} \]
  5. Taylor expanded in x around 0

    \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \color{blue}{\left(\frac{-1}{6} \cdot \frac{{x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}}{tau} + \frac{1}{tau}\right)} \]
  6. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \left(\color{blue}{\frac{{x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}}{tau} \cdot \frac{-1}{6}} + \frac{1}{tau}\right) \]
    2. associate-/l*N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \left(\color{blue}{\left({x}^{2} \cdot \frac{{\mathsf{PI}\left(\right)}^{2}}{tau}\right)} \cdot \frac{-1}{6} + \frac{1}{tau}\right) \]
    3. associate-*r*N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \left(\color{blue}{{x}^{2} \cdot \left(\frac{{\mathsf{PI}\left(\right)}^{2}}{tau} \cdot \frac{-1}{6}\right)} + \frac{1}{tau}\right) \]
    4. *-commutativeN/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \left({x}^{2} \cdot \color{blue}{\left(\frac{-1}{6} \cdot \frac{{\mathsf{PI}\left(\right)}^{2}}{tau}\right)} + \frac{1}{tau}\right) \]
    5. accelerator-lowering-fma.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \color{blue}{\mathsf{fma}\left({x}^{2}, \frac{-1}{6} \cdot \frac{{\mathsf{PI}\left(\right)}^{2}}{tau}, \frac{1}{tau}\right)} \]
    6. unpow2N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{-1}{6} \cdot \frac{{\mathsf{PI}\left(\right)}^{2}}{tau}, \frac{1}{tau}\right) \]
    7. *-lowering-*.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{-1}{6} \cdot \frac{{\mathsf{PI}\left(\right)}^{2}}{tau}, \frac{1}{tau}\right) \]
    8. associate-*r/N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \mathsf{fma}\left(x \cdot x, \color{blue}{\frac{\frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2}}{tau}}, \frac{1}{tau}\right) \]
    9. /-lowering-/.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \mathsf{fma}\left(x \cdot x, \color{blue}{\frac{\frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2}}{tau}}, \frac{1}{tau}\right) \]
    10. *-lowering-*.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \mathsf{fma}\left(x \cdot x, \frac{\color{blue}{\frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2}}}{tau}, \frac{1}{tau}\right) \]
    11. unpow2N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \mathsf{fma}\left(x \cdot x, \frac{\frac{-1}{6} \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)}}{tau}, \frac{1}{tau}\right) \]
    12. *-lowering-*.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \mathsf{fma}\left(x \cdot x, \frac{\frac{-1}{6} \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)}}{tau}, \frac{1}{tau}\right) \]
    13. PI-lowering-PI.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \mathsf{fma}\left(x \cdot x, \frac{\frac{-1}{6} \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right)\right)}{tau}, \frac{1}{tau}\right) \]
    14. PI-lowering-PI.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \mathsf{fma}\left(x \cdot x, \frac{\frac{-1}{6} \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)}{tau}, \frac{1}{tau}\right) \]
    15. /-lowering-/.f3286.3

      \[\leadsto \frac{\sin \left(x \cdot \left(\pi \cdot tau\right)\right)}{x \cdot \pi} \cdot \mathsf{fma}\left(x \cdot x, \frac{-0.16666666666666666 \cdot \left(\pi \cdot \pi\right)}{tau}, \color{blue}{\frac{1}{tau}}\right) \]
  7. Simplified86.3%

    \[\leadsto \frac{\sin \left(x \cdot \left(\pi \cdot tau\right)\right)}{x \cdot \pi} \cdot \color{blue}{\mathsf{fma}\left(x \cdot x, \frac{-0.16666666666666666 \cdot \left(\pi \cdot \pi\right)}{tau}, \frac{1}{tau}\right)} \]
  8. Taylor expanded in x around 0

    \[\leadsto \color{blue}{1 + {x}^{2} \cdot \left(\frac{-1}{6} \cdot \left({tau}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + \left(\frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2} + {x}^{2} \cdot \left(\frac{1}{120} \cdot \left({tau}^{4} \cdot {\mathsf{PI}\left(\right)}^{4}\right) + \frac{1}{36} \cdot \left({tau}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)} \]
  9. Step-by-step derivation
    1. +-commutativeN/A

      \[\leadsto \color{blue}{{x}^{2} \cdot \left(\frac{-1}{6} \cdot \left({tau}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + \left(\frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2} + {x}^{2} \cdot \left(\frac{1}{120} \cdot \left({tau}^{4} \cdot {\mathsf{PI}\left(\right)}^{4}\right) + \frac{1}{36} \cdot \left({tau}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right) + 1} \]
    2. accelerator-lowering-fma.f32N/A

      \[\leadsto \color{blue}{\mathsf{fma}\left({x}^{2}, \frac{-1}{6} \cdot \left({tau}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + \left(\frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2} + {x}^{2} \cdot \left(\frac{1}{120} \cdot \left({tau}^{4} \cdot {\mathsf{PI}\left(\right)}^{4}\right) + \frac{1}{36} \cdot \left({tau}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right), 1\right)} \]
  10. Simplified85.2%

    \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, \left(\left(\pi \cdot \pi\right) \cdot \left(\pi \cdot \pi\right)\right) \cdot \mathsf{fma}\left(0.008333333333333333, \left(tau \cdot tau\right) \cdot \left(tau \cdot tau\right), \left(tau \cdot tau\right) \cdot 0.027777777777777776\right), \left(\pi \cdot \pi\right) \cdot \mathsf{fma}\left(-0.16666666666666666, tau \cdot tau, -0.16666666666666666\right)\right), 1\right)} \]
  11. Add Preprocessing

Alternative 9: 79.8% accurate, 3.5× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(-0.16666666666666666, \mathsf{fma}\left(x, x \cdot \left(\pi \cdot \pi\right), \mathsf{fma}\left(x \cdot x, \left(\pi \cdot \pi\right) \cdot -0.16666666666666666, 1\right) \cdot \left(\left(x \cdot x\right) \cdot \left(tau \cdot \left(tau \cdot \left(\pi \cdot \pi\right)\right)\right)\right)\right), 1\right) \end{array} \]
(FPCore (x tau)
 :precision binary32
 (fma
  -0.16666666666666666
  (fma
   x
   (* x (* PI PI))
   (*
    (fma (* x x) (* (* PI PI) -0.16666666666666666) 1.0)
    (* (* x x) (* tau (* tau (* PI PI))))))
  1.0))
float code(float x, float tau) {
	return fmaf(-0.16666666666666666f, fmaf(x, (x * (((float) M_PI) * ((float) M_PI))), (fmaf((x * x), ((((float) M_PI) * ((float) M_PI)) * -0.16666666666666666f), 1.0f) * ((x * x) * (tau * (tau * (((float) M_PI) * ((float) M_PI))))))), 1.0f);
}
function code(x, tau)
	return fma(Float32(-0.16666666666666666), fma(x, Float32(x * Float32(Float32(pi) * Float32(pi))), Float32(fma(Float32(x * x), Float32(Float32(Float32(pi) * Float32(pi)) * Float32(-0.16666666666666666)), Float32(1.0)) * Float32(Float32(x * x) * Float32(tau * Float32(tau * Float32(Float32(pi) * Float32(pi))))))), Float32(1.0))
end
\begin{array}{l}

\\
\mathsf{fma}\left(-0.16666666666666666, \mathsf{fma}\left(x, x \cdot \left(\pi \cdot \pi\right), \mathsf{fma}\left(x \cdot x, \left(\pi \cdot \pi\right) \cdot -0.16666666666666666, 1\right) \cdot \left(\left(x \cdot x\right) \cdot \left(tau \cdot \left(tau \cdot \left(\pi \cdot \pi\right)\right)\right)\right)\right), 1\right)
\end{array}
Derivation
  1. Initial program 98.1%

    \[\frac{\sin \left(\left(x \cdot \pi\right) \cdot tau\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. associate-/r*N/A

      \[\leadsto \color{blue}{\frac{\frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{x \cdot \mathsf{PI}\left(\right)}}{tau}} \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \]
    2. frac-timesN/A

      \[\leadsto \color{blue}{\frac{\frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{tau \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)}} \]
    3. *-commutativeN/A

      \[\leadsto \frac{\frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\color{blue}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau}} \]
    4. associate-/l*N/A

      \[\leadsto \color{blue}{\frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau}} \]
    5. *-lft-identityN/A

      \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \frac{\color{blue}{1 \cdot \sin \left(x \cdot \mathsf{PI}\left(\right)\right)}}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \]
    6. associate-*l/N/A

      \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \color{blue}{\left(\frac{1}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \sin \left(x \cdot \mathsf{PI}\left(\right)\right)\right)} \]
    7. *-lowering-*.f32N/A

      \[\leadsto \color{blue}{\frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \left(\frac{1}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \sin \left(x \cdot \mathsf{PI}\left(\right)\right)\right)} \]
  4. Applied egg-rr97.6%

    \[\leadsto \color{blue}{\frac{\sin \left(x \cdot \left(\pi \cdot tau\right)\right)}{x \cdot \pi} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \left(\pi \cdot tau\right)}} \]
  5. Taylor expanded in x around 0

    \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \color{blue}{\left(\frac{-1}{6} \cdot \frac{{x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}}{tau} + \frac{1}{tau}\right)} \]
  6. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \left(\color{blue}{\frac{{x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}}{tau} \cdot \frac{-1}{6}} + \frac{1}{tau}\right) \]
    2. associate-/l*N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \left(\color{blue}{\left({x}^{2} \cdot \frac{{\mathsf{PI}\left(\right)}^{2}}{tau}\right)} \cdot \frac{-1}{6} + \frac{1}{tau}\right) \]
    3. associate-*r*N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \left(\color{blue}{{x}^{2} \cdot \left(\frac{{\mathsf{PI}\left(\right)}^{2}}{tau} \cdot \frac{-1}{6}\right)} + \frac{1}{tau}\right) \]
    4. *-commutativeN/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \left({x}^{2} \cdot \color{blue}{\left(\frac{-1}{6} \cdot \frac{{\mathsf{PI}\left(\right)}^{2}}{tau}\right)} + \frac{1}{tau}\right) \]
    5. accelerator-lowering-fma.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \color{blue}{\mathsf{fma}\left({x}^{2}, \frac{-1}{6} \cdot \frac{{\mathsf{PI}\left(\right)}^{2}}{tau}, \frac{1}{tau}\right)} \]
    6. unpow2N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{-1}{6} \cdot \frac{{\mathsf{PI}\left(\right)}^{2}}{tau}, \frac{1}{tau}\right) \]
    7. *-lowering-*.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{-1}{6} \cdot \frac{{\mathsf{PI}\left(\right)}^{2}}{tau}, \frac{1}{tau}\right) \]
    8. associate-*r/N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \mathsf{fma}\left(x \cdot x, \color{blue}{\frac{\frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2}}{tau}}, \frac{1}{tau}\right) \]
    9. /-lowering-/.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \mathsf{fma}\left(x \cdot x, \color{blue}{\frac{\frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2}}{tau}}, \frac{1}{tau}\right) \]
    10. *-lowering-*.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \mathsf{fma}\left(x \cdot x, \frac{\color{blue}{\frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2}}}{tau}, \frac{1}{tau}\right) \]
    11. unpow2N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \mathsf{fma}\left(x \cdot x, \frac{\frac{-1}{6} \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)}}{tau}, \frac{1}{tau}\right) \]
    12. *-lowering-*.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \mathsf{fma}\left(x \cdot x, \frac{\frac{-1}{6} \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)}}{tau}, \frac{1}{tau}\right) \]
    13. PI-lowering-PI.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \mathsf{fma}\left(x \cdot x, \frac{\frac{-1}{6} \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right)\right)}{tau}, \frac{1}{tau}\right) \]
    14. PI-lowering-PI.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \mathsf{fma}\left(x \cdot x, \frac{\frac{-1}{6} \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)}{tau}, \frac{1}{tau}\right) \]
    15. /-lowering-/.f3286.3

      \[\leadsto \frac{\sin \left(x \cdot \left(\pi \cdot tau\right)\right)}{x \cdot \pi} \cdot \mathsf{fma}\left(x \cdot x, \frac{-0.16666666666666666 \cdot \left(\pi \cdot \pi\right)}{tau}, \color{blue}{\frac{1}{tau}}\right) \]
  7. Simplified86.3%

    \[\leadsto \frac{\sin \left(x \cdot \left(\pi \cdot tau\right)\right)}{x \cdot \pi} \cdot \color{blue}{\mathsf{fma}\left(x \cdot x, \frac{-0.16666666666666666 \cdot \left(\pi \cdot \pi\right)}{tau}, \frac{1}{tau}\right)} \]
  8. Taylor expanded in tau around 0

    \[\leadsto \color{blue}{1 + \left(\frac{-1}{6} \cdot \left({tau}^{2} \cdot \left({x}^{2} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(1 + \frac{-1}{6} \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right)\right)\right) + \frac{-1}{6} \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \]
  9. Step-by-step derivation
    1. +-commutativeN/A

      \[\leadsto \color{blue}{\left(\frac{-1}{6} \cdot \left({tau}^{2} \cdot \left({x}^{2} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(1 + \frac{-1}{6} \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right)\right)\right) + \frac{-1}{6} \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) + 1} \]
    2. distribute-lft-outN/A

      \[\leadsto \color{blue}{\frac{-1}{6} \cdot \left({tau}^{2} \cdot \left({x}^{2} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(1 + \frac{-1}{6} \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right)\right) + {x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)} + 1 \]
    3. accelerator-lowering-fma.f32N/A

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1}{6}, {tau}^{2} \cdot \left({x}^{2} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(1 + \frac{-1}{6} \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right)\right) + {x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}, 1\right)} \]
  10. Simplified81.5%

    \[\leadsto \color{blue}{\mathsf{fma}\left(-0.16666666666666666, \mathsf{fma}\left(x, x \cdot \left(\pi \cdot \pi\right), \left(\left(x \cdot x\right) \cdot \left(tau \cdot \left(tau \cdot \left(\pi \cdot \pi\right)\right)\right)\right) \cdot \mathsf{fma}\left(x \cdot x, -0.16666666666666666 \cdot \left(\pi \cdot \pi\right), 1\right)\right), 1\right)} \]
  11. Final simplification81.5%

    \[\leadsto \mathsf{fma}\left(-0.16666666666666666, \mathsf{fma}\left(x, x \cdot \left(\pi \cdot \pi\right), \mathsf{fma}\left(x \cdot x, \left(\pi \cdot \pi\right) \cdot -0.16666666666666666, 1\right) \cdot \left(\left(x \cdot x\right) \cdot \left(tau \cdot \left(tau \cdot \left(\pi \cdot \pi\right)\right)\right)\right)\right), 1\right) \]
  12. Add Preprocessing

Alternative 10: 78.7% accurate, 7.8× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(x, x \cdot \left(-0.16666666666666666 \cdot \left(\left(\pi \cdot \pi\right) \cdot \mathsf{fma}\left(tau, tau, 1\right)\right)\right), 1\right) \end{array} \]
(FPCore (x tau)
 :precision binary32
 (fma x (* x (* -0.16666666666666666 (* (* PI PI) (fma tau tau 1.0)))) 1.0))
float code(float x, float tau) {
	return fmaf(x, (x * (-0.16666666666666666f * ((((float) M_PI) * ((float) M_PI)) * fmaf(tau, tau, 1.0f)))), 1.0f);
}
function code(x, tau)
	return fma(x, Float32(x * Float32(Float32(-0.16666666666666666) * Float32(Float32(Float32(pi) * Float32(pi)) * fma(tau, tau, Float32(1.0))))), Float32(1.0))
end
\begin{array}{l}

\\
\mathsf{fma}\left(x, x \cdot \left(-0.16666666666666666 \cdot \left(\left(\pi \cdot \pi\right) \cdot \mathsf{fma}\left(tau, tau, 1\right)\right)\right), 1\right)
\end{array}
Derivation
  1. Initial program 98.1%

    \[\frac{\sin \left(\left(x \cdot \pi\right) \cdot tau\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. associate-*r/N/A

      \[\leadsto \color{blue}{\frac{\frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{x \cdot \mathsf{PI}\left(\right)}} \]
    2. /-lowering-/.f32N/A

      \[\leadsto \color{blue}{\frac{\frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{x \cdot \mathsf{PI}\left(\right)}} \]
  4. Applied egg-rr98.0%

    \[\leadsto \color{blue}{\frac{\frac{\sin \left(x \cdot \left(\pi \cdot tau\right)\right)}{x \cdot \left(\pi \cdot tau\right)} \cdot \sin \left(x \cdot \pi\right)}{x \cdot \pi}} \]
  5. Step-by-step derivation
    1. associate-/l*N/A

      \[\leadsto \color{blue}{\frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)} \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{x \cdot \mathsf{PI}\left(\right)}} \]
    2. clear-numN/A

      \[\leadsto \color{blue}{\frac{1}{\frac{x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)}{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}}} \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \]
    3. frac-timesN/A

      \[\leadsto \color{blue}{\frac{1 \cdot \sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\frac{x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)}{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)} \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)}} \]
    4. *-lft-identityN/A

      \[\leadsto \frac{\color{blue}{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}}{\frac{x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)}{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)} \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)} \]
    5. /-lowering-/.f32N/A

      \[\leadsto \color{blue}{\frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\frac{x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)}{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)} \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)}} \]
    6. sin-lowering-sin.f32N/A

      \[\leadsto \frac{\color{blue}{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}}{\frac{x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)}{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)} \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)} \]
    7. *-lowering-*.f32N/A

      \[\leadsto \frac{\sin \color{blue}{\left(x \cdot \mathsf{PI}\left(\right)\right)}}{\frac{x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)}{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)} \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)} \]
    8. PI-lowering-PI.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)}{\frac{x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)}{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)} \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)} \]
    9. *-lowering-*.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\color{blue}{\frac{x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)}{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)} \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)}} \]
  6. Applied egg-rr97.7%

    \[\leadsto \color{blue}{\frac{\sin \left(x \cdot \pi\right)}{\frac{x \cdot \left(\pi \cdot tau\right)}{\sin \left(x \cdot \left(\pi \cdot tau\right)\right)} \cdot \left(x \cdot \pi\right)}} \]
  7. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\color{blue}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)}{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}}} \]
    2. frac-2negN/A

      \[\leadsto \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\frac{\mathsf{neg}\left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{\mathsf{neg}\left(\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)\right)}}} \]
    3. associate-*r/N/A

      \[\leadsto \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\color{blue}{\frac{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\mathsf{neg}\left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)\right)}{\mathsf{neg}\left(\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)\right)}}} \]
    4. /-lowering-/.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\color{blue}{\frac{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\mathsf{neg}\left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)\right)}{\mathsf{neg}\left(\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)\right)}}} \]
    5. *-lowering-*.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\frac{\color{blue}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\mathsf{neg}\left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)\right)}}{\mathsf{neg}\left(\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)\right)}} \]
    6. *-lowering-*.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\frac{\color{blue}{\left(x \cdot \mathsf{PI}\left(\right)\right)} \cdot \left(\mathsf{neg}\left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)\right)}{\mathsf{neg}\left(\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)\right)}} \]
    7. PI-lowering-PI.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\frac{\left(x \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \left(\mathsf{neg}\left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)\right)}{\mathsf{neg}\left(\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)\right)}} \]
    8. neg-lowering-neg.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\frac{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)\right)}}{\mathsf{neg}\left(\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)\right)}} \]
    9. *-lowering-*.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\frac{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\mathsf{neg}\left(\color{blue}{x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)}\right)\right)}{\mathsf{neg}\left(\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)\right)}} \]
    10. *-lowering-*.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\frac{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\mathsf{neg}\left(x \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot tau\right)}\right)\right)}{\mathsf{neg}\left(\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)\right)}} \]
    11. PI-lowering-PI.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\frac{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\mathsf{neg}\left(x \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot tau\right)\right)\right)}{\mathsf{neg}\left(\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)\right)}} \]
    12. neg-lowering-neg.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\frac{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\mathsf{neg}\left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)\right)}{\color{blue}{\mathsf{neg}\left(\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)\right)}}} \]
    13. sin-lowering-sin.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\frac{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\mathsf{neg}\left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)\right)}{\mathsf{neg}\left(\color{blue}{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}\right)}} \]
    14. *-lowering-*.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\frac{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\mathsf{neg}\left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)\right)}{\mathsf{neg}\left(\sin \color{blue}{\left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}\right)}} \]
    15. *-lowering-*.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\frac{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\mathsf{neg}\left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)\right)}{\mathsf{neg}\left(\sin \left(x \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot tau\right)}\right)\right)}} \]
    16. PI-lowering-PI.f3297.7

      \[\leadsto \frac{\sin \left(x \cdot \pi\right)}{\frac{\left(x \cdot \pi\right) \cdot \left(-x \cdot \left(\pi \cdot tau\right)\right)}{-\sin \left(x \cdot \left(\color{blue}{\pi} \cdot tau\right)\right)}} \]
  8. Applied egg-rr97.7%

    \[\leadsto \frac{\sin \left(x \cdot \pi\right)}{\color{blue}{\frac{\left(x \cdot \pi\right) \cdot \left(-x \cdot \left(\pi \cdot tau\right)\right)}{-\sin \left(x \cdot \left(\pi \cdot tau\right)\right)}}} \]
  9. Taylor expanded in x around 0

    \[\leadsto \color{blue}{1 + {x}^{2} \cdot \left(\frac{-1}{6} \cdot \left({tau}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + \frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2}\right)} \]
  10. Step-by-step derivation
    1. +-commutativeN/A

      \[\leadsto \color{blue}{{x}^{2} \cdot \left(\frac{-1}{6} \cdot \left({tau}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + \frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + 1} \]
    2. unpow2N/A

      \[\leadsto \color{blue}{\left(x \cdot x\right)} \cdot \left(\frac{-1}{6} \cdot \left({tau}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + \frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + 1 \]
    3. associate-*l*N/A

      \[\leadsto \color{blue}{x \cdot \left(x \cdot \left(\frac{-1}{6} \cdot \left({tau}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + \frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} + 1 \]
    4. accelerator-lowering-fma.f32N/A

      \[\leadsto \color{blue}{\mathsf{fma}\left(x, x \cdot \left(\frac{-1}{6} \cdot \left({tau}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + \frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2}\right), 1\right)} \]
  11. Simplified80.8%

    \[\leadsto \color{blue}{\mathsf{fma}\left(x, x \cdot \left(-0.16666666666666666 \cdot \left(\mathsf{fma}\left(tau, tau, 1\right) \cdot \left(\pi \cdot \pi\right)\right)\right), 1\right)} \]
  12. Final simplification80.8%

    \[\leadsto \mathsf{fma}\left(x, x \cdot \left(-0.16666666666666666 \cdot \left(\left(\pi \cdot \pi\right) \cdot \mathsf{fma}\left(tau, tau, 1\right)\right)\right), 1\right) \]
  13. Add Preprocessing

Alternative 11: 64.7% accurate, 11.7× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(\left(x \cdot \pi\right) \cdot \left(x \cdot \pi\right), -0.16666666666666666, 1\right) \end{array} \]
(FPCore (x tau)
 :precision binary32
 (fma (* (* x PI) (* x PI)) -0.16666666666666666 1.0))
float code(float x, float tau) {
	return fmaf(((x * ((float) M_PI)) * (x * ((float) M_PI))), -0.16666666666666666f, 1.0f);
}
function code(x, tau)
	return fma(Float32(Float32(x * Float32(pi)) * Float32(x * Float32(pi))), Float32(-0.16666666666666666), Float32(1.0))
end
\begin{array}{l}

\\
\mathsf{fma}\left(\left(x \cdot \pi\right) \cdot \left(x \cdot \pi\right), -0.16666666666666666, 1\right)
\end{array}
Derivation
  1. Initial program 98.1%

    \[\frac{\sin \left(\left(x \cdot \pi\right) \cdot tau\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. associate-/r*N/A

      \[\leadsto \color{blue}{\frac{\frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{x \cdot \mathsf{PI}\left(\right)}}{tau}} \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \]
    2. frac-timesN/A

      \[\leadsto \color{blue}{\frac{\frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{tau \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)}} \]
    3. *-commutativeN/A

      \[\leadsto \frac{\frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\color{blue}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau}} \]
    4. associate-/l*N/A

      \[\leadsto \color{blue}{\frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau}} \]
    5. *-lft-identityN/A

      \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \frac{\color{blue}{1 \cdot \sin \left(x \cdot \mathsf{PI}\left(\right)\right)}}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \]
    6. associate-*l/N/A

      \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \color{blue}{\left(\frac{1}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \sin \left(x \cdot \mathsf{PI}\left(\right)\right)\right)} \]
    7. *-lowering-*.f32N/A

      \[\leadsto \color{blue}{\frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \left(\frac{1}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \sin \left(x \cdot \mathsf{PI}\left(\right)\right)\right)} \]
  4. Applied egg-rr97.6%

    \[\leadsto \color{blue}{\frac{\sin \left(x \cdot \left(\pi \cdot tau\right)\right)}{x \cdot \pi} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \left(\pi \cdot tau\right)}} \]
  5. Taylor expanded in x around 0

    \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \color{blue}{\left(\frac{-1}{6} \cdot \frac{{x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}}{tau} + \frac{1}{tau}\right)} \]
  6. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \left(\color{blue}{\frac{{x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}}{tau} \cdot \frac{-1}{6}} + \frac{1}{tau}\right) \]
    2. associate-/l*N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \left(\color{blue}{\left({x}^{2} \cdot \frac{{\mathsf{PI}\left(\right)}^{2}}{tau}\right)} \cdot \frac{-1}{6} + \frac{1}{tau}\right) \]
    3. associate-*r*N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \left(\color{blue}{{x}^{2} \cdot \left(\frac{{\mathsf{PI}\left(\right)}^{2}}{tau} \cdot \frac{-1}{6}\right)} + \frac{1}{tau}\right) \]
    4. *-commutativeN/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \left({x}^{2} \cdot \color{blue}{\left(\frac{-1}{6} \cdot \frac{{\mathsf{PI}\left(\right)}^{2}}{tau}\right)} + \frac{1}{tau}\right) \]
    5. accelerator-lowering-fma.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \color{blue}{\mathsf{fma}\left({x}^{2}, \frac{-1}{6} \cdot \frac{{\mathsf{PI}\left(\right)}^{2}}{tau}, \frac{1}{tau}\right)} \]
    6. unpow2N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{-1}{6} \cdot \frac{{\mathsf{PI}\left(\right)}^{2}}{tau}, \frac{1}{tau}\right) \]
    7. *-lowering-*.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{-1}{6} \cdot \frac{{\mathsf{PI}\left(\right)}^{2}}{tau}, \frac{1}{tau}\right) \]
    8. associate-*r/N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \mathsf{fma}\left(x \cdot x, \color{blue}{\frac{\frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2}}{tau}}, \frac{1}{tau}\right) \]
    9. /-lowering-/.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \mathsf{fma}\left(x \cdot x, \color{blue}{\frac{\frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2}}{tau}}, \frac{1}{tau}\right) \]
    10. *-lowering-*.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \mathsf{fma}\left(x \cdot x, \frac{\color{blue}{\frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2}}}{tau}, \frac{1}{tau}\right) \]
    11. unpow2N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \mathsf{fma}\left(x \cdot x, \frac{\frac{-1}{6} \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)}}{tau}, \frac{1}{tau}\right) \]
    12. *-lowering-*.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \mathsf{fma}\left(x \cdot x, \frac{\frac{-1}{6} \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)}}{tau}, \frac{1}{tau}\right) \]
    13. PI-lowering-PI.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \mathsf{fma}\left(x \cdot x, \frac{\frac{-1}{6} \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right)\right)}{tau}, \frac{1}{tau}\right) \]
    14. PI-lowering-PI.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \mathsf{fma}\left(x \cdot x, \frac{\frac{-1}{6} \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)}{tau}, \frac{1}{tau}\right) \]
    15. /-lowering-/.f3286.3

      \[\leadsto \frac{\sin \left(x \cdot \left(\pi \cdot tau\right)\right)}{x \cdot \pi} \cdot \mathsf{fma}\left(x \cdot x, \frac{-0.16666666666666666 \cdot \left(\pi \cdot \pi\right)}{tau}, \color{blue}{\frac{1}{tau}}\right) \]
  7. Simplified86.3%

    \[\leadsto \frac{\sin \left(x \cdot \left(\pi \cdot tau\right)\right)}{x \cdot \pi} \cdot \color{blue}{\mathsf{fma}\left(x \cdot x, \frac{-0.16666666666666666 \cdot \left(\pi \cdot \pi\right)}{tau}, \frac{1}{tau}\right)} \]
  8. Taylor expanded in tau around 0

    \[\leadsto \color{blue}{1 + \frac{-1}{6} \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)} \]
  9. Step-by-step derivation
    1. +-commutativeN/A

      \[\leadsto \color{blue}{\frac{-1}{6} \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + 1} \]
    2. *-commutativeN/A

      \[\leadsto \color{blue}{\left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot \frac{-1}{6}} + 1 \]
    3. associate-*r*N/A

      \[\leadsto \color{blue}{{x}^{2} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \frac{-1}{6}\right)} + 1 \]
    4. *-commutativeN/A

      \[\leadsto {x}^{2} \cdot \color{blue}{\left(\frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2}\right)} + 1 \]
    5. accelerator-lowering-fma.f32N/A

      \[\leadsto \color{blue}{\mathsf{fma}\left({x}^{2}, \frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2}, 1\right)} \]
    6. unpow2N/A

      \[\leadsto \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2}, 1\right) \]
    7. *-lowering-*.f32N/A

      \[\leadsto \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2}, 1\right) \]
    8. *-lowering-*.f32N/A

      \[\leadsto \mathsf{fma}\left(x \cdot x, \color{blue}{\frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2}}, 1\right) \]
    9. unpow2N/A

      \[\leadsto \mathsf{fma}\left(x \cdot x, \frac{-1}{6} \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)}, 1\right) \]
    10. *-lowering-*.f32N/A

      \[\leadsto \mathsf{fma}\left(x \cdot x, \frac{-1}{6} \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)}, 1\right) \]
    11. PI-lowering-PI.f32N/A

      \[\leadsto \mathsf{fma}\left(x \cdot x, \frac{-1}{6} \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right)\right), 1\right) \]
    12. PI-lowering-PI.f3265.3

      \[\leadsto \mathsf{fma}\left(x \cdot x, -0.16666666666666666 \cdot \left(\pi \cdot \color{blue}{\pi}\right), 1\right) \]
  10. Simplified65.3%

    \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot x, -0.16666666666666666 \cdot \left(\pi \cdot \pi\right), 1\right)} \]
  11. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \left(x \cdot x\right) \cdot \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{-1}{6}\right)} + 1 \]
    2. associate-*r*N/A

      \[\leadsto \color{blue}{\left(\left(x \cdot x\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{-1}{6}} + 1 \]
    3. pow2N/A

      \[\leadsto \left(\color{blue}{{x}^{2}} \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{-1}{6} + 1 \]
    4. pow2N/A

      \[\leadsto \left({x}^{2} \cdot \color{blue}{{\mathsf{PI}\left(\right)}^{2}}\right) \cdot \frac{-1}{6} + 1 \]
    5. pow-prod-downN/A

      \[\leadsto \color{blue}{{\left(x \cdot \mathsf{PI}\left(\right)\right)}^{2}} \cdot \frac{-1}{6} + 1 \]
    6. *-commutativeN/A

      \[\leadsto {\color{blue}{\left(\mathsf{PI}\left(\right) \cdot x\right)}}^{2} \cdot \frac{-1}{6} + 1 \]
    7. pow-prod-downN/A

      \[\leadsto \color{blue}{\left({\mathsf{PI}\left(\right)}^{2} \cdot {x}^{2}\right)} \cdot \frac{-1}{6} + 1 \]
    8. pow2N/A

      \[\leadsto \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot {x}^{2}\right) \cdot \frac{-1}{6} + 1 \]
    9. pow2N/A

      \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(x \cdot x\right)}\right) \cdot \frac{-1}{6} + 1 \]
    10. accelerator-lowering-fma.f32N/A

      \[\leadsto \color{blue}{\mathsf{fma}\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(x \cdot x\right), \frac{-1}{6}, 1\right)} \]
  12. Applied egg-rr65.3%

    \[\leadsto \color{blue}{\mathsf{fma}\left(\left(x \cdot \pi\right) \cdot \left(x \cdot \pi\right), -0.16666666666666666, 1\right)} \]
  13. Add Preprocessing

Alternative 12: 64.7% accurate, 11.7× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(x \cdot x, \left(\pi \cdot \pi\right) \cdot -0.16666666666666666, 1\right) \end{array} \]
(FPCore (x tau)
 :precision binary32
 (fma (* x x) (* (* PI PI) -0.16666666666666666) 1.0))
float code(float x, float tau) {
	return fmaf((x * x), ((((float) M_PI) * ((float) M_PI)) * -0.16666666666666666f), 1.0f);
}
function code(x, tau)
	return fma(Float32(x * x), Float32(Float32(Float32(pi) * Float32(pi)) * Float32(-0.16666666666666666)), Float32(1.0))
end
\begin{array}{l}

\\
\mathsf{fma}\left(x \cdot x, \left(\pi \cdot \pi\right) \cdot -0.16666666666666666, 1\right)
\end{array}
Derivation
  1. Initial program 98.1%

    \[\frac{\sin \left(\left(x \cdot \pi\right) \cdot tau\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. associate-/r*N/A

      \[\leadsto \color{blue}{\frac{\frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{x \cdot \mathsf{PI}\left(\right)}}{tau}} \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \]
    2. frac-timesN/A

      \[\leadsto \color{blue}{\frac{\frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{tau \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)}} \]
    3. *-commutativeN/A

      \[\leadsto \frac{\frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\color{blue}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau}} \]
    4. associate-/l*N/A

      \[\leadsto \color{blue}{\frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau}} \]
    5. *-lft-identityN/A

      \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \frac{\color{blue}{1 \cdot \sin \left(x \cdot \mathsf{PI}\left(\right)\right)}}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \]
    6. associate-*l/N/A

      \[\leadsto \frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \color{blue}{\left(\frac{1}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \sin \left(x \cdot \mathsf{PI}\left(\right)\right)\right)} \]
    7. *-lowering-*.f32N/A

      \[\leadsto \color{blue}{\frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \left(\frac{1}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \sin \left(x \cdot \mathsf{PI}\left(\right)\right)\right)} \]
  4. Applied egg-rr97.6%

    \[\leadsto \color{blue}{\frac{\sin \left(x \cdot \left(\pi \cdot tau\right)\right)}{x \cdot \pi} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \left(\pi \cdot tau\right)}} \]
  5. Taylor expanded in x around 0

    \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \color{blue}{\left(\frac{-1}{6} \cdot \frac{{x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}}{tau} + \frac{1}{tau}\right)} \]
  6. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \left(\color{blue}{\frac{{x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}}{tau} \cdot \frac{-1}{6}} + \frac{1}{tau}\right) \]
    2. associate-/l*N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \left(\color{blue}{\left({x}^{2} \cdot \frac{{\mathsf{PI}\left(\right)}^{2}}{tau}\right)} \cdot \frac{-1}{6} + \frac{1}{tau}\right) \]
    3. associate-*r*N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \left(\color{blue}{{x}^{2} \cdot \left(\frac{{\mathsf{PI}\left(\right)}^{2}}{tau} \cdot \frac{-1}{6}\right)} + \frac{1}{tau}\right) \]
    4. *-commutativeN/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \left({x}^{2} \cdot \color{blue}{\left(\frac{-1}{6} \cdot \frac{{\mathsf{PI}\left(\right)}^{2}}{tau}\right)} + \frac{1}{tau}\right) \]
    5. accelerator-lowering-fma.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \color{blue}{\mathsf{fma}\left({x}^{2}, \frac{-1}{6} \cdot \frac{{\mathsf{PI}\left(\right)}^{2}}{tau}, \frac{1}{tau}\right)} \]
    6. unpow2N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{-1}{6} \cdot \frac{{\mathsf{PI}\left(\right)}^{2}}{tau}, \frac{1}{tau}\right) \]
    7. *-lowering-*.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{-1}{6} \cdot \frac{{\mathsf{PI}\left(\right)}^{2}}{tau}, \frac{1}{tau}\right) \]
    8. associate-*r/N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \mathsf{fma}\left(x \cdot x, \color{blue}{\frac{\frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2}}{tau}}, \frac{1}{tau}\right) \]
    9. /-lowering-/.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \mathsf{fma}\left(x \cdot x, \color{blue}{\frac{\frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2}}{tau}}, \frac{1}{tau}\right) \]
    10. *-lowering-*.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \mathsf{fma}\left(x \cdot x, \frac{\color{blue}{\frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2}}}{tau}, \frac{1}{tau}\right) \]
    11. unpow2N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \mathsf{fma}\left(x \cdot x, \frac{\frac{-1}{6} \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)}}{tau}, \frac{1}{tau}\right) \]
    12. *-lowering-*.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \mathsf{fma}\left(x \cdot x, \frac{\frac{-1}{6} \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)}}{tau}, \frac{1}{tau}\right) \]
    13. PI-lowering-PI.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \mathsf{fma}\left(x \cdot x, \frac{\frac{-1}{6} \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right)\right)}{tau}, \frac{1}{tau}\right) \]
    14. PI-lowering-PI.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \cdot \mathsf{fma}\left(x \cdot x, \frac{\frac{-1}{6} \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)}{tau}, \frac{1}{tau}\right) \]
    15. /-lowering-/.f3286.3

      \[\leadsto \frac{\sin \left(x \cdot \left(\pi \cdot tau\right)\right)}{x \cdot \pi} \cdot \mathsf{fma}\left(x \cdot x, \frac{-0.16666666666666666 \cdot \left(\pi \cdot \pi\right)}{tau}, \color{blue}{\frac{1}{tau}}\right) \]
  7. Simplified86.3%

    \[\leadsto \frac{\sin \left(x \cdot \left(\pi \cdot tau\right)\right)}{x \cdot \pi} \cdot \color{blue}{\mathsf{fma}\left(x \cdot x, \frac{-0.16666666666666666 \cdot \left(\pi \cdot \pi\right)}{tau}, \frac{1}{tau}\right)} \]
  8. Taylor expanded in tau around 0

    \[\leadsto \color{blue}{1 + \frac{-1}{6} \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)} \]
  9. Step-by-step derivation
    1. +-commutativeN/A

      \[\leadsto \color{blue}{\frac{-1}{6} \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + 1} \]
    2. *-commutativeN/A

      \[\leadsto \color{blue}{\left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot \frac{-1}{6}} + 1 \]
    3. associate-*r*N/A

      \[\leadsto \color{blue}{{x}^{2} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \frac{-1}{6}\right)} + 1 \]
    4. *-commutativeN/A

      \[\leadsto {x}^{2} \cdot \color{blue}{\left(\frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2}\right)} + 1 \]
    5. accelerator-lowering-fma.f32N/A

      \[\leadsto \color{blue}{\mathsf{fma}\left({x}^{2}, \frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2}, 1\right)} \]
    6. unpow2N/A

      \[\leadsto \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2}, 1\right) \]
    7. *-lowering-*.f32N/A

      \[\leadsto \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2}, 1\right) \]
    8. *-lowering-*.f32N/A

      \[\leadsto \mathsf{fma}\left(x \cdot x, \color{blue}{\frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2}}, 1\right) \]
    9. unpow2N/A

      \[\leadsto \mathsf{fma}\left(x \cdot x, \frac{-1}{6} \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)}, 1\right) \]
    10. *-lowering-*.f32N/A

      \[\leadsto \mathsf{fma}\left(x \cdot x, \frac{-1}{6} \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)}, 1\right) \]
    11. PI-lowering-PI.f32N/A

      \[\leadsto \mathsf{fma}\left(x \cdot x, \frac{-1}{6} \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right)\right), 1\right) \]
    12. PI-lowering-PI.f3265.3

      \[\leadsto \mathsf{fma}\left(x \cdot x, -0.16666666666666666 \cdot \left(\pi \cdot \color{blue}{\pi}\right), 1\right) \]
  10. Simplified65.3%

    \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot x, -0.16666666666666666 \cdot \left(\pi \cdot \pi\right), 1\right)} \]
  11. Final simplification65.3%

    \[\leadsto \mathsf{fma}\left(x \cdot x, \left(\pi \cdot \pi\right) \cdot -0.16666666666666666, 1\right) \]
  12. Add Preprocessing

Alternative 13: 63.7% accurate, 258.0× speedup?

\[\begin{array}{l} \\ 1 \end{array} \]
(FPCore (x tau) :precision binary32 1.0)
float code(float x, float tau) {
	return 1.0f;
}
real(4) function code(x, tau)
    real(4), intent (in) :: x
    real(4), intent (in) :: tau
    code = 1.0e0
end function
function code(x, tau)
	return Float32(1.0)
end
function tmp = code(x, tau)
	tmp = single(1.0);
end
\begin{array}{l}

\\
1
\end{array}
Derivation
  1. Initial program 98.1%

    \[\frac{\sin \left(\left(x \cdot \pi\right) \cdot tau\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi} \]
  2. Add Preprocessing
  3. Taylor expanded in x around 0

    \[\leadsto \color{blue}{1} \]
  4. Step-by-step derivation
    1. Simplified64.2%

      \[\leadsto \color{blue}{1} \]
    2. Add Preprocessing

    Alternative 14: 6.3% accurate, 258.0× speedup?

    \[\begin{array}{l} \\ 0 \end{array} \]
    (FPCore (x tau) :precision binary32 0.0)
    float code(float x, float tau) {
    	return 0.0f;
    }
    
    real(4) function code(x, tau)
        real(4), intent (in) :: x
        real(4), intent (in) :: tau
        code = 0.0e0
    end function
    
    function code(x, tau)
    	return Float32(0.0)
    end
    
    function tmp = code(x, tau)
    	tmp = single(0.0);
    end
    
    \begin{array}{l}
    
    \\
    0
    \end{array}
    
    Derivation
    1. Initial program 98.1%

      \[\frac{\sin \left(\left(x \cdot \pi\right) \cdot tau\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. frac-timesN/A

        \[\leadsto \color{blue}{\frac{\sin \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right) \cdot \sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right) \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)}} \]
      2. sin-multN/A

        \[\leadsto \frac{\color{blue}{\frac{\cos \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau - x \cdot \mathsf{PI}\left(\right)\right) - \cos \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau + x \cdot \mathsf{PI}\left(\right)\right)}{2}}}{\left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right) \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)} \]
      3. associate-/l/N/A

        \[\leadsto \color{blue}{\frac{\cos \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau - x \cdot \mathsf{PI}\left(\right)\right) - \cos \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau + x \cdot \mathsf{PI}\left(\right)\right)}{\left(\left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right) \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)\right) \cdot 2}} \]
      4. /-lowering-/.f32N/A

        \[\leadsto \color{blue}{\frac{\cos \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau - x \cdot \mathsf{PI}\left(\right)\right) - \cos \left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau + x \cdot \mathsf{PI}\left(\right)\right)}{\left(\left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right) \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)\right) \cdot 2}} \]
    4. Applied egg-rr66.0%

      \[\leadsto \color{blue}{\frac{\cos \left(x \cdot \left(\pi \cdot tau - \pi\right)\right) - \cos \left(x \cdot \mathsf{fma}\left(\pi, tau, \pi\right)\right)}{\left(x \cdot \left(tau \cdot \left(\pi \cdot \left(x \cdot \pi\right)\right)\right)\right) \cdot 2}} \]
    5. Taylor expanded in tau around 0

      \[\leadsto \color{blue}{\frac{1}{2} \cdot \frac{\cos \left(-1 \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)\right) - \cos \left(x \cdot \mathsf{PI}\left(\right)\right)}{tau \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)}} \]
    6. Step-by-step derivation
      1. div-subN/A

        \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(\frac{\cos \left(-1 \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)\right)}{tau \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)} - \frac{\cos \left(x \cdot \mathsf{PI}\left(\right)\right)}{tau \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)}\right)} \]
      2. cos-negN/A

        \[\leadsto \frac{1}{2} \cdot \left(\frac{\cos \left(-1 \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)\right)}{tau \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)} - \frac{\color{blue}{\cos \left(\mathsf{neg}\left(x \cdot \mathsf{PI}\left(\right)\right)\right)}}{tau \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)}\right) \]
      3. mul-1-negN/A

        \[\leadsto \frac{1}{2} \cdot \left(\frac{\cos \left(-1 \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)\right)}{tau \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)} - \frac{\cos \color{blue}{\left(-1 \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)\right)}}{tau \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)}\right) \]
      4. +-inversesN/A

        \[\leadsto \frac{1}{2} \cdot \color{blue}{0} \]
      5. metadata-eval6.3

        \[\leadsto \color{blue}{0} \]
    7. Simplified6.3%

      \[\leadsto \color{blue}{0} \]
    8. Add Preprocessing

    Reproduce

    ?
    herbie shell --seed 2024204 
    (FPCore (x tau)
      :name "Lanczos kernel"
      :precision binary32
      :pre (and (and (<= 1e-5 x) (<= x 1.0)) (and (<= 1.0 tau) (<= tau 5.0)))
      (* (/ (sin (* (* x PI) tau)) (* (* x PI) tau)) (/ (sin (* x PI)) (* x PI))))