Lanczos kernel

Percentage Accurate: 97.9% → 97.7%
Time: 16.0s
Alternatives: 22
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 22 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.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(\pi \cdot tau\right)\\ \left(\frac{1}{t\_1} \cdot \sin t\_1\right) \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))))
   (* (* (/ 1.0 t_1) (sin t_1)) (/ (sin (* x PI)) (* x PI)))))
float code(float x, float tau) {
	float t_1 = x * (((float) M_PI) * tau);
	return ((1.0f / t_1) * sinf(t_1)) * (sinf((x * ((float) M_PI))) / (x * ((float) M_PI)));
}
function code(x, tau)
	t_1 = Float32(x * Float32(Float32(pi) * tau))
	return Float32(Float32(Float32(Float32(1.0) / t_1) * sin(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 = ((single(1.0) / t_1) * sin(t_1)) * (sin((x * single(pi))) / (x * single(pi)));
end
\begin{array}{l}

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

    \[\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. clear-numN/A

      \[\leadsto \color{blue}{\frac{1}{\frac{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau}{\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)} \]
    2. associate-/r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 97.9% accurate, 1.0× speedup?

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

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

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

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

Alternative 3: 97.7% accurate, 1.0× speedup?

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

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

    \[\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. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 97.6% accurate, 1.0× speedup?

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

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

    \[\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. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 85.2% accurate, 1.6× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 84.5% accurate, 2.1× speedup?

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

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

    \[\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. clear-numN/A

      \[\leadsto \color{blue}{\frac{1}{\frac{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau}{\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)} \]
    2. associate-/r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 84.5% accurate, 2.6× speedup?

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

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

    \[\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. clear-numN/A

      \[\leadsto \color{blue}{\frac{1}{\frac{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau}{\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)} \]
    2. associate-/r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, {\pi}^{4} \cdot \mathsf{fma}\left(\mathsf{fma}\left(tau \cdot tau, tau \cdot tau, 1\right), 0.008333333333333333, \left(tau \cdot tau\right) \cdot 0.027777777777777776\right), -0.16666666666666666 \cdot \left(\pi \cdot \mathsf{fma}\left(tau \cdot tau, \pi, \pi\right)\right)\right), 1\right)} \]
  7. Step-by-step derivation
    1. +-lowering-+.f32N/A

      \[\leadsto \color{blue}{\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left({\mathsf{PI}\left(\right)}^{4} \cdot \left(\left(\left(tau \cdot tau\right) \cdot \left(tau \cdot tau\right) + 1\right) \cdot \frac{1}{120} + \left(tau \cdot tau\right) \cdot \frac{1}{36}\right)\right) + \frac{-1}{6} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(tau \cdot tau\right) \cdot \mathsf{PI}\left(\right) + \mathsf{PI}\left(\right)\right)\right)\right) + 1} \]
  8. Applied egg-rr80.2%

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

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

Alternative 8: 84.5% accurate, 2.7× speedup?

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

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

    \[\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. clear-numN/A

      \[\leadsto \color{blue}{\frac{1}{\frac{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau}{\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)} \]
    2. associate-/r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, {\pi}^{4} \cdot \mathsf{fma}\left(\mathsf{fma}\left(tau \cdot tau, tau \cdot tau, 1\right), 0.008333333333333333, \left(tau \cdot tau\right) \cdot 0.027777777777777776\right), -0.16666666666666666 \cdot \left(\pi \cdot \mathsf{fma}\left(tau \cdot tau, \pi, \pi\right)\right)\right), 1\right)} \]
  7. Step-by-step derivation
    1. associate-*l*N/A

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

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

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

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

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

Alternative 9: 84.5% accurate, 2.7× speedup?

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

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

    \[\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. clear-numN/A

      \[\leadsto \color{blue}{\frac{1}{\frac{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau}{\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)} \]
    2. associate-/r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, {\pi}^{4} \cdot \mathsf{fma}\left(\mathsf{fma}\left(tau \cdot tau, tau \cdot tau, 1\right), 0.008333333333333333, \left(tau \cdot tau\right) \cdot 0.027777777777777776\right), -0.16666666666666666 \cdot \left(\pi \cdot \mathsf{fma}\left(tau \cdot tau, \pi, \pi\right)\right)\right), 1\right)} \]
  7. Step-by-step derivation
    1. associate-*r*N/A

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

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

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

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

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

Alternative 10: 84.5% accurate, 2.7× speedup?

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

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

    \[\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. clear-numN/A

      \[\leadsto \color{blue}{\frac{1}{\frac{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau}{\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)} \]
    2. associate-/r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, {\pi}^{4} \cdot \mathsf{fma}\left(\mathsf{fma}\left(tau \cdot tau, tau \cdot tau, 1\right), 0.008333333333333333, \left(tau \cdot tau\right) \cdot 0.027777777777777776\right), -0.16666666666666666 \cdot \left(\pi \cdot \mathsf{fma}\left(tau \cdot tau, \pi, \pi\right)\right)\right), 1\right)} \]
  7. Step-by-step derivation
    1. +-commutativeN/A

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

      \[\leadsto \mathsf{fma}\left(x \cdot x, \frac{-1}{6} \cdot \color{blue}{\left(\left(\left(tau \cdot tau\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right) + \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)} + \left(x \cdot x\right) \cdot \left({\mathsf{PI}\left(\right)}^{4} \cdot \left(\left(\left(tau \cdot tau\right) \cdot \left(tau \cdot tau\right) + 1\right) \cdot \frac{1}{120} + \left(tau \cdot tau\right) \cdot \frac{1}{36}\right)\right), 1\right) \]
    3. distribute-rgt-inN/A

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(x \cdot x, \left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\frac{-1}{6} \cdot \left(tau \cdot tau\right)\right)} + \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{-1}{6}\right) + \left(x \cdot x\right) \cdot \left({\mathsf{PI}\left(\right)}^{4} \cdot \left(\left(\left(tau \cdot tau\right) \cdot \left(tau \cdot tau\right) + 1\right) \cdot \frac{1}{120} + \left(tau \cdot tau\right) \cdot \frac{1}{36}\right)\right), 1\right) \]
    9. distribute-lft-inN/A

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

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

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

Alternative 11: 84.5% accurate, 2.7× speedup?

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

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

    \[\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. clear-numN/A

      \[\leadsto \color{blue}{\frac{1}{\frac{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau}{\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)} \]
    2. associate-/r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, {\pi}^{4} \cdot \mathsf{fma}\left(\mathsf{fma}\left(tau \cdot tau, tau \cdot tau, 1\right), 0.008333333333333333, \left(tau \cdot tau\right) \cdot 0.027777777777777776\right), -0.16666666666666666 \cdot \left(\pi \cdot \mathsf{fma}\left(tau \cdot tau, \pi, \pi\right)\right)\right), 1\right)} \]
  7. Step-by-step derivation
    1. +-commutativeN/A

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

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

Alternative 12: 79.9% accurate, 2.9× speedup?

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

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

    \[\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. clear-numN/A

      \[\leadsto \color{blue}{\frac{1}{\frac{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau}{\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)} \]
    2. associate-/r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 13: 79.9% accurate, 3.0× speedup?

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

      \[\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. clear-numN/A

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau}{\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)} \]
      2. associate-/r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \color{blue}{\mathsf{fma}\left(tau, tau \cdot \frac{1}{36}, \frac{1}{120}\right)}, \mathsf{fma}\left(x \cdot x, \mathsf{PI}\left(\right) \cdot \left(\mathsf{fma}\left(\mathsf{PI}\left(\right), tau \cdot tau, \mathsf{PI}\left(\right)\right) \cdot \frac{-1}{6}\right), 1\right)\right) \]
      6. *-lowering-*.f3276.9

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

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

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

    Alternative 14: 78.8% accurate, 3.5× speedup?

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

      \[\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. clear-numN/A

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau}{\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)} \]
      2. associate-/r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 15: 78.7% accurate, 7.8× speedup?

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

        \[\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. accelerator-lowering-fma.f32N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot x, \left(\pi \cdot \pi\right) \cdot \mathsf{fma}\left(-0.16666666666666666, tau \cdot tau, -0.16666666666666666\right), 1\right)} \]
      6. Step-by-step derivation
        1. distribute-lft-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 16: 78.7% accurate, 7.8× speedup?

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

        \[\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. accelerator-lowering-fma.f32N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 17: 69.8% accurate, 8.1× speedup?

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

        \[\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. accelerator-lowering-fma.f32N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 18: 69.8% accurate, 8.1× speedup?

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

        \[\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. accelerator-lowering-fma.f32N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 19: 64.6% accurate, 11.7× speedup?

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

        \[\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. accelerator-lowering-fma.f32N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 20: 64.6% accurate, 11.7× speedup?

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

          \[\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. accelerator-lowering-fma.f32N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 21: 64.6% accurate, 11.7× speedup?

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

            \[\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. accelerator-lowering-fma.f32N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 22: 63.6% 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.5%

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

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

              Reproduce

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