Lanczos kernel

Percentage Accurate: 97.9% → 98.8%
Time: 5.2s
Alternatives: 8
Speedup: N/A×

Specification

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

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

Sampling outcomes in binary32 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 8 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: 98.8% accurate, N/A× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := {\left(tau \cdot tau\right)}^{2}\\ t_2 := {\left(\pi \cdot \pi\right)}^{2}\\ t_3 := \left(x \cdot \pi\right) \cdot tau\\ t_4 := {\left(\pi \cdot \pi\right)}^{3}\\ t_5 := \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi}\\ \mathbf{if}\;\frac{\sin t\_3}{t\_3} \cdot t\_5 \leq 0.9639999866485596:\\ \;\;\;\;\frac{\sin \log \left({\left(e^{\pi}\right)}^{\left(tau \cdot x\right)}\right)}{t\_3} \cdot t\_5\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-0.16666666666666666 \cdot \left(tau \cdot tau\right), \pi \cdot \pi, \mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333 \cdot t\_1, t\_2, \mathsf{fma}\left(t\_2, 0.008333333333333333, \mathsf{fma}\left(0.027777777777777776 \cdot \left(tau \cdot tau\right), t\_2, \mathsf{fma}\left(-0.001388888888888889 \cdot \left(tau \cdot tau\right), t\_4, \mathsf{fma}\left(-0.001388888888888889 \cdot t\_1, t\_4, \mathsf{fma}\left({\left(\left(tau \cdot tau\right) \cdot tau\right)}^{2} \cdot t\_4, -0.0001984126984126984, -0.0001984126984126984 \cdot t\_4\right)\right)\right) \cdot \left(x \cdot x\right)\right)\right)\right), x \cdot x, \left(\pi \cdot \pi\right) \cdot -0.16666666666666666\right)\right), x \cdot x, 1\right)\\ \end{array} \end{array} \]
(FPCore (x tau)
 :precision binary32
 (let* ((t_1 (pow (* tau tau) 2.0))
        (t_2 (pow (* PI PI) 2.0))
        (t_3 (* (* x PI) tau))
        (t_4 (pow (* PI PI) 3.0))
        (t_5 (/ (sin (* x PI)) (* x PI))))
   (if (<= (* (/ (sin t_3) t_3) t_5) 0.9639999866485596)
     (* (/ (sin (log (pow (exp PI) (* tau x)))) t_3) t_5)
     (fma
      (fma
       (* -0.16666666666666666 (* tau tau))
       (* PI PI)
       (fma
        (fma
         (* 0.008333333333333333 t_1)
         t_2
         (fma
          t_2
          0.008333333333333333
          (fma
           (* 0.027777777777777776 (* tau tau))
           t_2
           (*
            (fma
             (* -0.001388888888888889 (* tau tau))
             t_4
             (fma
              (* -0.001388888888888889 t_1)
              t_4
              (fma
               (* (pow (* (* tau tau) tau) 2.0) t_4)
               -0.0001984126984126984
               (* -0.0001984126984126984 t_4))))
            (* x x)))))
        (* x x)
        (* (* PI PI) -0.16666666666666666)))
      (* x x)
      1.0))))
float code(float x, float tau) {
	float t_1 = powf((tau * tau), 2.0f);
	float t_2 = powf((((float) M_PI) * ((float) M_PI)), 2.0f);
	float t_3 = (x * ((float) M_PI)) * tau;
	float t_4 = powf((((float) M_PI) * ((float) M_PI)), 3.0f);
	float t_5 = sinf((x * ((float) M_PI))) / (x * ((float) M_PI));
	float tmp;
	if (((sinf(t_3) / t_3) * t_5) <= 0.9639999866485596f) {
		tmp = (sinf(logf(powf(expf(((float) M_PI)), (tau * x)))) / t_3) * t_5;
	} else {
		tmp = fmaf(fmaf((-0.16666666666666666f * (tau * tau)), (((float) M_PI) * ((float) M_PI)), fmaf(fmaf((0.008333333333333333f * t_1), t_2, fmaf(t_2, 0.008333333333333333f, fmaf((0.027777777777777776f * (tau * tau)), t_2, (fmaf((-0.001388888888888889f * (tau * tau)), t_4, fmaf((-0.001388888888888889f * t_1), t_4, fmaf((powf(((tau * tau) * tau), 2.0f) * t_4), -0.0001984126984126984f, (-0.0001984126984126984f * t_4)))) * (x * x))))), (x * x), ((((float) M_PI) * ((float) M_PI)) * -0.16666666666666666f))), (x * x), 1.0f);
	}
	return tmp;
}
function code(x, tau)
	t_1 = Float32(tau * tau) ^ Float32(2.0)
	t_2 = Float32(Float32(pi) * Float32(pi)) ^ Float32(2.0)
	t_3 = Float32(Float32(x * Float32(pi)) * tau)
	t_4 = Float32(Float32(pi) * Float32(pi)) ^ Float32(3.0)
	t_5 = Float32(sin(Float32(x * Float32(pi))) / Float32(x * Float32(pi)))
	tmp = Float32(0.0)
	if (Float32(Float32(sin(t_3) / t_3) * t_5) <= Float32(0.9639999866485596))
		tmp = Float32(Float32(sin(log((exp(Float32(pi)) ^ Float32(tau * x)))) / t_3) * t_5);
	else
		tmp = fma(fma(Float32(Float32(-0.16666666666666666) * Float32(tau * tau)), Float32(Float32(pi) * Float32(pi)), fma(fma(Float32(Float32(0.008333333333333333) * t_1), t_2, fma(t_2, Float32(0.008333333333333333), fma(Float32(Float32(0.027777777777777776) * Float32(tau * tau)), t_2, Float32(fma(Float32(Float32(-0.001388888888888889) * Float32(tau * tau)), t_4, fma(Float32(Float32(-0.001388888888888889) * t_1), t_4, fma(Float32((Float32(Float32(tau * tau) * tau) ^ Float32(2.0)) * t_4), Float32(-0.0001984126984126984), Float32(Float32(-0.0001984126984126984) * t_4)))) * Float32(x * x))))), Float32(x * x), Float32(Float32(Float32(pi) * Float32(pi)) * Float32(-0.16666666666666666)))), Float32(x * x), Float32(1.0));
	end
	return tmp
end
\begin{array}{l}

\\
\begin{array}{l}
t_1 := {\left(tau \cdot tau\right)}^{2}\\
t_2 := {\left(\pi \cdot \pi\right)}^{2}\\
t_3 := \left(x \cdot \pi\right) \cdot tau\\
t_4 := {\left(\pi \cdot \pi\right)}^{3}\\
t_5 := \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi}\\
\mathbf{if}\;\frac{\sin t\_3}{t\_3} \cdot t\_5 \leq 0.9639999866485596:\\
\;\;\;\;\frac{\sin \log \left({\left(e^{\pi}\right)}^{\left(tau \cdot x\right)}\right)}{t\_3} \cdot t\_5\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-0.16666666666666666 \cdot \left(tau \cdot tau\right), \pi \cdot \pi, \mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333 \cdot t\_1, t\_2, \mathsf{fma}\left(t\_2, 0.008333333333333333, \mathsf{fma}\left(0.027777777777777776 \cdot \left(tau \cdot tau\right), t\_2, \mathsf{fma}\left(-0.001388888888888889 \cdot \left(tau \cdot tau\right), t\_4, \mathsf{fma}\left(-0.001388888888888889 \cdot t\_1, t\_4, \mathsf{fma}\left({\left(\left(tau \cdot tau\right) \cdot tau\right)}^{2} \cdot t\_4, -0.0001984126984126984, -0.0001984126984126984 \cdot t\_4\right)\right)\right) \cdot \left(x \cdot x\right)\right)\right)\right), x \cdot x, \left(\pi \cdot \pi\right) \cdot -0.16666666666666666\right)\right), x \cdot x, 1\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f32 (/.f32 (sin.f32 (*.f32 (*.f32 x (PI.f32)) tau)) (*.f32 (*.f32 x (PI.f32)) tau)) (/.f32 (sin.f32 (*.f32 x (PI.f32))) (*.f32 x (PI.f32)))) < 0.963999987

    1. Initial program 96.1%

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

        \[\leadsto \frac{\sin \color{blue}{\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. lift-PI.f32N/A

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

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

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

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

        \[\leadsto \frac{\sin \left(\left(tau \cdot x\right) \cdot \color{blue}{\log \left(e^{\mathsf{PI}\left(\right)}\right)}\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi} \]
      7. log-pow-revN/A

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

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

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

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

        \[\leadsto \frac{\sin \log \left({\left(e^{\color{blue}{\pi}}\right)}^{\left(tau \cdot x\right)}\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi} \]
      12. lower-*.f3295.1

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

      \[\leadsto \frac{\sin \color{blue}{\log \left({\left(e^{\pi}\right)}^{\left(tau \cdot x\right)}\right)}}{\left(x \cdot \pi\right) \cdot tau} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi} \]

    if 0.963999987 < (*.f32 (/.f32 (sin.f32 (*.f32 (*.f32 x (PI.f32)) tau)) (*.f32 (*.f32 x (PI.f32)) tau)) (/.f32 (sin.f32 (*.f32 x (PI.f32))) (*.f32 x (PI.f32))))

    1. Initial program 98.4%

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(-0.16666666666666666 \cdot \left(tau \cdot tau\right), \pi \cdot \pi, \mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333 \cdot {\left(tau \cdot tau\right)}^{2}, {\left(\pi \cdot \pi\right)}^{2}, \mathsf{fma}\left({\left(\pi \cdot \pi\right)}^{2}, 0.008333333333333333, \mathsf{fma}\left(0.027777777777777776 \cdot \left(tau \cdot tau\right), {\left(\pi \cdot \pi\right)}^{2}, \mathsf{fma}\left(-0.001388888888888889 \cdot \left(tau \cdot tau\right), {\left(\pi \cdot \pi\right)}^{3}, \mathsf{fma}\left(-0.001388888888888889 \cdot {\left(tau \cdot tau\right)}^{2}, {\left(\pi \cdot \pi\right)}^{3}, \mathsf{fma}\left({\left(\left(tau \cdot tau\right) \cdot tau\right)}^{2} \cdot {\left(\pi \cdot \pi\right)}^{3}, -0.0001984126984126984, -0.0001984126984126984 \cdot {\left(\pi \cdot \pi\right)}^{3}\right)\right)\right) \cdot \left(x \cdot x\right)\right)\right)\right), x \cdot x, \left(\pi \cdot \pi\right) \cdot -0.16666666666666666\right)\right), x \cdot x, 1\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 2: 98.1% accurate, N/A× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := {\left(tau \cdot tau\right)}^{2}\\ t_2 := {\left(\pi \cdot \pi\right)}^{2}\\ t_3 := \left(x \cdot \pi\right) \cdot tau\\ t_4 := {\left(\pi \cdot \pi\right)}^{3}\\ \mathbf{if}\;\frac{\sin t\_3}{t\_3} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi} \leq 0.9100000262260437:\\ \;\;\;\;\left(\frac{\sin \left(\left(\pi \cdot x\right) \cdot tau\right)}{tau} \cdot \frac{\sin \left(\frac{\left(\left(\pi \cdot \pi\right) \cdot \pi\right) \cdot \left(1 - \left(\left(x \cdot x\right) \cdot x\right) \cdot -1\right)}{\mathsf{fma}\left({x}^{1}, {x}^{1}, 1\right) \cdot \left(\pi \cdot \pi\right) - x \cdot \left(\pi \cdot \pi\right)}\right)}{{\left(x \cdot \pi\right)}^{2}}\right) \cdot -1\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-0.16666666666666666 \cdot \left(tau \cdot tau\right), \pi \cdot \pi, \mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333 \cdot t\_1, t\_2, \mathsf{fma}\left(t\_2, 0.008333333333333333, \mathsf{fma}\left(0.027777777777777776 \cdot \left(tau \cdot tau\right), t\_2, \mathsf{fma}\left(-0.001388888888888889 \cdot \left(tau \cdot tau\right), t\_4, \mathsf{fma}\left(-0.001388888888888889 \cdot t\_1, t\_4, \mathsf{fma}\left({\left(\left(tau \cdot tau\right) \cdot tau\right)}^{2} \cdot t\_4, -0.0001984126984126984, -0.0001984126984126984 \cdot t\_4\right)\right)\right) \cdot \left(x \cdot x\right)\right)\right)\right), x \cdot x, \left(\pi \cdot \pi\right) \cdot -0.16666666666666666\right)\right), x \cdot x, 1\right)\\ \end{array} \end{array} \]
(FPCore (x tau)
 :precision binary32
 (let* ((t_1 (pow (* tau tau) 2.0))
        (t_2 (pow (* PI PI) 2.0))
        (t_3 (* (* x PI) tau))
        (t_4 (pow (* PI PI) 3.0)))
   (if (<=
        (* (/ (sin t_3) t_3) (/ (sin (* x PI)) (* x PI)))
        0.9100000262260437)
     (*
      (*
       (/ (sin (* (* PI x) tau)) tau)
       (/
        (sin
         (/
          (* (* (* PI PI) PI) (- 1.0 (* (* (* x x) x) -1.0)))
          (- (* (fma (pow x 1.0) (pow x 1.0) 1.0) (* PI PI)) (* x (* PI PI)))))
        (pow (* x PI) 2.0)))
      -1.0)
     (fma
      (fma
       (* -0.16666666666666666 (* tau tau))
       (* PI PI)
       (fma
        (fma
         (* 0.008333333333333333 t_1)
         t_2
         (fma
          t_2
          0.008333333333333333
          (fma
           (* 0.027777777777777776 (* tau tau))
           t_2
           (*
            (fma
             (* -0.001388888888888889 (* tau tau))
             t_4
             (fma
              (* -0.001388888888888889 t_1)
              t_4
              (fma
               (* (pow (* (* tau tau) tau) 2.0) t_4)
               -0.0001984126984126984
               (* -0.0001984126984126984 t_4))))
            (* x x)))))
        (* x x)
        (* (* PI PI) -0.16666666666666666)))
      (* x x)
      1.0))))
float code(float x, float tau) {
	float t_1 = powf((tau * tau), 2.0f);
	float t_2 = powf((((float) M_PI) * ((float) M_PI)), 2.0f);
	float t_3 = (x * ((float) M_PI)) * tau;
	float t_4 = powf((((float) M_PI) * ((float) M_PI)), 3.0f);
	float tmp;
	if (((sinf(t_3) / t_3) * (sinf((x * ((float) M_PI))) / (x * ((float) M_PI)))) <= 0.9100000262260437f) {
		tmp = ((sinf(((((float) M_PI) * x) * tau)) / tau) * (sinf(((((((float) M_PI) * ((float) M_PI)) * ((float) M_PI)) * (1.0f - (((x * x) * x) * -1.0f))) / ((fmaf(powf(x, 1.0f), powf(x, 1.0f), 1.0f) * (((float) M_PI) * ((float) M_PI))) - (x * (((float) M_PI) * ((float) M_PI)))))) / powf((x * ((float) M_PI)), 2.0f))) * -1.0f;
	} else {
		tmp = fmaf(fmaf((-0.16666666666666666f * (tau * tau)), (((float) M_PI) * ((float) M_PI)), fmaf(fmaf((0.008333333333333333f * t_1), t_2, fmaf(t_2, 0.008333333333333333f, fmaf((0.027777777777777776f * (tau * tau)), t_2, (fmaf((-0.001388888888888889f * (tau * tau)), t_4, fmaf((-0.001388888888888889f * t_1), t_4, fmaf((powf(((tau * tau) * tau), 2.0f) * t_4), -0.0001984126984126984f, (-0.0001984126984126984f * t_4)))) * (x * x))))), (x * x), ((((float) M_PI) * ((float) M_PI)) * -0.16666666666666666f))), (x * x), 1.0f);
	}
	return tmp;
}
function code(x, tau)
	t_1 = Float32(tau * tau) ^ Float32(2.0)
	t_2 = Float32(Float32(pi) * Float32(pi)) ^ Float32(2.0)
	t_3 = Float32(Float32(x * Float32(pi)) * tau)
	t_4 = Float32(Float32(pi) * Float32(pi)) ^ Float32(3.0)
	tmp = Float32(0.0)
	if (Float32(Float32(sin(t_3) / t_3) * Float32(sin(Float32(x * Float32(pi))) / Float32(x * Float32(pi)))) <= Float32(0.9100000262260437))
		tmp = Float32(Float32(Float32(sin(Float32(Float32(Float32(pi) * x) * tau)) / tau) * Float32(sin(Float32(Float32(Float32(Float32(Float32(pi) * Float32(pi)) * Float32(pi)) * Float32(Float32(1.0) - Float32(Float32(Float32(x * x) * x) * Float32(-1.0)))) / Float32(Float32(fma((x ^ Float32(1.0)), (x ^ Float32(1.0)), Float32(1.0)) * Float32(Float32(pi) * Float32(pi))) - Float32(x * Float32(Float32(pi) * Float32(pi)))))) / (Float32(x * Float32(pi)) ^ Float32(2.0)))) * Float32(-1.0));
	else
		tmp = fma(fma(Float32(Float32(-0.16666666666666666) * Float32(tau * tau)), Float32(Float32(pi) * Float32(pi)), fma(fma(Float32(Float32(0.008333333333333333) * t_1), t_2, fma(t_2, Float32(0.008333333333333333), fma(Float32(Float32(0.027777777777777776) * Float32(tau * tau)), t_2, Float32(fma(Float32(Float32(-0.001388888888888889) * Float32(tau * tau)), t_4, fma(Float32(Float32(-0.001388888888888889) * t_1), t_4, fma(Float32((Float32(Float32(tau * tau) * tau) ^ Float32(2.0)) * t_4), Float32(-0.0001984126984126984), Float32(Float32(-0.0001984126984126984) * t_4)))) * Float32(x * x))))), Float32(x * x), Float32(Float32(Float32(pi) * Float32(pi)) * Float32(-0.16666666666666666)))), Float32(x * x), Float32(1.0));
	end
	return tmp
end
\begin{array}{l}

\\
\begin{array}{l}
t_1 := {\left(tau \cdot tau\right)}^{2}\\
t_2 := {\left(\pi \cdot \pi\right)}^{2}\\
t_3 := \left(x \cdot \pi\right) \cdot tau\\
t_4 := {\left(\pi \cdot \pi\right)}^{3}\\
\mathbf{if}\;\frac{\sin t\_3}{t\_3} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi} \leq 0.9100000262260437:\\
\;\;\;\;\left(\frac{\sin \left(\left(\pi \cdot x\right) \cdot tau\right)}{tau} \cdot \frac{\sin \left(\frac{\left(\left(\pi \cdot \pi\right) \cdot \pi\right) \cdot \left(1 - \left(\left(x \cdot x\right) \cdot x\right) \cdot -1\right)}{\mathsf{fma}\left({x}^{1}, {x}^{1}, 1\right) \cdot \left(\pi \cdot \pi\right) - x \cdot \left(\pi \cdot \pi\right)}\right)}{{\left(x \cdot \pi\right)}^{2}}\right) \cdot -1\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-0.16666666666666666 \cdot \left(tau \cdot tau\right), \pi \cdot \pi, \mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333 \cdot t\_1, t\_2, \mathsf{fma}\left(t\_2, 0.008333333333333333, \mathsf{fma}\left(0.027777777777777776 \cdot \left(tau \cdot tau\right), t\_2, \mathsf{fma}\left(-0.001388888888888889 \cdot \left(tau \cdot tau\right), t\_4, \mathsf{fma}\left(-0.001388888888888889 \cdot t\_1, t\_4, \mathsf{fma}\left({\left(\left(tau \cdot tau\right) \cdot tau\right)}^{2} \cdot t\_4, -0.0001984126984126984, -0.0001984126984126984 \cdot t\_4\right)\right)\right) \cdot \left(x \cdot x\right)\right)\right)\right), x \cdot x, \left(\pi \cdot \pi\right) \cdot -0.16666666666666666\right)\right), x \cdot x, 1\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f32 (/.f32 (sin.f32 (*.f32 (*.f32 x (PI.f32)) tau)) (*.f32 (*.f32 x (PI.f32)) tau)) (/.f32 (sin.f32 (*.f32 x (PI.f32))) (*.f32 x (PI.f32)))) < 0.910000026

    1. Initial program 95.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sin \left(\left(x \cdot \pi\right) \cdot tau\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \frac{\sin \left(\mathsf{fma}\left(\pi, x, \pi\right)\right)}{-\color{blue}{\mathsf{PI}\left(\right) \cdot x}} \]
      18. lift-PI.f3293.4

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\frac{\sin \left(\left(\pi \cdot x\right) \cdot tau\right)}{tau} \cdot \frac{\sin \left(\frac{{\mathsf{PI}\left(\right)}^{3} \cdot \left(1 + -1 \cdot \left({x}^{3} \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right)}{\left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2} + {\mathsf{PI}\left(\right)}^{2}\right) - x \cdot {\mathsf{PI}\left(\right)}^{2}}\right)}{{x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}}\right) \cdot -1 \]
    10. Applied rewrites91.3%

      \[\leadsto \left(\frac{\sin \left(\left(\pi \cdot x\right) \cdot tau\right)}{tau} \cdot \frac{\sin \left(\frac{\left(\left(\pi \cdot \pi\right) \cdot \pi\right) \cdot \left(1 + -1 \cdot \left(\left(\left(x \cdot x\right) \cdot x\right) \cdot -1\right)\right)}{\mathsf{fma}\left({x}^{1}, {x}^{1}, 1\right) \cdot \left(\pi \cdot \pi\right) - x \cdot \left(\pi \cdot \pi\right)}\right)}{{\left(x \cdot \pi\right)}^{2}}\right) \cdot -1 \]

    if 0.910000026 < (*.f32 (/.f32 (sin.f32 (*.f32 (*.f32 x (PI.f32)) tau)) (*.f32 (*.f32 x (PI.f32)) tau)) (/.f32 (sin.f32 (*.f32 x (PI.f32))) (*.f32 x (PI.f32))))

    1. Initial program 98.4%

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(-0.16666666666666666 \cdot \left(tau \cdot tau\right), \pi \cdot \pi, \mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333 \cdot {\left(tau \cdot tau\right)}^{2}, {\left(\pi \cdot \pi\right)}^{2}, \mathsf{fma}\left({\left(\pi \cdot \pi\right)}^{2}, 0.008333333333333333, \mathsf{fma}\left(0.027777777777777776 \cdot \left(tau \cdot tau\right), {\left(\pi \cdot \pi\right)}^{2}, \mathsf{fma}\left(-0.001388888888888889 \cdot \left(tau \cdot tau\right), {\left(\pi \cdot \pi\right)}^{3}, \mathsf{fma}\left(-0.001388888888888889 \cdot {\left(tau \cdot tau\right)}^{2}, {\left(\pi \cdot \pi\right)}^{3}, \mathsf{fma}\left({\left(\left(tau \cdot tau\right) \cdot tau\right)}^{2} \cdot {\left(\pi \cdot \pi\right)}^{3}, -0.0001984126984126984, -0.0001984126984126984 \cdot {\left(\pi \cdot \pi\right)}^{3}\right)\right)\right) \cdot \left(x \cdot x\right)\right)\right)\right), x \cdot x, \left(\pi \cdot \pi\right) \cdot -0.16666666666666666\right)\right), x \cdot x, 1\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\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} \leq 0.9100000262260437:\\ \;\;\;\;\left(\frac{\sin \left(\left(\pi \cdot x\right) \cdot tau\right)}{tau} \cdot \frac{\sin \left(\frac{\left(\left(\pi \cdot \pi\right) \cdot \pi\right) \cdot \left(1 - \left(\left(x \cdot x\right) \cdot x\right) \cdot -1\right)}{\mathsf{fma}\left({x}^{1}, {x}^{1}, 1\right) \cdot \left(\pi \cdot \pi\right) - x \cdot \left(\pi \cdot \pi\right)}\right)}{{\left(x \cdot \pi\right)}^{2}}\right) \cdot -1\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-0.16666666666666666 \cdot \left(tau \cdot tau\right), \pi \cdot \pi, \mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333 \cdot {\left(tau \cdot tau\right)}^{2}, {\left(\pi \cdot \pi\right)}^{2}, \mathsf{fma}\left({\left(\pi \cdot \pi\right)}^{2}, 0.008333333333333333, \mathsf{fma}\left(0.027777777777777776 \cdot \left(tau \cdot tau\right), {\left(\pi \cdot \pi\right)}^{2}, \mathsf{fma}\left(-0.001388888888888889 \cdot \left(tau \cdot tau\right), {\left(\pi \cdot \pi\right)}^{3}, \mathsf{fma}\left(-0.001388888888888889 \cdot {\left(tau \cdot tau\right)}^{2}, {\left(\pi \cdot \pi\right)}^{3}, \mathsf{fma}\left({\left(\left(tau \cdot tau\right) \cdot tau\right)}^{2} \cdot {\left(\pi \cdot \pi\right)}^{3}, -0.0001984126984126984, -0.0001984126984126984 \cdot {\left(\pi \cdot \pi\right)}^{3}\right)\right)\right) \cdot \left(x \cdot x\right)\right)\right)\right), x \cdot x, \left(\pi \cdot \pi\right) \cdot -0.16666666666666666\right)\right), x \cdot x, 1\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 97.9% accurate, N/A× speedup?

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

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

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

Alternative 4: 97.3% accurate, N/A× speedup?

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

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

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

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

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

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

      \[\leadsto \frac{\sin \color{blue}{\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} \]
    5. lift-PI.f32N/A

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

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

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

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

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

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

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

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

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

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

Alternative 5: 97.2% accurate, N/A× speedup?

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

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

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

      \[\leadsto \frac{\sin \color{blue}{\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. lift-PI.f32N/A

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

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

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

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

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

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

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

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

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

Alternative 6: 77.4% accurate, N/A× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 77.0% accurate, N/A× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \left(\frac{\sin \left(\left(\pi \cdot x\right) \cdot tau\right)}{tau} \cdot \frac{\sin \left(\frac{{\mathsf{PI}\left(\right)}^{3} \cdot \left(1 + -1 \cdot \left({x}^{3} \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right)}{\left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2} + {\mathsf{PI}\left(\right)}^{2}\right) - x \cdot {\mathsf{PI}\left(\right)}^{2}}\right)}{{x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}}\right) \cdot -1 \]
  10. Applied rewrites75.9%

    \[\leadsto \left(\frac{\sin \left(\left(\pi \cdot x\right) \cdot tau\right)}{tau} \cdot \frac{\sin \left(\frac{\left(\left(\pi \cdot \pi\right) \cdot \pi\right) \cdot \left(1 + -1 \cdot \left(\left(\left(x \cdot x\right) \cdot x\right) \cdot -1\right)\right)}{\mathsf{fma}\left({x}^{1}, {x}^{1}, 1\right) \cdot \left(\pi \cdot \pi\right) - x \cdot \left(\pi \cdot \pi\right)}\right)}{{\left(x \cdot \pi\right)}^{2}}\right) \cdot -1 \]
  11. Final simplification75.9%

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

Alternative 8: 76.6% accurate, N/A× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \frac{\sin \left(tau \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{{\mathsf{PI}\left(\right)}^{3} \cdot \left(1 + -1 \cdot \left({x}^{3} \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right)}{\left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2} + {\mathsf{PI}\left(\right)}^{2}\right) - x \cdot {\mathsf{PI}\left(\right)}^{2}}\right)}{tau \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)} \cdot -1 \]
  10. Applied rewrites75.7%

    \[\leadsto \left(\frac{\sin \left(\mathsf{fma}\left(tau \cdot x, \pi, \pi\right)\right)}{-tau} \cdot \frac{\sin \left(\frac{\left(\left(\pi \cdot \pi\right) \cdot \pi\right) \cdot \left(1 + -1 \cdot \left(\left(\left(x \cdot x\right) \cdot x\right) \cdot -1\right)\right)}{\mathsf{fma}\left({x}^{1}, {x}^{1}, 1\right) \cdot \left(\pi \cdot \pi\right) - x \cdot \left(\pi \cdot \pi\right)}\right)}{{\left(x \cdot \pi\right)}^{2}}\right) \cdot -1 \]
  11. Final simplification75.7%

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

Reproduce

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