Lanczos kernel

Percentage Accurate: 98.0% → 97.8%
Time: 14.8s
Alternatives: 16
Speedup: N/A×

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 16 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: 98.0% 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.8% accurate, 1.0× speedup?

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

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

    \[\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. lift-*.f32N/A

      \[\leadsto \color{blue}{\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 \mathsf{PI}\left(\right)\right)}{x \cdot \mathsf{PI}\left(\right)}} \]
    2. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\sin \left(\mathsf{PI}\left(\right) \cdot x\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \left(x \cdot tau\right)\right)}{\left(\mathsf{PI}\left(\right) \cdot \left(x \cdot tau\right)\right) \cdot \color{blue}{\left(x \cdot \mathsf{PI}\left(\right)\right)}} \]
    7. lower-*.f3298.0

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

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

      \[\leadsto \frac{\sin \left(\mathsf{PI}\left(\right) \cdot x\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \left(x \cdot tau\right)\right)}{\left(\mathsf{PI}\left(\right) \cdot \left(x \cdot tau\right)\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot x\right)}} \]
    10. lift-*.f3298.0

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

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

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

Alternative 2: 97.4% accurate, 1.0× speedup?

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

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

    \[\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. lift-*.f32N/A

      \[\leadsto \color{blue}{\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 \mathsf{PI}\left(\right)\right)}{x \cdot \mathsf{PI}\left(\right)}} \]
    2. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 97.4% accurate, 1.0× speedup?

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

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

    \[\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. lift-*.f32N/A

      \[\leadsto \color{blue}{\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 \mathsf{PI}\left(\right)\right)}{x \cdot \mathsf{PI}\left(\right)}} \]
    2. lift-/.f32N/A

      \[\leadsto \color{blue}{\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 \mathsf{PI}\left(\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \]
    3. div-invN/A

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

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

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

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

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

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

Alternative 4: 97.0% accurate, 1.0× speedup?

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

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

    \[\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. lift-*.f32N/A

      \[\leadsto \color{blue}{\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 \mathsf{PI}\left(\right)\right)}{x \cdot \mathsf{PI}\left(\right)}} \]
    2. lift-/.f32N/A

      \[\leadsto \color{blue}{\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 \mathsf{PI}\left(\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \]
    3. associate-*l/N/A

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{\left(\sin \left(\pi \cdot \left(x \cdot tau\right)\right) \cdot \frac{\sin \left(x \cdot \pi\right)}{x}\right) \cdot \frac{1}{x}}{\pi \cdot \left(\pi \cdot tau\right)}} \]
  5. 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)}} \]
  6. Step-by-step derivation
    1. lower-/.f32N/A

      \[\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)}} \]
    2. lower-*.f32N/A

      \[\leadsto \frac{\color{blue}{\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)} \]
    3. lower-sin.f32N/A

      \[\leadsto \frac{\color{blue}{\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. *-commutativeN/A

      \[\leadsto \frac{\sin \color{blue}{\left(\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau\right)} \cdot \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 \frac{\sin \color{blue}{\left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)} \cdot \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 \frac{\sin \left(x \cdot \color{blue}{\left(tau \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)} \]
    7. lower-*.f32N/A

      \[\leadsto \frac{\sin \color{blue}{\left(x \cdot \left(tau \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)} \]
    8. lower-*.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \color{blue}{\left(tau \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)} \]
    9. lower-PI.f32N/A

      \[\leadsto \frac{\sin \left(x \cdot \left(tau \cdot \color{blue}{\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)} \]
    10. lower-sin.f32N/A

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\color{blue}{\left(x \cdot x\right)} \cdot \left(tau \cdot {\mathsf{PI}\left(\right)}^{2}\right)} \]
  7. Applied rewrites97.2%

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

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

Alternative 5: 97.0% accurate, 1.0× speedup?

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

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

    \[\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. lower-*.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. lower-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. lower-*.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. lower-*.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. lower-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. lower-/.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. Applied rewrites97.0%

    \[\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. Final simplification97.0%

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

Alternative 6: 90.5% accurate, 1.2× speedup?

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

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

    \[\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. lift-*.f32N/A

      \[\leadsto \color{blue}{\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 \mathsf{PI}\left(\right)\right)}{x \cdot \mathsf{PI}\left(\right)}} \]
    2. lift-/.f32N/A

      \[\leadsto \color{blue}{\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 \mathsf{PI}\left(\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \]
    3. div-invN/A

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{{x}^{2} \cdot \left(\frac{-1}{6} \cdot \frac{\mathsf{PI}\left(\right)}{tau} + \frac{1}{120} \cdot \frac{{x}^{2} \cdot {\mathsf{PI}\left(\right)}^{3}}{tau}\right) + \frac{1}{tau \cdot \mathsf{PI}\left(\right)}}{x}} \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \left(x \cdot tau\right)\right) \]
  7. Applied rewrites90.8%

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

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

Alternative 7: 85.3% accurate, 1.6× speedup?

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

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

    \[\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. lift-*.f32N/A

      \[\leadsto \frac{\sin \color{blue}{\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 \mathsf{PI}\left(\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \]
    2. lift-*.f32N/A

      \[\leadsto \frac{\sin \left(\color{blue}{\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 \mathsf{PI}\left(\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \]
    3. associate-*l*N/A

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

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

      \[\leadsto \frac{\sin \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\right)}}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \]
    6. lower-*.f3297.1

      \[\leadsto \frac{\sin \left(\color{blue}{\left(\pi \cdot tau\right)} \cdot x\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi} \]
  4. Applied rewrites97.1%

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

    \[\leadsto \frac{\sin \left(\left(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\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(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\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(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\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(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\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(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\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. unpow2N/A

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

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

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

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

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

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

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

      \[\leadsto \frac{\sin \left(\left(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \mathsf{fma}\left(x, x \cdot \left(\frac{-1}{6} \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right)\right)\right), 1\right) \]
    13. lower-PI.f3285.5

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

    \[\leadsto \frac{\sin \left(\left(\pi \cdot tau\right) \cdot x\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \color{blue}{\mathsf{fma}\left(x, x \cdot \left(-0.16666666666666666 \cdot \left(\pi \cdot \pi\right)\right), 1\right)} \]
  8. Step-by-step derivation
    1. lift-*.f32N/A

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

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

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

      \[\leadsto \frac{\sin \color{blue}{\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, x \cdot \left(\frac{-1}{6} \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right), 1\right) \]
    5. lift-*.f32N/A

      \[\leadsto \frac{\sin \left(\color{blue}{\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, x \cdot \left(\frac{-1}{6} \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right), 1\right) \]
    6. lift-*.f3286.2

      \[\leadsto \frac{\sin \color{blue}{\left(\left(x \cdot \pi\right) \cdot tau\right)}}{\left(x \cdot \pi\right) \cdot tau} \cdot \mathsf{fma}\left(x, x \cdot \left(-0.16666666666666666 \cdot \left(\pi \cdot \pi\right)\right), 1\right) \]
    7. lift-*.f32N/A

      \[\leadsto \frac{\sin \left(\color{blue}{\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, x \cdot \left(\frac{-1}{6} \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right), 1\right) \]
    8. *-commutativeN/A

      \[\leadsto \frac{\sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot x\right)} \cdot tau\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \mathsf{fma}\left(x, x \cdot \left(\frac{-1}{6} \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right), 1\right) \]
    9. lift-*.f3286.2

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

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

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

Alternative 8: 85.3% accurate, 1.6× speedup?

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

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

    \[\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 \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)} \]
  4. 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 \left(1 + \frac{-1}{6} \cdot \color{blue}{\left({\mathsf{PI}\left(\right)}^{2} \cdot {x}^{2}\right)}\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 \left(1 + \color{blue}{\left(\frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot {x}^{2}}\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 \color{blue}{\left(\left(\frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot {x}^{2} + 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(\color{blue}{\left({\mathsf{PI}\left(\right)}^{2} \cdot \frac{-1}{6}\right)} \cdot {x}^{2} + 1\right) \]
    5. associate-*l*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}{{\mathsf{PI}\left(\right)}^{2} \cdot \left(\frac{-1}{6} \cdot {x}^{2}\right)} + 1\right) \]
    6. lower-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({\mathsf{PI}\left(\right)}^{2}, \frac{-1}{6} \cdot {x}^{2}, 1\right)} \]
    7. 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}{\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)}, \frac{-1}{6} \cdot {x}^{2}, 1\right) \]
    8. lower-*.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}{\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)}, \frac{-1}{6} \cdot {x}^{2}, 1\right) \]
    9. lower-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(\color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right), \frac{-1}{6} \cdot {x}^{2}, 1\right) \]
    10. lower-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(\mathsf{PI}\left(\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}, \frac{-1}{6} \cdot {x}^{2}, 1\right) \]
    11. *-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 \mathsf{fma}\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), \color{blue}{{x}^{2} \cdot \frac{-1}{6}}, 1\right) \]
    12. lower-*.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(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), \color{blue}{{x}^{2} \cdot \frac{-1}{6}}, 1\right) \]
    13. 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(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), \color{blue}{\left(x \cdot x\right)} \cdot \frac{-1}{6}, 1\right) \]
    14. lower-*.f3286.2

      \[\leadsto \frac{\sin \left(\left(x \cdot \pi\right) \cdot tau\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \mathsf{fma}\left(\pi \cdot \pi, \color{blue}{\left(x \cdot x\right)} \cdot -0.16666666666666666, 1\right) \]
  5. Applied rewrites86.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(\pi \cdot \pi, \left(x \cdot x\right) \cdot -0.16666666666666666, 1\right)} \]
  6. Final simplification86.2%

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

Alternative 9: 85.3% accurate, 1.6× speedup?

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

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

    \[\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. lift-*.f32N/A

      \[\leadsto \frac{\sin \color{blue}{\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 \mathsf{PI}\left(\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \]
    2. lift-*.f32N/A

      \[\leadsto \frac{\sin \left(\color{blue}{\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 \mathsf{PI}\left(\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \]
    3. associate-*l*N/A

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

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

      \[\leadsto \frac{\sin \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\right)}}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \]
    6. lower-*.f3297.1

      \[\leadsto \frac{\sin \left(\color{blue}{\left(\pi \cdot tau\right)} \cdot x\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi} \]
  4. Applied rewrites97.1%

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

    \[\leadsto \frac{\sin \left(\left(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\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(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\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(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\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(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\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(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\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. unpow2N/A

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

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

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

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

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

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

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

      \[\leadsto \frac{\sin \left(\left(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \mathsf{fma}\left(x, x \cdot \left(\frac{-1}{6} \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right)\right)\right), 1\right) \]
    13. lower-PI.f3285.5

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

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

    \[\leadsto \color{blue}{\frac{\sin \left(tau \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)\right)}{tau \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)}} \cdot \mathsf{fma}\left(x, x \cdot \left(\frac{-1}{6} \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right), 1\right) \]
  9. Step-by-step derivation
    1. lower-/.f32N/A

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\sin \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right)}{x \cdot \color{blue}{\left(tau \cdot \mathsf{PI}\left(\right)\right)}} \cdot \mathsf{fma}\left(x, x \cdot \left(\frac{-1}{6} \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right), 1\right) \]
    14. lower-PI.f3286.2

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

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

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

Alternative 10: 79.5% accurate, 4.4× speedup?

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

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

    \[\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. lift-*.f32N/A

      \[\leadsto \frac{\sin \color{blue}{\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 \mathsf{PI}\left(\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \]
    2. lift-*.f32N/A

      \[\leadsto \frac{\sin \left(\color{blue}{\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 \mathsf{PI}\left(\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \]
    3. associate-*l*N/A

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

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

      \[\leadsto \frac{\sin \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\right)}}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \]
    6. lower-*.f3297.1

      \[\leadsto \frac{\sin \left(\color{blue}{\left(\pi \cdot tau\right)} \cdot x\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi} \]
  4. Applied rewrites97.1%

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

    \[\leadsto \frac{\sin \left(\left(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\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(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\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(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\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(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\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(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\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. unpow2N/A

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

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

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

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

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

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

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

      \[\leadsto \frac{\sin \left(\left(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \mathsf{fma}\left(x, x \cdot \left(\frac{-1}{6} \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right)\right)\right), 1\right) \]
    13. lower-PI.f3285.5

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

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

    \[\leadsto \color{blue}{1} \cdot \mathsf{fma}\left(x, x \cdot \left(\frac{-1}{6} \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right), 1\right) \]
  9. Step-by-step derivation
    1. Applied rewrites65.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\mathsf{PI}\left(\right) \cdot \left(\left(x \cdot x\right) \cdot \mathsf{PI}\left(\right)\right), \frac{-1}{6} \cdot \color{blue}{\left(tau \cdot tau\right)}, 1\right) \cdot \mathsf{fma}\left(x, x \cdot \left(\frac{-1}{6} \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right), 1\right) \]
      17. lower-*.f3280.4

        \[\leadsto \mathsf{fma}\left(\pi \cdot \left(\left(x \cdot x\right) \cdot \pi\right), -0.16666666666666666 \cdot \color{blue}{\left(tau \cdot tau\right)}, 1\right) \cdot \mathsf{fma}\left(x, x \cdot \left(-0.16666666666666666 \cdot \left(\pi \cdot \pi\right)\right), 1\right) \]
    4. Applied rewrites80.4%

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

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

    Alternative 11: 79.5% accurate, 4.4× speedup?

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

      \[\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. lift-*.f32N/A

        \[\leadsto \frac{\sin \color{blue}{\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 \mathsf{PI}\left(\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \]
      2. lift-*.f32N/A

        \[\leadsto \frac{\sin \left(\color{blue}{\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 \mathsf{PI}\left(\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \]
      3. associate-*l*N/A

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

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

        \[\leadsto \frac{\sin \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\right)}}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \]
      6. lower-*.f3297.1

        \[\leadsto \frac{\sin \left(\color{blue}{\left(\pi \cdot tau\right)} \cdot x\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi} \]
    4. Applied rewrites97.1%

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

      \[\leadsto \frac{\sin \left(\left(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\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(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\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(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\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(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\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(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\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. unpow2N/A

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

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

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

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

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

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

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

        \[\leadsto \frac{\sin \left(\left(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \mathsf{fma}\left(x, x \cdot \left(\frac{-1}{6} \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right)\right)\right), 1\right) \]
      13. lower-PI.f3285.5

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

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

      \[\leadsto \color{blue}{\left(1 + \frac{-1}{6} \cdot \left({tau}^{2} \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right)} \cdot \mathsf{fma}\left(x, x \cdot \left(\frac{-1}{6} \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right), 1\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 {\mathsf{PI}\left(\right)}^{2}\right)\right) + 1\right)} \cdot \mathsf{fma}\left(x, x \cdot \left(\frac{-1}{6} \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right), 1\right) \]
      2. *-commutativeN/A

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

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

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

        \[\leadsto \left(\color{blue}{{x}^{2} \cdot \left(\frac{-1}{6} \cdot \left({tau}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} + 1\right) \cdot \mathsf{fma}\left(x, x \cdot \left(\frac{-1}{6} \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right), 1\right) \]
      6. lower-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), 1\right)} \cdot \mathsf{fma}\left(x, x \cdot \left(\frac{-1}{6} \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right), 1\right) \]
    10. Applied rewrites80.4%

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

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

    Alternative 12: 78.7% accurate, 7.8× speedup?

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

      \[\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. lift-*.f32N/A

        \[\leadsto \color{blue}{\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 \mathsf{PI}\left(\right)\right)}{x \cdot \mathsf{PI}\left(\right)}} \]
      2. lift-/.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}{\frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{x \cdot \mathsf{PI}\left(\right)}} \]
      3. 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)}} \]
      4. lift-*.f32N/A

        \[\leadsto \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)}{\color{blue}{x \cdot \mathsf{PI}\left(\right)}} \]
      5. *-commutativeN/A

        \[\leadsto \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)}{\color{blue}{\mathsf{PI}\left(\right) \cdot x}} \]
      6. times-fracN/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}}{\mathsf{PI}\left(\right)} \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{x}} \]
      7. associate-*r/N/A

        \[\leadsto \color{blue}{\frac{\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}}{\mathsf{PI}\left(\right)} \cdot \sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{x}} \]
      8. lower-/.f32N/A

        \[\leadsto \color{blue}{\frac{\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}}{\mathsf{PI}\left(\right)} \cdot \sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{x}} \]
    4. Applied rewrites97.4%

      \[\leadsto \color{blue}{\frac{\frac{\sin \left(\pi \cdot \left(x \cdot tau\right)\right)}{\pi \cdot \left(\pi \cdot \left(x \cdot tau\right)\right)} \cdot \sin \left(x \cdot \pi\right)}{x}} \]
    5. 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)} \]
    6. 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. distribute-rgt-inN/A

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

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

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

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

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

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

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

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

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

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

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

    Alternative 13: 78.7% accurate, 7.8× speedup?

    \[\begin{array}{l} \\ \mathsf{fma}\left(x \cdot x, \left(\pi \cdot \pi\right) \cdot \mathsf{fma}\left(-0.16666666666666666, tau \cdot tau, -0.16666666666666666\right), 1\right) \end{array} \]
    (FPCore (x tau)
     :precision binary32
     (fma
      (* x x)
      (* (* PI PI) (fma -0.16666666666666666 (* tau tau) -0.16666666666666666))
      1.0))
    float code(float x, float tau) {
    	return fmaf((x * x), ((((float) M_PI) * ((float) M_PI)) * fmaf(-0.16666666666666666f, (tau * tau), -0.16666666666666666f)), 1.0f);
    }
    
    function code(x, tau)
    	return fma(Float32(x * x), 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, \left(\pi \cdot \pi\right) \cdot \mathsf{fma}\left(-0.16666666666666666, tau \cdot tau, -0.16666666666666666\right), 1\right)
    \end{array}
    
    Derivation
    1. Initial program 97.9%

      \[\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 + {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)} \]
    4. 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. lower-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) + \frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2}, 1\right)} \]
      3. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x \cdot x, \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{fma}\left(\frac{-1}{6}, \color{blue}{tau \cdot tau}, \frac{-1}{6}\right), 1\right) \]
      16. lower-*.f3279.7

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

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

    Alternative 14: 64.7% accurate, 9.6× speedup?

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

      \[\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. lift-*.f32N/A

        \[\leadsto \frac{\sin \color{blue}{\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 \mathsf{PI}\left(\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \]
      2. lift-*.f32N/A

        \[\leadsto \frac{\sin \left(\color{blue}{\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 \mathsf{PI}\left(\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \]
      3. associate-*l*N/A

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

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

        \[\leadsto \frac{\sin \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\right)}}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \]
      6. lower-*.f3297.1

        \[\leadsto \frac{\sin \left(\color{blue}{\left(\pi \cdot tau\right)} \cdot x\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi} \]
    4. Applied rewrites97.1%

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

      \[\leadsto \frac{\sin \left(\left(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\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(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\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(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\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(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\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(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\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. unpow2N/A

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

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

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

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

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

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

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

        \[\leadsto \frac{\sin \left(\left(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \mathsf{fma}\left(x, x \cdot \left(\frac{-1}{6} \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right)\right)\right), 1\right) \]
      13. lower-PI.f3285.5

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

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

      \[\leadsto \color{blue}{1} \cdot \mathsf{fma}\left(x, x \cdot \left(\frac{-1}{6} \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right), 1\right) \]
    9. Step-by-step derivation
      1. Applied rewrites65.1%

        \[\leadsto \color{blue}{1} \cdot \mathsf{fma}\left(x, x \cdot \left(-0.16666666666666666 \cdot \left(\pi \cdot \pi\right)\right), 1\right) \]
      2. Step-by-step derivation
        1. Applied rewrites65.1%

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

        Alternative 15: 64.7% accurate, 9.6× speedup?

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

          \[\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. lift-*.f32N/A

            \[\leadsto \frac{\sin \color{blue}{\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 \mathsf{PI}\left(\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \]
          2. lift-*.f32N/A

            \[\leadsto \frac{\sin \left(\color{blue}{\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 \mathsf{PI}\left(\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \]
          3. associate-*l*N/A

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

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

            \[\leadsto \frac{\sin \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\right)}}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{x \cdot \mathsf{PI}\left(\right)} \]
          6. lower-*.f3297.1

            \[\leadsto \frac{\sin \left(\color{blue}{\left(\pi \cdot tau\right)} \cdot x\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi} \]
        4. Applied rewrites97.1%

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

          \[\leadsto \frac{\sin \left(\left(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\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(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\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(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\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(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\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(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\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. unpow2N/A

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

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

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

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

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

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

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

            \[\leadsto \frac{\sin \left(\left(\mathsf{PI}\left(\right) \cdot tau\right) \cdot x\right)}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau} \cdot \mathsf{fma}\left(x, x \cdot \left(\frac{-1}{6} \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right)\right)\right), 1\right) \]
          13. lower-PI.f3285.5

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

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

          \[\leadsto \color{blue}{1} \cdot \mathsf{fma}\left(x, x \cdot \left(\frac{-1}{6} \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right), 1\right) \]
        9. Step-by-step derivation
          1. Applied rewrites65.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto 1 \cdot \mathsf{fma}\left(-0.16666666666666666, \pi \cdot \left(\left(x \cdot x\right) \cdot \color{blue}{\pi}\right), 1\right) \]
          4. Applied rewrites65.1%

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

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

          Alternative 16: 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 97.9%

            \[\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. Applied rewrites64.2%

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

            Reproduce

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