Lanczos kernel

Percentage Accurate: 98.0% → 97.8%
Time: 14.3s
Alternatives: 20
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 20 alternatives:

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

Initial Program: 98.0% accurate, 1.0× speedup?

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

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

Alternative 1: 97.8% accurate, 1.0× speedup?

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

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

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

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

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\sin \left(x \cdot \mathsf{PI}\left(\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    4. sin-lowering-sin.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\left(x \cdot \mathsf{PI}\left(\right)\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    5. *-lowering-*.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI}\left(\right)\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    6. PI-lowering-PI.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    7. PI-lowering-PI.f3297.2%

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), x\right)\right) \]
  4. Applied egg-rr97.2%

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

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

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

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

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

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

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

Alternative 2: 98.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := tau \cdot \left(x \cdot \pi\right)\\
\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.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. Final simplification97.3%

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

Alternative 3: 97.4% accurate, 1.0× speedup?

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

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

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

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

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\sin \left(x \cdot \mathsf{PI}\left(\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    4. sin-lowering-sin.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\left(x \cdot \mathsf{PI}\left(\right)\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    5. *-lowering-*.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI}\left(\right)\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    6. PI-lowering-PI.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    7. PI-lowering-PI.f3297.2%

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), x\right)\right) \]
  4. Applied egg-rr97.2%

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

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

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

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

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

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

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

Alternative 4: 91.9% 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 \left(1 + x \cdot \left(x \cdot \left(-0.16666666666666666 \cdot \left(\pi \cdot \pi\right) + \left(\left(\pi \cdot \pi\right) \cdot \left(\pi \cdot \pi\right)\right) \cdot \left(\left(x \cdot x\right) \cdot 0.008333333333333333\right)\right)\right)\right) \end{array} \end{array} \]
(FPCore (x tau)
 :precision binary32
 (let* ((t_1 (* tau (* x PI))))
   (*
    (/ (sin t_1) t_1)
    (+
     1.0
     (*
      x
      (*
       x
       (+
        (* -0.16666666666666666 (* PI PI))
        (* (* (* PI PI) (* PI PI)) (* (* x x) 0.008333333333333333)))))))))
float code(float x, float tau) {
	float t_1 = tau * (x * ((float) M_PI));
	return (sinf(t_1) / t_1) * (1.0f + (x * (x * ((-0.16666666666666666f * (((float) M_PI) * ((float) M_PI))) + (((((float) M_PI) * ((float) M_PI)) * (((float) M_PI) * ((float) M_PI))) * ((x * x) * 0.008333333333333333f))))));
}
function code(x, tau)
	t_1 = Float32(tau * Float32(x * Float32(pi)))
	return Float32(Float32(sin(t_1) / t_1) * Float32(Float32(1.0) + Float32(x * Float32(x * Float32(Float32(Float32(-0.16666666666666666) * Float32(Float32(pi) * Float32(pi))) + Float32(Float32(Float32(Float32(pi) * Float32(pi)) * Float32(Float32(pi) * Float32(pi))) * Float32(Float32(x * x) * Float32(0.008333333333333333))))))))
end
function tmp = code(x, tau)
	t_1 = tau * (x * single(pi));
	tmp = (sin(t_1) / t_1) * (single(1.0) + (x * (x * ((single(-0.16666666666666666) * (single(pi) * single(pi))) + (((single(pi) * single(pi)) * (single(pi) * single(pi))) * ((x * x) * single(0.008333333333333333)))))));
end
\begin{array}{l}

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), \left(\frac{1}{x}\right)\right)\right) \]
    9. /-lowering-/.f3296.9%

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), \mathsf{/.f32}\left(1, \color{blue}{x}\right)\right)\right) \]
  4. Applied egg-rr96.9%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(x, \mathsf{+.f32}\left(\left(\frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2}\right), \color{blue}{\left({x}^{2} \cdot \left(\frac{1}{120} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)}\right)\right)\right)\right)\right) \]
  7. Simplified89.6%

    \[\leadsto \frac{\sin \left(\left(x \cdot \pi\right) \cdot tau\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \color{blue}{\left(1 + x \cdot \left(x \cdot \left(-0.16666666666666666 \cdot \left(\pi \cdot \pi\right) + \left(\left(\pi \cdot \pi\right) \cdot \left(\pi \cdot \pi\right)\right) \cdot \left(\left(x \cdot x\right) \cdot 0.008333333333333333\right)\right)\right)\right)} \]
  8. Final simplification89.6%

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

Alternative 5: 85.8% accurate, 1.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{PI}\left(\right)\right), \mathsf{PI}\left(\right)\right)\right)\right)\right)\right) \]
    13. PI-lowering-PI.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{PI.f32}\left(\right)\right), \mathsf{PI}\left(\right)\right)\right)\right)\right)\right) \]
    14. PI-lowering-PI.f3282.7%

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{PI.f32}\left(\right)\right), \mathsf{PI.f32}\left(\right)\right)\right)\right)\right)\right) \]
  5. Simplified82.7%

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

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

Alternative 6: 85.4% accurate, 1.8× speedup?

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

\\
\frac{\sin \left(x \cdot \left(\pi \cdot tau\right)\right)}{x} \cdot \frac{1 + x \cdot \left(x \cdot \left(-0.16666666666666666 \cdot \left(\pi \cdot \pi\right)\right)\right)}{\pi \cdot tau}
\end{array}
Derivation
  1. Initial program 97.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. Taylor expanded in x around 0

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{PI}\left(\right)\right), \mathsf{PI}\left(\right)\right)\right)\right)\right)\right) \]
    13. PI-lowering-PI.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{PI.f32}\left(\right)\right), \mathsf{PI}\left(\right)\right)\right)\right)\right)\right) \]
    14. PI-lowering-PI.f3282.7%

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{PI.f32}\left(\right)\right), \mathsf{PI.f32}\left(\right)\right)\right)\right)\right)\right) \]
  5. Simplified82.7%

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

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

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

      \[\leadsto \frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right) \cdot \left(1 + x \cdot \left(x \cdot \left(\left(\frac{-1}{6} \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)} \]
    4. times-fracN/A

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

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

    \[\leadsto \color{blue}{\frac{\sin \left(x \cdot \left(\pi \cdot tau\right)\right)}{x} \cdot \frac{1 + x \cdot \left(x \cdot \left(\left(\pi \cdot \pi\right) \cdot -0.16666666666666666\right)\right)}{\pi \cdot tau}} \]
  8. Final simplification82.5%

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

Alternative 7: 85.1% accurate, 1.8× speedup?

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

\\
\frac{\sin \left(x \cdot \left(\pi \cdot tau\right)\right)}{tau} \cdot \frac{1 + x \cdot \left(x \cdot \left(-0.16666666666666666 \cdot \left(\pi \cdot \pi\right)\right)\right)}{x \cdot \pi}
\end{array}
Derivation
  1. Initial program 97.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. Taylor expanded in x around 0

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{PI}\left(\right)\right), \mathsf{PI}\left(\right)\right)\right)\right)\right)\right) \]
    13. PI-lowering-PI.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{PI.f32}\left(\right)\right), \mathsf{PI}\left(\right)\right)\right)\right)\right)\right) \]
    14. PI-lowering-PI.f3282.7%

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{PI.f32}\left(\right)\right), \mathsf{PI.f32}\left(\right)\right)\right)\right)\right)\right) \]
  5. Simplified82.7%

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

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

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

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

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

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

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

      \[\leadsto \mathsf{*.f32}\left(\left(\frac{\sin \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)}{tau}\right), \color{blue}{\left(\frac{1 + x \cdot \left(x \cdot \left(\left(\frac{-1}{6} \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\right)\right)}{x \cdot \mathsf{PI}\left(\right)}\right)}\right) \]
  7. Applied egg-rr82.3%

    \[\leadsto \color{blue}{\frac{\sin \left(x \cdot \left(\pi \cdot tau\right)\right)}{tau} \cdot \frac{1 + x \cdot \left(x \cdot \left(\left(\pi \cdot \pi\right) \cdot -0.16666666666666666\right)\right)}{x \cdot \pi}} \]
  8. Final simplification82.3%

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

Alternative 8: 84.9% accurate, 1.8× speedup?

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

\\
x \cdot \left(\frac{\sin \left(x \cdot \left(\pi \cdot tau\right)\right)}{tau} \cdot \left(\frac{-1}{x \cdot \left(0 - x \cdot \pi\right)} - \pi \cdot 0.16666666666666666\right)\right)
\end{array}
Derivation
  1. Initial program 97.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. associate-/l/N/A

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

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

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\sin \left(x \cdot \mathsf{PI}\left(\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    4. sin-lowering-sin.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\left(x \cdot \mathsf{PI}\left(\right)\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    5. *-lowering-*.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI}\left(\right)\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    6. PI-lowering-PI.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    7. PI-lowering-PI.f3297.2%

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), x\right)\right) \]
  4. Applied egg-rr97.2%

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

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

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

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

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

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

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{*.f32}\left(x, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \left({x}^{2}\right)\right), \left({\mathsf{PI}\left(\right)}^{2}\right)\right)\right)\right), x\right)\right) \]
    6. unpow2N/A

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

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{*.f32}\left(x, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{*.f32}\left(x, x\right)\right), \left({\mathsf{PI}\left(\right)}^{2}\right)\right)\right)\right), x\right)\right) \]
    8. unpow2N/A

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

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{*.f32}\left(x, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{*.f32}\left(x, x\right)\right), \mathsf{*.f32}\left(\mathsf{PI}\left(\right), \mathsf{PI}\left(\right)\right)\right)\right)\right), x\right)\right) \]
    10. PI-lowering-PI.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{*.f32}\left(x, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{*.f32}\left(x, x\right)\right), \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI}\left(\right)\right)\right)\right)\right), x\right)\right) \]
    11. PI-lowering-PI.f3282.6%

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{*.f32}\left(x, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{*.f32}\left(x, x\right)\right), \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI.f32}\left(\right)\right)\right)\right)\right), x\right)\right) \]
  7. Simplified82.6%

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

    \[\leadsto \color{blue}{x \cdot \left(\frac{-1}{6} \cdot \frac{\mathsf{PI}\left(\right) \cdot \sin \left(tau \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)\right)}{tau} + \frac{\sin \left(tau \cdot \left(x \cdot \mathsf{PI}\left(\right)\right)\right)}{tau \cdot \left({x}^{2} \cdot \mathsf{PI}\left(\right)\right)}\right)} \]
  9. Simplified82.0%

    \[\leadsto \color{blue}{\left(\frac{\sin \left(x \cdot \left(tau \cdot \pi\right)\right)}{tau} \cdot \left(\frac{-1}{x \cdot \left(x \cdot \pi\right)} + 0.16666666666666666 \cdot \pi\right)\right) \cdot \left(-x\right)} \]
  10. Final simplification82.0%

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

Alternative 9: 85.2% accurate, 4.7× speedup?

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

\\
1 + \left(x \cdot x\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot \left(-0.16666666666666666 + -0.16666666666666666 \cdot \left(tau \cdot tau\right)\right) + \left(x \cdot x\right) \cdot \left(\left(\left(\pi \cdot \pi\right) \cdot \left(\pi \cdot \pi\right)\right) \cdot \left(0.008333333333333333 \cdot \left(\left(tau \cdot tau\right) \cdot \left(tau \cdot tau\right)\right) + \left(0.008333333333333333 + \left(tau \cdot tau\right) \cdot 0.027777777777777776\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 97.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. associate-/l/N/A

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

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

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\sin \left(x \cdot \mathsf{PI}\left(\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    4. sin-lowering-sin.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\left(x \cdot \mathsf{PI}\left(\right)\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    5. *-lowering-*.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI}\left(\right)\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    6. PI-lowering-PI.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    7. PI-lowering-PI.f3297.2%

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), x\right)\right) \]
  4. Applied egg-rr97.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), tau\right)\right)\right), \mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), tau\right)\right), \left(x \cdot \mathsf{PI}\left(\right)\right)\right), \sin \left(x \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
    13. *-lowering-*.f32N/A

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

      \[\leadsto \mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), tau\right)\right)\right), \mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), tau\right)\right), \mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right), \sin \left(x \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
    15. sin-lowering-sin.f32N/A

      \[\leadsto \mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), tau\right)\right)\right), \mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), tau\right)\right), \mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{sin.f32}\left(\left(x \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right) \]
    16. *-lowering-*.f32N/A

      \[\leadsto \mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), tau\right)\right)\right), \mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), tau\right)\right), \mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI}\left(\right)\right)\right)\right)\right) \]
  8. Applied egg-rr97.2%

    \[\leadsto \color{blue}{\frac{\sin \left(x \cdot \left(\pi \cdot tau\right)\right)}{\frac{\left(x \cdot \left(\pi \cdot tau\right)\right) \cdot \left(x \cdot \pi\right)}{\sin \left(x \cdot \pi\right)}}} \]
  9. 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)} \]
  10. Simplified81.9%

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

Alternative 10: 84.6% accurate, 4.9× speedup?

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

\\
1 + \left(x \cdot x\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot \left(-0.16666666666666666 + -0.16666666666666666 \cdot \left(tau \cdot tau\right)\right) + \left(x \cdot x\right) \cdot \left(\left(\left(\pi \cdot \pi\right) \cdot \left(\pi \cdot \pi\right)\right) \cdot \left(0.008333333333333333 \cdot \left(\left(tau \cdot tau\right) \cdot \left(tau \cdot tau\right)\right) + \left(tau \cdot tau\right) \cdot 0.027777777777777776\right)\right)\right)
\end{array}
Derivation
  1. Initial program 97.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. associate-/l/N/A

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

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

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\sin \left(x \cdot \mathsf{PI}\left(\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    4. sin-lowering-sin.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\left(x \cdot \mathsf{PI}\left(\right)\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    5. *-lowering-*.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI}\left(\right)\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    6. PI-lowering-PI.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    7. PI-lowering-PI.f3297.2%

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), x\right)\right) \]
  4. Applied egg-rr97.2%

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

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

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

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

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

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

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{*.f32}\left(x, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \left({x}^{2}\right)\right), \left({\mathsf{PI}\left(\right)}^{2}\right)\right)\right)\right), x\right)\right) \]
    6. unpow2N/A

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

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{*.f32}\left(x, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{*.f32}\left(x, x\right)\right), \left({\mathsf{PI}\left(\right)}^{2}\right)\right)\right)\right), x\right)\right) \]
    8. unpow2N/A

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

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{*.f32}\left(x, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{*.f32}\left(x, x\right)\right), \mathsf{*.f32}\left(\mathsf{PI}\left(\right), \mathsf{PI}\left(\right)\right)\right)\right)\right), x\right)\right) \]
    10. PI-lowering-PI.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{*.f32}\left(x, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{*.f32}\left(x, x\right)\right), \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI}\left(\right)\right)\right)\right)\right), x\right)\right) \]
    11. PI-lowering-PI.f3282.6%

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{*.f32}\left(x, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{*.f32}\left(x, x\right)\right), \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI.f32}\left(\right)\right)\right)\right)\right), x\right)\right) \]
  7. Simplified82.6%

    \[\leadsto \frac{\sin \left(\left(x \cdot \pi\right) \cdot tau\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \frac{\color{blue}{x \cdot \left(1 + \left(-0.16666666666666666 \cdot \left(x \cdot x\right)\right) \cdot \left(\pi \cdot \pi\right)\right)}}{x} \]
  8. 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) + \frac{1}{36} \cdot \left({tau}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)} \]
  9. Step-by-step derivation
    1. +-lowering-+.f32N/A

      \[\leadsto \mathsf{+.f32}\left(1, \color{blue}{\left({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) + \frac{1}{36} \cdot \left({tau}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right)}\right) \]
    2. *-lowering-*.f32N/A

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

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

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

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

      \[\leadsto \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, x\right), \mathsf{+.f32}\left(\left(\frac{-1}{6} \cdot \left({tau}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + \frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2}\right), \color{blue}{\left({x}^{2} \cdot \left(\frac{1}{120} \cdot \left({tau}^{4} \cdot {\mathsf{PI}\left(\right)}^{4}\right) + \frac{1}{36} \cdot \left({tau}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)}\right)\right)\right) \]
  10. Simplified81.2%

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

Alternative 11: 80.5% accurate, 6.3× speedup?

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

\\
\begin{array}{l}
t_1 := \left(\pi \cdot \pi\right) \cdot \left(x \cdot x\right)\\
1 + -0.16666666666666666 \cdot \left(t\_1 + \left(tau \cdot tau\right) \cdot \left(t\_1 \cdot \left(1 + \left(\pi \cdot \pi\right) \cdot \left(-0.16666666666666666 \cdot \left(x \cdot x\right)\right)\right)\right)\right)
\end{array}
\end{array}
Derivation
  1. Initial program 97.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. Taylor expanded in x around 0

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{PI}\left(\right)\right), \mathsf{PI}\left(\right)\right)\right)\right)\right)\right) \]
    13. PI-lowering-PI.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{PI.f32}\left(\right)\right), \mathsf{PI}\left(\right)\right)\right)\right)\right)\right) \]
    14. PI-lowering-PI.f3282.7%

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{PI.f32}\left(\right)\right), \mathsf{PI.f32}\left(\right)\right)\right)\right)\right)\right) \]
  5. Simplified82.7%

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

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

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

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

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

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

      \[\leadsto \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{+.f32}\left(\left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right), \color{blue}{\left({tau}^{2} \cdot \left({x}^{2} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(1 + \frac{-1}{6} \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right)\right)\right)}\right)\right)\right) \]
  8. Simplified77.0%

    \[\leadsto \color{blue}{1 + -0.16666666666666666 \cdot \left(\left(x \cdot x\right) \cdot \left(\pi \cdot \pi\right) + \left(tau \cdot tau\right) \cdot \left(\left(\left(x \cdot x\right) \cdot \left(\pi \cdot \pi\right)\right) \cdot \left(1 + \left(-0.16666666666666666 \cdot \left(x \cdot x\right)\right) \cdot \left(\pi \cdot \pi\right)\right)\right)\right)} \]
  9. Final simplification77.0%

    \[\leadsto 1 + -0.16666666666666666 \cdot \left(\left(\pi \cdot \pi\right) \cdot \left(x \cdot x\right) + \left(tau \cdot tau\right) \cdot \left(\left(\left(\pi \cdot \pi\right) \cdot \left(x \cdot x\right)\right) \cdot \left(1 + \left(\pi \cdot \pi\right) \cdot \left(-0.16666666666666666 \cdot \left(x \cdot x\right)\right)\right)\right)\right) \]
  10. Add Preprocessing

Alternative 12: 80.2% accurate, 8.1× speedup?

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

\\
\left(1 + \left(tau \cdot \left(tau \cdot \left(\pi \cdot \pi\right)\right)\right) \cdot \left(-0.16666666666666666 \cdot \left(x \cdot x\right)\right)\right) \cdot \left(1 + \left(-0.16666666666666666 \cdot \left(\pi \cdot \pi\right)\right) \cdot \left(x \cdot x\right)\right)
\end{array}
Derivation
  1. Initial program 97.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. associate-/l/N/A

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

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

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\sin \left(x \cdot \mathsf{PI}\left(\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    4. sin-lowering-sin.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\left(x \cdot \mathsf{PI}\left(\right)\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    5. *-lowering-*.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI}\left(\right)\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    6. PI-lowering-PI.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    7. PI-lowering-PI.f3297.2%

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), x\right)\right) \]
  4. Applied egg-rr97.2%

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

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

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

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

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

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

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{*.f32}\left(x, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \left({x}^{2}\right)\right), \left({\mathsf{PI}\left(\right)}^{2}\right)\right)\right)\right), x\right)\right) \]
    6. unpow2N/A

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

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{*.f32}\left(x, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{*.f32}\left(x, x\right)\right), \left({\mathsf{PI}\left(\right)}^{2}\right)\right)\right)\right), x\right)\right) \]
    8. unpow2N/A

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

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{*.f32}\left(x, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{*.f32}\left(x, x\right)\right), \mathsf{*.f32}\left(\mathsf{PI}\left(\right), \mathsf{PI}\left(\right)\right)\right)\right)\right), x\right)\right) \]
    10. PI-lowering-PI.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{*.f32}\left(x, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{*.f32}\left(x, x\right)\right), \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI}\left(\right)\right)\right)\right)\right), x\right)\right) \]
    11. PI-lowering-PI.f3282.6%

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{*.f32}\left(x, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{*.f32}\left(x, x\right)\right), \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI.f32}\left(\right)\right)\right)\right)\right), x\right)\right) \]
  7. Simplified82.6%

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

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

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

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

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

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

      \[\leadsto \left(1 + \frac{-1}{6} \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) + \left(\left(\frac{-1}{6} \cdot {tau}^{2}\right) \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot \color{blue}{\left(1 + \frac{-1}{6} \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \]
  10. Simplified76.6%

    \[\leadsto \color{blue}{\left(1 + \left(tau \cdot \left(tau \cdot \left(\pi \cdot \pi\right)\right)\right) \cdot \left(\left(x \cdot x\right) \cdot -0.16666666666666666\right)\right) \cdot \left(1 + \left(x \cdot x\right) \cdot \left(-0.16666666666666666 \cdot \left(\pi \cdot \pi\right)\right)\right)} \]
  11. Final simplification76.6%

    \[\leadsto \left(1 + \left(tau \cdot \left(tau \cdot \left(\pi \cdot \pi\right)\right)\right) \cdot \left(-0.16666666666666666 \cdot \left(x \cdot x\right)\right)\right) \cdot \left(1 + \left(-0.16666666666666666 \cdot \left(\pi \cdot \pi\right)\right) \cdot \left(x \cdot x\right)\right) \]
  12. Add Preprocessing

Alternative 13: 80.2% accurate, 8.1× speedup?

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

\\
\left(1 + x \cdot \left(x \cdot \left(\pi \cdot \left(\pi \cdot -0.16666666666666666\right)\right)\right)\right) \cdot \left(1 + \left(-0.16666666666666666 \cdot \left(tau \cdot tau\right)\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot \left(x \cdot x\right)\right)\right)
\end{array}
Derivation
  1. Initial program 97.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. Taylor expanded in x around 0

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{PI}\left(\right)\right), \mathsf{PI}\left(\right)\right)\right)\right)\right)\right) \]
    13. PI-lowering-PI.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{PI.f32}\left(\right)\right), \mathsf{PI}\left(\right)\right)\right)\right)\right)\right) \]
    14. PI-lowering-PI.f3282.7%

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{PI.f32}\left(\right)\right), \mathsf{PI.f32}\left(\right)\right)\right)\right)\right)\right) \]
  5. Simplified82.7%

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{*.f32}\left(\mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{*.f32}\left(tau, tau\right)\right), \mathsf{*.f32}\left(\left({x}^{2}\right), \left({\mathsf{PI}\left(\right)}^{2}\right)\right)\right)\right), \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{PI.f32}\left(\right)\right), \mathsf{PI.f32}\left(\right)\right)\right)\right)\right)\right) \]
    8. unpow2N/A

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

      \[\leadsto \mathsf{*.f32}\left(\mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{*.f32}\left(tau, tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, x\right), \left({\mathsf{PI}\left(\right)}^{2}\right)\right)\right)\right), \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{PI.f32}\left(\right)\right), \mathsf{PI.f32}\left(\right)\right)\right)\right)\right)\right) \]
    10. unpow2N/A

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

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

      \[\leadsto \mathsf{*.f32}\left(\mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{*.f32}\left(tau, tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, x\right), \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI}\left(\right)\right)\right)\right)\right), \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{PI.f32}\left(\right)\right), \mathsf{PI.f32}\left(\right)\right)\right)\right)\right)\right) \]
    13. PI-lowering-PI.f3276.6%

      \[\leadsto \mathsf{*.f32}\left(\mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{*.f32}\left(tau, tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, x\right), \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI.f32}\left(\right)\right)\right)\right)\right), \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{PI.f32}\left(\right)\right), \mathsf{PI.f32}\left(\right)\right)\right)\right)\right)\right) \]
  8. Simplified76.6%

    \[\leadsto \color{blue}{\left(1 + \left(-0.16666666666666666 \cdot \left(tau \cdot tau\right)\right) \cdot \left(\left(x \cdot x\right) \cdot \left(\pi \cdot \pi\right)\right)\right)} \cdot \left(1 + x \cdot \left(x \cdot \left(\left(-0.16666666666666666 \cdot \pi\right) \cdot \pi\right)\right)\right) \]
  9. Final simplification76.6%

    \[\leadsto \left(1 + x \cdot \left(x \cdot \left(\pi \cdot \left(\pi \cdot -0.16666666666666666\right)\right)\right)\right) \cdot \left(1 + \left(-0.16666666666666666 \cdot \left(tau \cdot tau\right)\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot \left(x \cdot x\right)\right)\right) \]
  10. Add Preprocessing

Alternative 14: 79.5% accurate, 12.9× speedup?

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

\\
1 + \left(x \cdot x\right) \cdot \left(\pi \cdot \left(\pi \cdot \left(-0.16666666666666666 \cdot \left(1 + tau \cdot tau\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 97.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. associate-/l/N/A

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

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

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\sin \left(x \cdot \mathsf{PI}\left(\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    4. sin-lowering-sin.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\left(x \cdot \mathsf{PI}\left(\right)\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    5. *-lowering-*.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI}\left(\right)\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    6. PI-lowering-PI.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    7. PI-lowering-PI.f3297.2%

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), x\right)\right) \]
  4. Applied egg-rr97.2%

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

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

      \[\leadsto \mathsf{+.f32}\left(1, \color{blue}{\left({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)\right)}\right) \]
    2. *-lowering-*.f32N/A

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, x\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI.f32}\left(\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \left({tau}^{2}\right)\right), \frac{-1}{6}\right)\right)\right)\right) \]
    14. unpow2N/A

      \[\leadsto \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, x\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI.f32}\left(\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \left(tau \cdot tau\right)\right), \frac{-1}{6}\right)\right)\right)\right) \]
    15. *-lowering-*.f3275.6%

      \[\leadsto \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, x\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI.f32}\left(\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{*.f32}\left(tau, tau\right)\right), \frac{-1}{6}\right)\right)\right)\right) \]
  7. Simplified75.6%

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

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

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

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

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

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

      \[\leadsto \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, x\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \left(\left(tau \cdot tau\right) \cdot \frac{-1}{6} + \frac{-1}{6}\right)\right), \mathsf{PI}\left(\right)\right)\right)\right) \]
    7. distribute-lft1-inN/A

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

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

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

      \[\leadsto \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, x\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{*.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(tau, tau\right), 1\right), \frac{-1}{6}\right)\right), \mathsf{PI}\left(\right)\right)\right)\right) \]
    11. PI-lowering-PI.f3275.6%

      \[\leadsto \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, x\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{*.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(tau, tau\right), 1\right), \frac{-1}{6}\right)\right), \mathsf{PI.f32}\left(\right)\right)\right)\right) \]
  9. Applied egg-rr75.6%

    \[\leadsto 1 + \left(x \cdot x\right) \cdot \color{blue}{\left(\left(\pi \cdot \left(\left(tau \cdot tau + 1\right) \cdot -0.16666666666666666\right)\right) \cdot \pi\right)} \]
  10. Final simplification75.6%

    \[\leadsto 1 + \left(x \cdot x\right) \cdot \left(\pi \cdot \left(\pi \cdot \left(-0.16666666666666666 \cdot \left(1 + tau \cdot tau\right)\right)\right)\right) \]
  11. Add Preprocessing

Alternative 15: 79.5% accurate, 12.9× speedup?

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

\\
1 + \left(x \cdot x\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot \left(-0.16666666666666666 + -0.16666666666666666 \cdot \left(tau \cdot tau\right)\right)\right)
\end{array}
Derivation
  1. Initial program 97.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. 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. +-lowering-+.f32N/A

      \[\leadsto \mathsf{+.f32}\left(1, \color{blue}{\left({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)\right)}\right) \]
    2. *-lowering-*.f32N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, x\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI.f32}\left(\right)\right), \mathsf{+.f32}\left(\frac{-1}{6}, \mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{*.f32}\left(tau, \color{blue}{tau}\right)\right)\right)\right)\right)\right) \]
  5. Simplified75.6%

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

Alternative 16: 70.4% accurate, 14.6× speedup?

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

\\
1 + \left(-0.16666666666666666 \cdot \left(tau \cdot tau\right)\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot \left(x \cdot x\right)\right)
\end{array}
Derivation
  1. Initial program 97.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. associate-/l/N/A

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

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

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\sin \left(x \cdot \mathsf{PI}\left(\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    4. sin-lowering-sin.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\left(x \cdot \mathsf{PI}\left(\right)\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    5. *-lowering-*.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI}\left(\right)\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    6. PI-lowering-PI.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    7. PI-lowering-PI.f3297.2%

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), x\right)\right) \]
  4. Applied egg-rr97.2%

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

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

      \[\leadsto \mathsf{+.f32}\left(1, \color{blue}{\left({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)\right)}\right) \]
    2. *-lowering-*.f32N/A

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, x\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI.f32}\left(\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \left({tau}^{2}\right)\right), \frac{-1}{6}\right)\right)\right)\right) \]
    14. unpow2N/A

      \[\leadsto \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, x\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI.f32}\left(\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \left(tau \cdot tau\right)\right), \frac{-1}{6}\right)\right)\right)\right) \]
    15. *-lowering-*.f3275.6%

      \[\leadsto \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, x\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI.f32}\left(\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{*.f32}\left(tau, tau\right)\right), \frac{-1}{6}\right)\right)\right)\right) \]
  7. Simplified75.6%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{*.f32}\left(tau, tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, x\right), \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI}\left(\right)\right)\right)\right)\right) \]
    12. PI-lowering-PI.f3266.4%

      \[\leadsto \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{*.f32}\left(tau, tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, x\right), \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI.f32}\left(\right)\right)\right)\right)\right) \]
  10. Simplified66.4%

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

    \[\leadsto 1 + \left(-0.16666666666666666 \cdot \left(tau \cdot tau\right)\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot \left(x \cdot x\right)\right) \]
  12. Add Preprocessing

Alternative 17: 65.1% accurate, 14.6× speedup?

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

\\
x \cdot \frac{1 + \left(-0.16666666666666666 \cdot \left(\pi \cdot \pi\right)\right) \cdot \left(x \cdot x\right)}{x}
\end{array}
Derivation
  1. Initial program 97.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. associate-/l/N/A

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

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

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\sin \left(x \cdot \mathsf{PI}\left(\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    4. sin-lowering-sin.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\left(x \cdot \mathsf{PI}\left(\right)\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    5. *-lowering-*.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI}\left(\right)\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    6. PI-lowering-PI.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    7. PI-lowering-PI.f3297.2%

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), x\right)\right) \]
  4. Applied egg-rr97.2%

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

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

      \[\leadsto \mathsf{+.f32}\left(1, \color{blue}{\left({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)\right)}\right) \]
    2. *-lowering-*.f32N/A

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, x\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI.f32}\left(\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \left({tau}^{2}\right)\right), \frac{-1}{6}\right)\right)\right)\right) \]
    14. unpow2N/A

      \[\leadsto \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, x\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI.f32}\left(\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \left(tau \cdot tau\right)\right), \frac{-1}{6}\right)\right)\right)\right) \]
    15. *-lowering-*.f3275.6%

      \[\leadsto \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, x\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI.f32}\left(\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{*.f32}\left(tau, tau\right)\right), \frac{-1}{6}\right)\right)\right)\right) \]
  7. Simplified75.6%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{*.f32}\left(x, x\right)\right), \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI}\left(\right)\right)\right)\right) \]
    10. PI-lowering-PI.f3261.8%

      \[\leadsto \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{*.f32}\left(x, x\right)\right), \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI.f32}\left(\right)\right)\right)\right) \]
  10. Simplified61.8%

    \[\leadsto \color{blue}{1 + \left(-0.16666666666666666 \cdot \left(x \cdot x\right)\right) \cdot \left(\pi \cdot \pi\right)} \]
  11. Step-by-step derivation
    1. flip-+N/A

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

      \[\leadsto \frac{1}{\color{blue}{\frac{1 - \left(\frac{-1}{6} \cdot \left(x \cdot x\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)}{1 \cdot 1 - \left(\left(\frac{-1}{6} \cdot \left(x \cdot x\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(\frac{-1}{6} \cdot \left(x \cdot x\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)}}} \]
    3. clear-numN/A

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

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

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

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

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

      \[\leadsto x \cdot \color{blue}{\frac{1 + \left(\frac{-1}{6} \cdot \left(x \cdot x\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)}{x}} \]
  12. Applied egg-rr61.8%

    \[\leadsto \color{blue}{\frac{1 + \left(x \cdot x\right) \cdot \left(-0.16666666666666666 \cdot \left(\pi \cdot \pi\right)\right)}{x} \cdot x} \]
  13. Final simplification61.8%

    \[\leadsto x \cdot \frac{1 + \left(-0.16666666666666666 \cdot \left(\pi \cdot \pi\right)\right) \cdot \left(x \cdot x\right)}{x} \]
  14. Add Preprocessing

Alternative 18: 65.1% accurate, 18.3× speedup?

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

\\
\pi \cdot \left(\left(\left(x \cdot x\right) \cdot 0.16666666666666666\right) \cdot \left(-\pi\right)\right) - -1
\end{array}
Derivation
  1. Initial program 97.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. associate-/l/N/A

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

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

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\sin \left(x \cdot \mathsf{PI}\left(\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    4. sin-lowering-sin.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\left(x \cdot \mathsf{PI}\left(\right)\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    5. *-lowering-*.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI}\left(\right)\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    6. PI-lowering-PI.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    7. PI-lowering-PI.f3297.2%

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), x\right)\right) \]
  4. Applied egg-rr97.2%

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

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

      \[\leadsto \mathsf{+.f32}\left(1, \color{blue}{\left({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)\right)}\right) \]
    2. *-lowering-*.f32N/A

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, x\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI.f32}\left(\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \left({tau}^{2}\right)\right), \frac{-1}{6}\right)\right)\right)\right) \]
    14. unpow2N/A

      \[\leadsto \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, x\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI.f32}\left(\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \left(tau \cdot tau\right)\right), \frac{-1}{6}\right)\right)\right)\right) \]
    15. *-lowering-*.f3275.6%

      \[\leadsto \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, x\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI.f32}\left(\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{*.f32}\left(tau, tau\right)\right), \frac{-1}{6}\right)\right)\right)\right) \]
  7. Simplified75.6%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{*.f32}\left(x, x\right)\right), \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI}\left(\right)\right)\right)\right) \]
    10. PI-lowering-PI.f3261.8%

      \[\leadsto \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{*.f32}\left(x, x\right)\right), \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI.f32}\left(\right)\right)\right)\right) \]
  10. Simplified61.8%

    \[\leadsto \color{blue}{1 + \left(-0.16666666666666666 \cdot \left(x \cdot x\right)\right) \cdot \left(\pi \cdot \pi\right)} \]
  11. Step-by-step derivation
    1. flip-+N/A

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

      \[\leadsto \frac{1}{\color{blue}{\frac{1 - \left(\frac{-1}{6} \cdot \left(x \cdot x\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)}{1 \cdot 1 - \left(\left(\frac{-1}{6} \cdot \left(x \cdot x\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(\frac{-1}{6} \cdot \left(x \cdot x\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)}}} \]
    3. clear-numN/A

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

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

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

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

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

      \[\leadsto \frac{\mathsf{neg}\left(x \cdot \left(1 + \left(\frac{-1}{6} \cdot \left(x \cdot x\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\color{blue}{\mathsf{neg}\left(x\right)}} \]
  12. Applied egg-rr61.8%

    \[\leadsto \color{blue}{-\left(-1 + \pi \cdot \left(\pi \cdot \left(\left(x \cdot x\right) \cdot 0.16666666666666666\right)\right)\right)} \]
  13. Final simplification61.8%

    \[\leadsto \pi \cdot \left(\left(\left(x \cdot x\right) \cdot 0.16666666666666666\right) \cdot \left(-\pi\right)\right) - -1 \]
  14. Add Preprocessing

Alternative 19: 65.1% accurate, 19.9× speedup?

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

\\
1 + \left(\pi \cdot \pi\right) \cdot \left(-0.16666666666666666 \cdot \left(x \cdot x\right)\right)
\end{array}
Derivation
  1. Initial program 97.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. associate-/l/N/A

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

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

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\sin \left(x \cdot \mathsf{PI}\left(\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    4. sin-lowering-sin.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\left(x \cdot \mathsf{PI}\left(\right)\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    5. *-lowering-*.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI}\left(\right)\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    6. PI-lowering-PI.f32N/A

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{PI}\left(\right)\right), x\right)\right) \]
    7. PI-lowering-PI.f3297.2%

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right), tau\right)\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), x\right)\right) \]
  4. Applied egg-rr97.2%

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

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

      \[\leadsto \mathsf{+.f32}\left(1, \color{blue}{\left({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)\right)}\right) \]
    2. *-lowering-*.f32N/A

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, x\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI.f32}\left(\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \left({tau}^{2}\right)\right), \frac{-1}{6}\right)\right)\right)\right) \]
    14. unpow2N/A

      \[\leadsto \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, x\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI.f32}\left(\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \left(tau \cdot tau\right)\right), \frac{-1}{6}\right)\right)\right)\right) \]
    15. *-lowering-*.f3275.6%

      \[\leadsto \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(x, x\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI.f32}\left(\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{*.f32}\left(tau, tau\right)\right), \frac{-1}{6}\right)\right)\right)\right) \]
  7. Simplified75.6%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{*.f32}\left(x, x\right)\right), \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI}\left(\right)\right)\right)\right) \]
    10. PI-lowering-PI.f3261.8%

      \[\leadsto \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{*.f32}\left(x, x\right)\right), \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI.f32}\left(\right)\right)\right)\right) \]
  10. Simplified61.8%

    \[\leadsto \color{blue}{1 + \left(-0.16666666666666666 \cdot \left(x \cdot x\right)\right) \cdot \left(\pi \cdot \pi\right)} \]
  11. Final simplification61.8%

    \[\leadsto 1 + \left(\pi \cdot \pi\right) \cdot \left(-0.16666666666666666 \cdot \left(x \cdot x\right)\right) \]
  12. Add Preprocessing

Alternative 20: 64.2% accurate, 219.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.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. Taylor expanded in x around 0

    \[\leadsto \color{blue}{1} \]
  4. Step-by-step derivation
    1. Simplified60.9%

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

    Reproduce

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