Lanczos kernel

Percentage Accurate: 97.9% → 97.9%
Time: 11.5s
Alternatives: 13
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary32 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 13 alternatives:

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

Initial Program: 97.9% accurate, 1.0× speedup?

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

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

Alternative 1: 97.9% accurate, 1.0× speedup?

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

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

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

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

Alternative 2: 97.7% accurate, 1.0× speedup?

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

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

    \[\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. frac-2negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \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(\left(\color{blue}{\left(\mathsf{neg}\left(\mathsf{PI}\left(\right)\right)\right)} \cdot x\right) \cdot \left(\left(\mathsf{neg}\left(\mathsf{PI}\left(\right)\right)\right) \cdot x\right)\right)} \]
    6. distribute-lft-neg-outN/A

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

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

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

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

      \[\leadsto \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(\left(\mathsf{neg}\left(x \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(\mathsf{neg}\left(\mathsf{PI}\left(\right)\right)\right)} \cdot x\right)\right)} \]
    11. distribute-lft-neg-outN/A

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

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

      \[\leadsto \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(\left(\mathsf{neg}\left(x \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\mathsf{neg}\left(\color{blue}{x \cdot \mathsf{PI}\left(\right)}\right)\right)\right)} \]
    14. sqr-negN/A

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

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

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

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

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

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

Alternative 3: 97.3% accurate, 1.0× speedup?

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

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

    \[\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. frac-2negN/A

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{\sin \left(tau \cdot \left(x \cdot \pi\right)\right) \cdot \sin \left(x \cdot \pi\right)}{\left(tau \cdot \left(\left(-\pi\right) \cdot x\right)\right) \cdot \left(\left(-\pi\right) \cdot x\right)}} \]
  7. Step-by-step derivation
    1. lift-/.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)}{\left(tau \cdot \left(\left(\mathsf{neg}\left(\mathsf{PI}\left(\right)\right)\right) \cdot x\right)\right) \cdot \left(\left(\mathsf{neg}\left(\mathsf{PI}\left(\right)\right)\right) \cdot x\right)}} \]
    2. lift-*.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)}}{\left(tau \cdot \left(\left(\mathsf{neg}\left(\mathsf{PI}\left(\right)\right)\right) \cdot x\right)\right) \cdot \left(\left(\mathsf{neg}\left(\mathsf{PI}\left(\right)\right)\right) \cdot x\right)} \]
    3. 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)}{\left(tau \cdot \left(\left(\mathsf{neg}\left(\mathsf{PI}\left(\right)\right)\right) \cdot x\right)\right) \cdot \left(\left(\mathsf{neg}\left(\mathsf{PI}\left(\right)\right)\right) \cdot x\right)}} \]
    4. *-commutativeN/A

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

      \[\leadsto \color{blue}{\frac{\sin \left(x \cdot \mathsf{PI}\left(\right)\right)}{\left(tau \cdot \left(\left(\mathsf{neg}\left(\mathsf{PI}\left(\right)\right)\right) \cdot x\right)\right) \cdot \left(\left(\mathsf{neg}\left(\mathsf{PI}\left(\right)\right)\right) \cdot x\right)} \cdot \sin \left(tau \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)\right)} \]
  8. Applied rewrites97.5%

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

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

Alternative 4: 97.3% accurate, 1.0× speedup?

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

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

    \[\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 tau 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. *-commutativeN/A

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

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

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

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

Alternative 5: 85.4% accurate, 1.6× speedup?

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

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

    \[\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 \color{blue}{\left(\frac{-1}{6} \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + 1\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(\color{blue}{\left(\frac{-1}{6} \cdot {x}^{2}\right) \cdot {\mathsf{PI}\left(\right)}^{2}} + 1\right) \]
    3. 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(\frac{-1}{6} \cdot {x}^{2}, {\mathsf{PI}\left(\right)}^{2}, 1\right)} \]
    4. 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(\frac{-1}{6} \cdot \color{blue}{\left(x \cdot x\right)}, {\mathsf{PI}\left(\right)}^{2}, 1\right) \]
    5. 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 \mathsf{fma}\left(\color{blue}{\left(\frac{-1}{6} \cdot x\right) \cdot x}, {\mathsf{PI}\left(\right)}^{2}, 1\right) \]
    6. 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}{\left(\frac{-1}{6} \cdot x\right) \cdot x}, {\mathsf{PI}\left(\right)}^{2}, 1\right) \]
    7. 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}{\left(\frac{-1}{6} \cdot x\right)} \cdot x, {\mathsf{PI}\left(\right)}^{2}, 1\right) \]
    8. 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(\left(\frac{-1}{6} \cdot x\right) \cdot x, \color{blue}{\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)}, 1\right) \]
    9. 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(\left(\frac{-1}{6} \cdot x\right) \cdot x, \color{blue}{\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)}, 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(\left(\frac{-1}{6} \cdot x\right) \cdot x, \color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right), 1\right) \]
    11. lower-PI.f3285.5

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

    \[\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(\left(-0.16666666666666666 \cdot x\right) \cdot x, \pi \cdot \pi, 1\right)} \]
  6. Final simplification85.5%

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

Alternative 6: 85.3% accurate, 1.6× speedup?

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

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

    \[\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 \color{blue}{\left(\frac{-1}{6} \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + 1\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(\color{blue}{\left(\frac{-1}{6} \cdot {x}^{2}\right) \cdot {\mathsf{PI}\left(\right)}^{2}} + 1\right) \]
    3. 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(\frac{-1}{6} \cdot {x}^{2}, {\mathsf{PI}\left(\right)}^{2}, 1\right)} \]
    4. 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(\frac{-1}{6} \cdot \color{blue}{\left(x \cdot x\right)}, {\mathsf{PI}\left(\right)}^{2}, 1\right) \]
    5. 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 \mathsf{fma}\left(\color{blue}{\left(\frac{-1}{6} \cdot x\right) \cdot x}, {\mathsf{PI}\left(\right)}^{2}, 1\right) \]
    6. 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}{\left(\frac{-1}{6} \cdot x\right) \cdot x}, {\mathsf{PI}\left(\right)}^{2}, 1\right) \]
    7. 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}{\left(\frac{-1}{6} \cdot x\right)} \cdot x, {\mathsf{PI}\left(\right)}^{2}, 1\right) \]
    8. 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(\left(\frac{-1}{6} \cdot x\right) \cdot x, \color{blue}{\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)}, 1\right) \]
    9. 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(\left(\frac{-1}{6} \cdot x\right) \cdot x, \color{blue}{\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)}, 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(\left(\frac{-1}{6} \cdot x\right) \cdot x, \color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right), 1\right) \]
    11. lower-PI.f3285.5

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

    \[\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(\left(-0.16666666666666666 \cdot x\right) \cdot x, \pi \cdot \pi, 1\right)} \]
  6. 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 \mathsf{fma}\left(\left(\frac{-1}{6} \cdot x\right) \cdot x, \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), 1\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 \mathsf{fma}\left(\left(\frac{-1}{6} \cdot x\right) \cdot x, \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), 1\right) \]
    3. associate-*l/N/A

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

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

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

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

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

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

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

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

Alternative 7: 84.8% accurate, 2.7× speedup?

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

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

    \[\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) + \left(\frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2} + {x}^{2} \cdot \left(\frac{1}{120} \cdot \left({tau}^{4} \cdot {\mathsf{PI}\left(\right)}^{4}\right) + \left(\frac{1}{120} \cdot {\mathsf{PI}\left(\right)}^{4} + \frac{1}{36} \cdot \left({tau}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right)} \]
  4. Applied rewrites84.8%

    \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(tau, tau, 1\right), \left(\pi \cdot \pi\right) \cdot -0.16666666666666666, \left({\pi}^{4} \cdot \mathsf{fma}\left(\mathsf{fma}\left(tau \cdot tau, tau \cdot tau, 1\right), 0.008333333333333333, 0.027777777777777776 \cdot \left(tau \cdot tau\right)\right)\right) \cdot \left(x \cdot x\right)\right), x \cdot x, 1\right)} \]
  5. Step-by-step derivation
    1. Applied rewrites84.8%

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

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

    Alternative 8: 84.8% accurate, 2.7× speedup?

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

      \[\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) + \left(\frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2} + {x}^{2} \cdot \left(\frac{1}{120} \cdot \left({tau}^{4} \cdot {\mathsf{PI}\left(\right)}^{4}\right) + \left(\frac{1}{120} \cdot {\mathsf{PI}\left(\right)}^{4} + \frac{1}{36} \cdot \left({tau}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right)} \]
    4. Applied rewrites84.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(tau, tau, 1\right), \left(\pi \cdot \pi\right) \cdot -0.16666666666666666, \left({\pi}^{4} \cdot \mathsf{fma}\left(\mathsf{fma}\left(tau \cdot tau, tau \cdot tau, 1\right), 0.008333333333333333, 0.027777777777777776 \cdot \left(tau \cdot tau\right)\right)\right) \cdot \left(x \cdot x\right)\right), x \cdot x, 1\right)} \]
    5. Step-by-step derivation
      1. Applied rewrites84.8%

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

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

      Alternative 9: 79.8% accurate, 4.4× speedup?

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

        \[\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 \color{blue}{\left(\frac{-1}{6} \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + 1\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(\color{blue}{\left(\frac{-1}{6} \cdot {x}^{2}\right) \cdot {\mathsf{PI}\left(\right)}^{2}} + 1\right) \]
        3. 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(\frac{-1}{6} \cdot {x}^{2}, {\mathsf{PI}\left(\right)}^{2}, 1\right)} \]
        4. 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(\frac{-1}{6} \cdot \color{blue}{\left(x \cdot x\right)}, {\mathsf{PI}\left(\right)}^{2}, 1\right) \]
        5. 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 \mathsf{fma}\left(\color{blue}{\left(\frac{-1}{6} \cdot x\right) \cdot x}, {\mathsf{PI}\left(\right)}^{2}, 1\right) \]
        6. 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}{\left(\frac{-1}{6} \cdot x\right) \cdot x}, {\mathsf{PI}\left(\right)}^{2}, 1\right) \]
        7. 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}{\left(\frac{-1}{6} \cdot x\right)} \cdot x, {\mathsf{PI}\left(\right)}^{2}, 1\right) \]
        8. 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(\left(\frac{-1}{6} \cdot x\right) \cdot x, \color{blue}{\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)}, 1\right) \]
        9. 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(\left(\frac{-1}{6} \cdot x\right) \cdot x, \color{blue}{\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)}, 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(\left(\frac{-1}{6} \cdot x\right) \cdot x, \color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right), 1\right) \]
        11. lower-PI.f3285.5

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

        \[\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(\left(-0.16666666666666666 \cdot x\right) \cdot x, \pi \cdot \pi, 1\right)} \]
      6. Taylor expanded in tau around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 10: 79.1% accurate, 7.8× speedup?

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

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

            \[\leadsto \color{blue}{\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) \cdot {x}^{2}} + 1 \]
          3. lower-fma.f32N/A

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

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

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

        Alternative 11: 64.9% accurate, 9.6× speedup?

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

          \[\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 \color{blue}{\left(\frac{-1}{6} \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + 1\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(\color{blue}{\left(\frac{-1}{6} \cdot {x}^{2}\right) \cdot {\mathsf{PI}\left(\right)}^{2}} + 1\right) \]
          3. 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(\frac{-1}{6} \cdot {x}^{2}, {\mathsf{PI}\left(\right)}^{2}, 1\right)} \]
          4. 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(\frac{-1}{6} \cdot \color{blue}{\left(x \cdot x\right)}, {\mathsf{PI}\left(\right)}^{2}, 1\right) \]
          5. 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 \mathsf{fma}\left(\color{blue}{\left(\frac{-1}{6} \cdot x\right) \cdot x}, {\mathsf{PI}\left(\right)}^{2}, 1\right) \]
          6. 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}{\left(\frac{-1}{6} \cdot x\right) \cdot x}, {\mathsf{PI}\left(\right)}^{2}, 1\right) \]
          7. 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}{\left(\frac{-1}{6} \cdot x\right)} \cdot x, {\mathsf{PI}\left(\right)}^{2}, 1\right) \]
          8. 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(\left(\frac{-1}{6} \cdot x\right) \cdot x, \color{blue}{\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)}, 1\right) \]
          9. 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(\left(\frac{-1}{6} \cdot x\right) \cdot x, \color{blue}{\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)}, 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(\left(\frac{-1}{6} \cdot x\right) \cdot x, \color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right), 1\right) \]
          11. lower-PI.f3285.5

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

          \[\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(\left(-0.16666666666666666 \cdot x\right) \cdot x, \pi \cdot \pi, 1\right)} \]
        6. Taylor expanded in tau around 0

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

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

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

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

            Alternative 12: 64.9% accurate, 9.6× speedup?

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

              \[\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 \color{blue}{\left(\frac{-1}{6} \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + 1\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(\color{blue}{\left(\frac{-1}{6} \cdot {x}^{2}\right) \cdot {\mathsf{PI}\left(\right)}^{2}} + 1\right) \]
              3. 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(\frac{-1}{6} \cdot {x}^{2}, {\mathsf{PI}\left(\right)}^{2}, 1\right)} \]
              4. 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(\frac{-1}{6} \cdot \color{blue}{\left(x \cdot x\right)}, {\mathsf{PI}\left(\right)}^{2}, 1\right) \]
              5. 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 \mathsf{fma}\left(\color{blue}{\left(\frac{-1}{6} \cdot x\right) \cdot x}, {\mathsf{PI}\left(\right)}^{2}, 1\right) \]
              6. 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}{\left(\frac{-1}{6} \cdot x\right) \cdot x}, {\mathsf{PI}\left(\right)}^{2}, 1\right) \]
              7. 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}{\left(\frac{-1}{6} \cdot x\right)} \cdot x, {\mathsf{PI}\left(\right)}^{2}, 1\right) \]
              8. 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(\left(\frac{-1}{6} \cdot x\right) \cdot x, \color{blue}{\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)}, 1\right) \]
              9. 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(\left(\frac{-1}{6} \cdot x\right) \cdot x, \color{blue}{\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)}, 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(\left(\frac{-1}{6} \cdot x\right) \cdot x, \color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right), 1\right) \]
              11. lower-PI.f3285.5

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

              \[\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(\left(-0.16666666666666666 \cdot x\right) \cdot x, \pi \cdot \pi, 1\right)} \]
            6. Taylor expanded in tau around 0

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

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

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

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

                Alternative 13: 63.9% 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.8%

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

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

                  Reproduce

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