Lanczos kernel

Percentage Accurate: 97.9% → 97.9%
Time: 4.3s
Alternatives: 15
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}

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 15 alternatives:

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

Initial Program: 97.9% accurate, 1.0× speedup?

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

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

Alternative 1: 97.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := \left(x \cdot \pi\right) \cdot tau\\
\frac{\sin t\_1}{t\_1} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi}
\end{array}
\end{array}
Derivation
  1. Initial program 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

Alternative 2: 97.3% accurate, 1.1× speedup?

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

\\
\frac{\frac{\sin \left(\left(\pi \cdot x\right) \cdot tau\right) \cdot \sin \left(\pi \cdot x\right)}{{\left(\pi \cdot x\right)}^{2}}}{tau}
\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. 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)}} \]
  3. Step-by-step derivation
    1. associate-/l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\sin \left(\left(x \cdot tau\right) \cdot \pi\right) \cdot \sin \left(\pi \cdot x\right)}{{\left(\pi \cdot x\right)}^{2} \cdot tau} \]
    5. lift-PI.f32N/A

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

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

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

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

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

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

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

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

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

Alternative 3: 97.3% accurate, 1.1× speedup?

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

\\
\sin \left(\left(\pi \cdot x\right) \cdot tau\right) \cdot \frac{\sin \left(\pi \cdot x\right)}{{\left(\pi \cdot x\right)}^{2} \cdot tau}
\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. 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)}} \]
  3. Step-by-step derivation
    1. associate-/l*N/A

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sin \left(\left(\mathsf{PI}\left(\right) \cdot x\right) \cdot tau\right) \cdot \frac{\sin \left(\color{blue}{\pi} \cdot x\right)}{{\left(\pi \cdot x\right)}^{2} \cdot tau} \]
    9. lift-PI.f3297.3

      \[\leadsto \sin \left(\left(\pi \cdot x\right) \cdot tau\right) \cdot \frac{\sin \left(\pi \cdot x\right)}{{\left(\pi \cdot x\right)}^{2} \cdot tau} \]
  6. Applied rewrites97.3%

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

Alternative 4: 97.1% accurate, 1.1× speedup?

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

\\
\sin \left(\left(tau \cdot x\right) \cdot \pi\right) \cdot \frac{\sin \left(\pi \cdot x\right)}{{\left(\pi \cdot x\right)}^{2} \cdot tau}
\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. 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)}} \]
  3. Step-by-step derivation
    1. associate-/l*N/A

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

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

    \[\leadsto \color{blue}{\sin \left(\left(tau \cdot x\right) \cdot \pi\right) \cdot \frac{\sin \left(\pi \cdot x\right)}{{\left(\pi \cdot x\right)}^{2} \cdot tau}} \]
  5. Add Preprocessing

Alternative 5: 78.2% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(-0.16666666666666666 \cdot \left({\left(\pi \cdot tau\right)}^{2} + \pi \cdot \pi\right), e^{\log x \cdot 2}, 1\right) \end{array} \]
(FPCore (x tau)
 :precision binary32
 (fma
  (* -0.16666666666666666 (+ (pow (* PI tau) 2.0) (* PI PI)))
  (exp (* (log x) 2.0))
  1.0))
float code(float x, float tau) {
	return fmaf((-0.16666666666666666f * (powf((((float) M_PI) * tau), 2.0f) + (((float) M_PI) * ((float) M_PI)))), expf((logf(x) * 2.0f)), 1.0f);
}
function code(x, tau)
	return fma(Float32(Float32(-0.16666666666666666) * Float32((Float32(Float32(pi) * tau) ^ Float32(2.0)) + Float32(Float32(pi) * Float32(pi)))), exp(Float32(log(x) * Float32(2.0))), Float32(1.0))
end
\begin{array}{l}

\\
\mathsf{fma}\left(-0.16666666666666666 \cdot \left({\left(\pi \cdot tau\right)}^{2} + \pi \cdot \pi\right), e^{\log x \cdot 2}, 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. 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)} \]
  3. Step-by-step derivation
    1. +-commutativeN/A

      \[\leadsto {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) + \color{blue}{1} \]
    2. *-commutativeN/A

      \[\leadsto \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 \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}, \color{blue}{{x}^{2}}, 1\right) \]
  4. Applied rewrites78.2%

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

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

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

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

      \[\leadsto \mathsf{fma}\left(\frac{-1}{6} \cdot \left({\left(\pi \cdot tau\right)}^{2} + \pi \cdot \pi\right), e^{\log x \cdot 2}, 1\right) \]
    5. lower-*.f32N/A

      \[\leadsto \mathsf{fma}\left(\frac{-1}{6} \cdot \left({\left(\pi \cdot tau\right)}^{2} + \pi \cdot \pi\right), e^{\log x \cdot 2}, 1\right) \]
    6. lower-log.f3278.2

      \[\leadsto \mathsf{fma}\left(-0.16666666666666666 \cdot \left({\left(\pi \cdot tau\right)}^{2} + \pi \cdot \pi\right), e^{\log x \cdot 2}, 1\right) \]
  6. Applied rewrites78.2%

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

Alternative 6: 78.2% accurate, 1.3× speedup?

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

\\
\left(-0.16666666666666666 \cdot \left(x \cdot x\right)\right) \cdot \left(\mathsf{fma}\left(tau, tau, 1\right) \cdot \left(\pi \cdot \pi\right)\right) + 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. 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)} \]
  3. Step-by-step derivation
    1. +-commutativeN/A

      \[\leadsto {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) + \color{blue}{1} \]
    2. *-commutativeN/A

      \[\leadsto \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 \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}, \color{blue}{{x}^{2}}, 1\right) \]
  4. Applied rewrites78.2%

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

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

Alternative 7: 78.2% accurate, 1.4× speedup?

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

\\
\mathsf{fma}\left(\left(\left(\mathsf{fma}\left(tau, tau, 1\right) \cdot \left(\pi \cdot \pi\right)\right) \cdot -0.16666666666666666\right) \cdot x, x, 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. 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)} \]
  3. Step-by-step derivation
    1. +-commutativeN/A

      \[\leadsto {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) + \color{blue}{1} \]
    2. *-commutativeN/A

      \[\leadsto \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 \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}, \color{blue}{{x}^{2}}, 1\right) \]
  4. Applied rewrites78.2%

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

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

Alternative 8: 70.8% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
t_1 := \left(x \cdot \pi\right) \cdot tau\\
\frac{\sin t\_1}{t\_1} \cdot 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. Taylor expanded in x around 0

    \[\leadsto \frac{\sin \left(\left(x \cdot \pi\right) \cdot tau\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \color{blue}{1} \]
  3. Step-by-step derivation
    1. Applied rewrites70.8%

      \[\leadsto \frac{\sin \left(\left(x \cdot \pi\right) \cdot tau\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \color{blue}{1} \]
    2. Add Preprocessing

    Alternative 9: 70.7% accurate, 1.5× speedup?

    \[\begin{array}{l} \\ \sin \left(\left(tau \cdot x\right) \cdot \pi\right) \cdot \frac{1}{\left(x \cdot tau\right) \cdot \pi} \end{array} \]
    (FPCore (x tau)
     :precision binary32
     (* (sin (* (* tau x) PI)) (/ 1.0 (* (* x tau) PI))))
    float code(float x, float tau) {
    	return sinf(((tau * x) * ((float) M_PI))) * (1.0f / ((x * tau) * ((float) M_PI)));
    }
    
    function code(x, tau)
    	return Float32(sin(Float32(Float32(tau * x) * Float32(pi))) * Float32(Float32(1.0) / Float32(Float32(x * tau) * Float32(pi))))
    end
    
    function tmp = code(x, tau)
    	tmp = sin(((tau * x) * single(pi))) * (single(1.0) / ((x * tau) * single(pi)));
    end
    
    \begin{array}{l}
    
    \\
    \sin \left(\left(tau \cdot x\right) \cdot \pi\right) \cdot \frac{1}{\left(x \cdot tau\right) \cdot \pi}
    \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. 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)}} \]
    3. Step-by-step derivation
      1. associate-/l*N/A

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

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

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

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

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

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

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

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

        \[\leadsto \sin \left(\left(tau \cdot x\right) \cdot \pi\right) \cdot \frac{1}{\left(x \cdot tau\right) \cdot \mathsf{PI}\left(\right)} \]
      6. lift-PI.f3270.7

        \[\leadsto \sin \left(\left(tau \cdot x\right) \cdot \pi\right) \cdot \frac{1}{\left(x \cdot tau\right) \cdot \pi} \]
    7. Applied rewrites70.7%

      \[\leadsto \sin \left(\left(tau \cdot x\right) \cdot \pi\right) \cdot \frac{1}{\color{blue}{\left(x \cdot tau\right) \cdot \pi}} \]
    8. Add Preprocessing

    Alternative 10: 69.5% accurate, 1.8× speedup?

    \[\begin{array}{l} \\ \mathsf{fma}\left({\left(tau \cdot \left(\pi \cdot x\right)\right)}^{2}, -0.16666666666666666, 1\right) \cdot 1 \end{array} \]
    (FPCore (x tau)
     :precision binary32
     (* (fma (pow (* tau (* PI x)) 2.0) -0.16666666666666666 1.0) 1.0))
    float code(float x, float tau) {
    	return fmaf(powf((tau * (((float) M_PI) * x)), 2.0f), -0.16666666666666666f, 1.0f) * 1.0f;
    }
    
    function code(x, tau)
    	return Float32(fma((Float32(tau * Float32(Float32(pi) * x)) ^ Float32(2.0)), Float32(-0.16666666666666666), Float32(1.0)) * Float32(1.0))
    end
    
    \begin{array}{l}
    
    \\
    \mathsf{fma}\left({\left(tau \cdot \left(\pi \cdot x\right)\right)}^{2}, -0.16666666666666666, 1\right) \cdot 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. Step-by-step derivation
      1. lift-/.f32N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\sin \left(\left(x \cdot \pi\right) \cdot tau\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \color{blue}{1} \]
    5. Step-by-step derivation
      1. Applied rewrites70.8%

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

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

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

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

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

          \[\leadsto \left(1 + \frac{-1}{6} \cdot \left({\left(\pi \cdot x\right)}^{2} \cdot {tau}^{2}\right)\right) \cdot 1 \]
        6. unpow-prod-downN/A

          \[\leadsto \left(1 + \frac{-1}{6} \cdot {\left(\left(\pi \cdot x\right) \cdot tau\right)}^{\color{blue}{2}}\right) \cdot 1 \]
        7. lift-*.f32N/A

          \[\leadsto \left(1 + \frac{-1}{6} \cdot {\left(\left(\pi \cdot x\right) \cdot tau\right)}^{2}\right) \cdot 1 \]
        8. lift-pow.f32N/A

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

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

          \[\leadsto \left({\left(\left(\pi \cdot x\right) \cdot tau\right)}^{2} \cdot \frac{-1}{6} + \color{blue}{1}\right) \cdot 1 \]
        11. lift-fma.f3269.5

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

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

      Alternative 11: 69.5% accurate, 1.8× speedup?

      \[\begin{array}{l} \\ \mathsf{fma}\left(-0.16666666666666666 \cdot {\left(\pi \cdot tau\right)}^{2}, x \cdot x, 1\right) \end{array} \]
      (FPCore (x tau)
       :precision binary32
       (fma (* -0.16666666666666666 (pow (* PI tau) 2.0)) (* x x) 1.0))
      float code(float x, float tau) {
      	return fmaf((-0.16666666666666666f * powf((((float) M_PI) * tau), 2.0f)), (x * x), 1.0f);
      }
      
      function code(x, tau)
      	return fma(Float32(Float32(-0.16666666666666666) * (Float32(Float32(pi) * tau) ^ Float32(2.0))), Float32(x * x), Float32(1.0))
      end
      
      \begin{array}{l}
      
      \\
      \mathsf{fma}\left(-0.16666666666666666 \cdot {\left(\pi \cdot tau\right)}^{2}, x \cdot x, 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. 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)} \]
      3. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto {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) + \color{blue}{1} \]
        2. *-commutativeN/A

          \[\leadsto \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 \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}, \color{blue}{{x}^{2}}, 1\right) \]
      4. Applied rewrites78.2%

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\frac{-1}{6} \cdot {\left(\pi \cdot tau\right)}^{2}, x \cdot x, 1\right) \]
        5. lift-pow.f3269.5

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

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

      Alternative 12: 64.3% accurate, 2.1× speedup?

      \[\begin{array}{l} \\ \mathsf{fma}\left(-0.16666666666666666 \cdot \left(\pi \cdot \pi\right), x \cdot x, 1\right) \end{array} \]
      (FPCore (x tau)
       :precision binary32
       (fma (* -0.16666666666666666 (* PI PI)) (* x x) 1.0))
      float code(float x, float tau) {
      	return fmaf((-0.16666666666666666f * (((float) M_PI) * ((float) M_PI))), (x * x), 1.0f);
      }
      
      function code(x, tau)
      	return fma(Float32(Float32(-0.16666666666666666) * Float32(Float32(pi) * Float32(pi))), Float32(x * x), Float32(1.0))
      end
      
      \begin{array}{l}
      
      \\
      \mathsf{fma}\left(-0.16666666666666666 \cdot \left(\pi \cdot \pi\right), x \cdot x, 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. 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)} \]
      3. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto {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) + \color{blue}{1} \]
        2. *-commutativeN/A

          \[\leadsto \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 \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}, \color{blue}{{x}^{2}}, 1\right) \]
      4. Applied rewrites78.2%

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\frac{-1}{6} \cdot \left(\pi \cdot \mathsf{PI}\left(\right)\right), x \cdot x, 1\right) \]
        4. lift-PI.f3264.3

          \[\leadsto \mathsf{fma}\left(-0.16666666666666666 \cdot \left(\pi \cdot \pi\right), x \cdot x, 1\right) \]
      7. Applied rewrites64.3%

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

      Alternative 13: 64.3% accurate, 2.1× speedup?

      \[\begin{array}{l} \\ \mathsf{fma}\left(-0.16666666666666666 \cdot \left(x \cdot x\right), \pi \cdot \pi, 1\right) \end{array} \]
      (FPCore (x tau)
       :precision binary32
       (fma (* -0.16666666666666666 (* x x)) (* PI PI) 1.0))
      float code(float x, float tau) {
      	return fmaf((-0.16666666666666666f * (x * x)), (((float) M_PI) * ((float) M_PI)), 1.0f);
      }
      
      function code(x, tau)
      	return fma(Float32(Float32(-0.16666666666666666) * Float32(x * x)), Float32(Float32(pi) * Float32(pi)), Float32(1.0))
      end
      
      \begin{array}{l}
      
      \\
      \mathsf{fma}\left(-0.16666666666666666 \cdot \left(x \cdot x\right), \pi \cdot \pi, 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. 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)} \]
      3. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto {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) + \color{blue}{1} \]
        2. *-commutativeN/A

          \[\leadsto \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 \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}, \color{blue}{{x}^{2}}, 1\right) \]
      4. Applied rewrites78.2%

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left({\mathsf{PI}\left(\right)}^{2} \cdot {x}^{2}, \frac{-1}{6}, 1\right) \]
        5. unpow-prod-downN/A

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

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

          \[\leadsto \mathsf{fma}\left({\left(\pi \cdot x\right)}^{2}, \frac{-1}{6}, 1\right) \]
        8. lift-pow.f3264.3

          \[\leadsto \mathsf{fma}\left({\left(\pi \cdot x\right)}^{2}, -0.16666666666666666, 1\right) \]
      7. Applied rewrites64.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\frac{-1}{6} \cdot \left(x \cdot x\right), \pi \cdot \mathsf{PI}\left(\right), 1\right) \]
        16. lift-PI.f3264.3

          \[\leadsto \mathsf{fma}\left(-0.16666666666666666 \cdot \left(x \cdot x\right), \pi \cdot \pi, 1\right) \]
      9. Applied rewrites64.3%

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

      Alternative 14: 64.3% accurate, 2.6× speedup?

      \[\begin{array}{l} \\ \mathsf{fma}\left({\left(\pi \cdot x\right)}^{2}, -0.16666666666666666, 1\right) \end{array} \]
      (FPCore (x tau)
       :precision binary32
       (fma (pow (* PI x) 2.0) -0.16666666666666666 1.0))
      float code(float x, float tau) {
      	return fmaf(powf((((float) M_PI) * x), 2.0f), -0.16666666666666666f, 1.0f);
      }
      
      function code(x, tau)
      	return fma((Float32(Float32(pi) * x) ^ Float32(2.0)), Float32(-0.16666666666666666), Float32(1.0))
      end
      
      \begin{array}{l}
      
      \\
      \mathsf{fma}\left({\left(\pi \cdot x\right)}^{2}, -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. 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)} \]
      3. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto {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) + \color{blue}{1} \]
        2. *-commutativeN/A

          \[\leadsto \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 \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}, \color{blue}{{x}^{2}}, 1\right) \]
      4. Applied rewrites78.2%

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left({\mathsf{PI}\left(\right)}^{2} \cdot {x}^{2}, \frac{-1}{6}, 1\right) \]
        5. unpow-prod-downN/A

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

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

          \[\leadsto \mathsf{fma}\left({\left(\pi \cdot x\right)}^{2}, \frac{-1}{6}, 1\right) \]
        8. lift-pow.f3264.3

          \[\leadsto \mathsf{fma}\left({\left(\pi \cdot x\right)}^{2}, -0.16666666666666666, 1\right) \]
      7. Applied rewrites64.3%

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

      Alternative 15: 63.3% accurate, 21.0× speedup?

      \[\begin{array}{l} \\ 1 \end{array} \]
      (FPCore (x tau) :precision binary32 1.0)
      float code(float x, float tau) {
      	return 1.0f;
      }
      
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(4) function code(x, tau)
      use fmin_fmax_functions
          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. Taylor expanded in x around 0

        \[\leadsto \color{blue}{1} \]
      3. Step-by-step derivation
        1. Applied rewrites63.3%

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

        Reproduce

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