Lanczos kernel

Percentage Accurate: 98.0% → 98.0%
Time: 15.6s
Alternatives: 13
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary32 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 13 alternatives:

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

Initial Program: 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: 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}
Derivation
  1. Initial program 98.2%

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

Alternative 2: 97.4% accurate, 1.0× speedup?

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

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

    \[\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-*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), \left(x \cdot \left(\mathsf{PI}\left(\right) \cdot tau\right)\right)\right), \mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\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), \left(x \cdot \left(tau \cdot \mathsf{PI}\left(\right)\right)\right)\right), \mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\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), \left(\left(x \cdot tau\right) \cdot \mathsf{PI}\left(\right)\right)\right), \mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\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(\left(x \cdot tau\right), \mathsf{PI}\left(\right)\right)\right), \mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\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, tau\right), \mathsf{PI}\left(\right)\right)\right), \mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right)\right) \]
    6. PI-lowering-PI.f3297.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, tau\right), \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right)\right) \]
  4. Applied egg-rr97.6%

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

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

Alternative 3: 97.1% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 85.5% accurate, 1.8× speedup?

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

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

    \[\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. *-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(\frac{-1}{6}, \color{blue}{\left({\mathsf{PI}\left(\right)}^{2}\right)}\right)\right)\right)\right)\right) \]
    10. 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, \mathsf{*.f32}\left(\frac{-1}{6}, \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\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(\frac{-1}{6}, \mathsf{*.f32}\left(\mathsf{PI}\left(\right), \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right)\right)\right)\right) \]
    12. 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(\frac{-1}{6}, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right) \]
    13. PI-lowering-PI.f3286.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(\frac{-1}{6}, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI.f32}\left(\right)\right)\right)\right)\right)\right)\right) \]
  5. Simplified86.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(-0.16666666666666666 \cdot \left(\pi \cdot \pi\right)\right)\right)\right)} \]
  6. Taylor expanded in x around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 85.3% accurate, 1.8× speedup?

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

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

    \[\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. *-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(\frac{-1}{6}, \color{blue}{\left({\mathsf{PI}\left(\right)}^{2}\right)}\right)\right)\right)\right)\right) \]
    10. 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, \mathsf{*.f32}\left(\frac{-1}{6}, \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\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(\frac{-1}{6}, \mathsf{*.f32}\left(\mathsf{PI}\left(\right), \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right)\right)\right)\right) \]
    12. 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(\frac{-1}{6}, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right) \]
    13. PI-lowering-PI.f3286.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(\frac{-1}{6}, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI.f32}\left(\right)\right)\right)\right)\right)\right)\right) \]
  5. Simplified86.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(-0.16666666666666666 \cdot \left(\pi \cdot \pi\right)\right)\right)\right)} \]
  6. Step-by-step derivation
    1. 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(\frac{-1}{6} \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)}{\color{blue}{\left(x \cdot \mathsf{PI}\left(\right)\right) \cdot tau}} \]
    2. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 80.0% accurate, 6.3× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \left(\pi \cdot \pi\right)\\
t_2 := x \cdot t\_1\\
1 + -0.16666666666666666 \cdot \left(t\_2 + \left(tau \cdot tau\right) \cdot \left(t\_2 \cdot \left(1 + x \cdot \left(-0.16666666666666666 \cdot t\_1\right)\right)\right)\right)
\end{array}
\end{array}
Derivation
  1. Initial program 98.2%

    \[\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. *-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(\frac{-1}{6}, \color{blue}{\left({\mathsf{PI}\left(\right)}^{2}\right)}\right)\right)\right)\right)\right) \]
    10. 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, \mathsf{*.f32}\left(\frac{-1}{6}, \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\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(\frac{-1}{6}, \mathsf{*.f32}\left(\mathsf{PI}\left(\right), \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right)\right)\right)\right) \]
    12. 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(\frac{-1}{6}, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right) \]
    13. PI-lowering-PI.f3286.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(\frac{-1}{6}, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI.f32}\left(\right)\right)\right)\right)\right)\right)\right) \]
  5. Simplified86.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(-0.16666666666666666 \cdot \left(\pi \cdot \pi\right)\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. Simplified81.3%

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

Alternative 7: 79.7% accurate, 8.1× speedup?

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

\\
\left(1 + x \cdot \left(x \cdot \left(-0.16666666666666666 \cdot \left(\pi \cdot \pi\right)\right)\right)\right) \cdot \left(1 + \left(tau \cdot tau\right) \cdot \left(x \cdot \left(-0.16666666666666666 \cdot \left(x \cdot \left(\pi \cdot \pi\right)\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 98.2%

    \[\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. *-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(\frac{-1}{6}, \color{blue}{\left({\mathsf{PI}\left(\right)}^{2}\right)}\right)\right)\right)\right)\right) \]
    10. 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, \mathsf{*.f32}\left(\frac{-1}{6}, \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\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(\frac{-1}{6}, \mathsf{*.f32}\left(\mathsf{PI}\left(\right), \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right)\right)\right)\right) \]
    12. 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(\frac{-1}{6}, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right) \]
    13. PI-lowering-PI.f3286.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(\frac{-1}{6}, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI.f32}\left(\right)\right)\right)\right)\right)\right)\right) \]
  5. Simplified86.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(-0.16666666666666666 \cdot \left(\pi \cdot \pi\right)\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(\frac{-1}{6}, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI.f32}\left(\right)\right)\right)\right)\right)\right)\right) \]
  7. Step-by-step derivation
    1. associate-*r*N/A

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

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

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

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

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

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

      \[\leadsto \mathsf{*.f32}\left(\mathsf{+.f32}\left(1, \left(\left(\frac{-1}{6} \cdot {tau}^{2}\right) \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot {x}^{2}\right)\right)\right), \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI.f32}\left(\right)\right)\right)\right)\right)\right)\right) \]
    8. *-commutativeN/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(\frac{-1}{6}, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI.f32}\left(\right)\right)\right)\right)\right)\right)\right) \]
    9. associate-*r*N/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(1, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\frac{-1}{6}, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI.f32}\left(\right)\right)\right)\right)\right)\right)\right) \]
    10. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

Alternative 8: 79.0% accurate, 12.9× speedup?

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

\\
1 + \left(\left(\pi \cdot \pi\right) \cdot \left(x \cdot x\right)\right) \cdot \left(-0.16666666666666666 + -0.16666666666666666 \cdot \left(tau \cdot tau\right)\right)
\end{array}
Derivation
  1. Initial program 98.2%

    \[\frac{\sin \left(\left(x \cdot \pi\right) \cdot tau\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi} \]
  2. Step-by-step derivation
    1. times-fracN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), tau\right)\right)\right), \mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right)\right), \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \left(\color{blue}{\left(x \cdot \mathsf{PI}\left(\right)\right)} \cdot tau\right)\right)\right)\right) \]
  3. Simplified97.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, x\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(tau, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{*.f32}\left(\left(\frac{-1}{6} \cdot {x}^{2}\right), \left(tau \cdot {\mathsf{PI}\left(\right)}^{4} + {tau}^{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right), \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), tau\right)\right)\right)\right)\right) \]
  7. Simplified78.8%

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

    \[\leadsto \color{blue}{1 + \left(\frac{-1}{6} \cdot \left({tau}^{2} \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) + \frac{-1}{6} \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \]
  9. 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 {\mathsf{PI}\left(\right)}^{2}\right)\right) + \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 {tau}^{2}\right) \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + \color{blue}{\frac{-1}{6}} \cdot \left({x}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right) \]
    3. distribute-rgt-outN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 79.0% accurate, 12.9× speedup?

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

\\
1 + \left(x \cdot x\right) \cdot \left(-0.16666666666666666 \cdot \left(\left(\pi \cdot \pi\right) \cdot \left(1 + tau \cdot tau\right)\right)\right)
\end{array}
Derivation
  1. Initial program 98.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(tau, \mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right)\right), \mathsf{*.f32}\left(tau, \mathsf{*.f32}\left(x, \mathsf{PI}\left(\right)\right)\right)\right), \mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right)\right) \]
    8. PI-lowering-PI.f3298.0%

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(tau, \mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right)\right), \mathsf{*.f32}\left(tau, \mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right)\right), \mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right)\right) \]
  7. Simplified98.0%

    \[\leadsto \frac{\color{blue}{\frac{\sin \left(tau \cdot \left(x \cdot \pi\right)\right)}{tau \cdot \left(x \cdot \pi\right)}}}{x \cdot \pi} \cdot \sin \left(x \cdot \pi\right) \]
  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) + \frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2}\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) + \frac{-1}{6} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)}\right) \]
    2. distribute-lft-outN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 79.0% accurate, 12.9× speedup?

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

\\
1 + \left(-0.16666666666666666 \cdot \left(x \cdot x\right)\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot \left(1 + tau \cdot tau\right)\right)
\end{array}
Derivation
  1. Initial program 98.2%

    \[\frac{\sin \left(\left(x \cdot \pi\right) \cdot tau\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi} \]
  2. Step-by-step derivation
    1. times-fracN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), tau\right)\right)\right), \mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right)\right), \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \left(\color{blue}{\left(x \cdot \mathsf{PI}\left(\right)\right)} \cdot tau\right)\right)\right)\right) \]
  3. Simplified97.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, x\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(tau, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{*.f32}\left(\left(\frac{-1}{6} \cdot {x}^{2}\right), \left(tau \cdot {\mathsf{PI}\left(\right)}^{4} + {tau}^{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right), \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), tau\right)\right)\right)\right)\right) \]
  7. Simplified78.8%

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

    \[\leadsto \color{blue}{1 + \frac{-1}{6} \cdot \left({x}^{2} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(1 + {tau}^{2}\right)\right)\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 \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(1 + {tau}^{2}\right)\right)\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}{\left({\mathsf{PI}\left(\right)}^{2} \cdot \left(1 + {tau}^{2}\right)\right)}\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} \cdot \left(1 + {tau}^{2}\right)\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}} \cdot \left(1 + {tau}^{2}\right)\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)}^{\color{blue}{2}} \cdot \left(1 + {tau}^{2}\right)\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)}^{\color{blue}{2}} \cdot \left(1 + {tau}^{2}\right)\right)\right)\right) \]
    7. *-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(\left({\mathsf{PI}\left(\right)}^{2}\right), \color{blue}{\left(1 + {tau}^{2}\right)}\right)\right)\right) \]
    8. unpow2N/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(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right), \left(\color{blue}{1} + {tau}^{2}\right)\right)\right)\right) \]
    9. *-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{*.f32}\left(\mathsf{PI}\left(\right), \mathsf{PI}\left(\right)\right), \left(\color{blue}{1} + {tau}^{2}\right)\right)\right)\right) \]
    10. 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{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI}\left(\right)\right), \left(1 + {tau}^{2}\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(x, x\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI.f32}\left(\right)\right), \left(1 + {tau}^{2}\right)\right)\right)\right) \]
    12. +-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{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI.f32}\left(\right)\right), \mathsf{+.f32}\left(1, \color{blue}{\left({tau}^{2}\right)}\right)\right)\right)\right) \]
    13. unpow2N/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{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI.f32}\left(\right)\right), \mathsf{+.f32}\left(1, \left(tau \cdot \color{blue}{tau}\right)\right)\right)\right)\right) \]
    14. *-lowering-*.f3280.1%

      \[\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{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI.f32}\left(\right)\right), \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(tau, \color{blue}{tau}\right)\right)\right)\right)\right) \]
  10. Simplified80.1%

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

Alternative 11: 64.9% accurate, 19.9× speedup?

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

\\
1 + x \cdot \left(-0.16666666666666666 \cdot \left(x \cdot \left(\pi \cdot \pi\right)\right)\right)
\end{array}
Derivation
  1. Initial program 98.2%

    \[\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. *-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(\frac{-1}{6}, \color{blue}{\left({\mathsf{PI}\left(\right)}^{2}\right)}\right)\right)\right)\right)\right) \]
    10. 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, \mathsf{*.f32}\left(\frac{-1}{6}, \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\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(\frac{-1}{6}, \mathsf{*.f32}\left(\mathsf{PI}\left(\right), \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right)\right)\right)\right) \]
    12. 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(\frac{-1}{6}, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right) \]
    13. PI-lowering-PI.f3286.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(\frac{-1}{6}, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI.f32}\left(\right)\right)\right)\right)\right)\right)\right) \]
  5. Simplified86.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(-0.16666666666666666 \cdot \left(\pi \cdot \pi\right)\right)\right)\right)} \]
  6. Taylor expanded in tau around 0

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

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

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

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

      \[\leadsto \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) \]
    6. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 63.9% accurate, 24.3× speedup?

\[\begin{array}{l} \\ \frac{1}{x} \cdot \frac{1}{\frac{1}{x}} \end{array} \]
(FPCore (x tau) :precision binary32 (* (/ 1.0 x) (/ 1.0 (/ 1.0 x))))
float code(float x, float tau) {
	return (1.0f / x) * (1.0f / (1.0f / x));
}
real(4) function code(x, tau)
    real(4), intent (in) :: x
    real(4), intent (in) :: tau
    code = (1.0e0 / x) * (1.0e0 / (1.0e0 / x))
end function
function code(x, tau)
	return Float32(Float32(Float32(1.0) / x) * Float32(Float32(1.0) / Float32(Float32(1.0) / x)))
end
function tmp = code(x, tau)
	tmp = (single(1.0) / x) * (single(1.0) / (single(1.0) / x));
end
\begin{array}{l}

\\
\frac{1}{x} \cdot \frac{1}{\frac{1}{x}}
\end{array}
Derivation
  1. Initial program 98.2%

    \[\frac{\sin \left(\left(x \cdot \pi\right) \cdot tau\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi} \]
  2. Step-by-step derivation
    1. times-fracN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), tau\right)\right)\right), \mathsf{sin.f32}\left(\mathsf{*.f32}\left(x, \mathsf{PI.f32}\left(\right)\right)\right)\right), \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \left(\color{blue}{\left(x \cdot \mathsf{PI}\left(\right)\right)} \cdot tau\right)\right)\right)\right) \]
  3. Simplified97.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(x, x\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(tau, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{*.f32}\left(\left(\frac{-1}{6} \cdot {x}^{2}\right), \left(tau \cdot {\mathsf{PI}\left(\right)}^{4} + {tau}^{3} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right), \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), \mathsf{*.f32}\left(x, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), tau\right)\right)\right)\right)\right) \]
  7. Simplified78.8%

    \[\leadsto \frac{\color{blue}{\left(x \cdot x\right) \cdot \left(tau \cdot \left(\pi \cdot \pi\right) + \left(\left(x \cdot x\right) \cdot -0.16666666666666666\right) \cdot \left(\left(1 + tau \cdot tau\right) \cdot \left(tau \cdot {\pi}^{4}\right)\right)\right)}}{x \cdot \left(\pi \cdot \left(x \cdot \left(\pi \cdot tau\right)\right)\right)} \]
  8. Step-by-step derivation
    1. times-fracN/A

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

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

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

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

    \[\leadsto \mathsf{*.f32}\left(\color{blue}{\left(\frac{1}{x}\right)}, \mathsf{/.f32}\left(\mathsf{*.f32}\left(x, x\right), x\right)\right) \]
  11. Step-by-step derivation
    1. /-lowering-/.f3265.5%

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(1, x\right), \mathsf{/.f32}\left(\color{blue}{\mathsf{*.f32}\left(x, x\right)}, x\right)\right) \]
  12. Simplified65.5%

    \[\leadsto \color{blue}{\frac{1}{x}} \cdot \frac{x \cdot x}{x} \]
  13. Step-by-step derivation
    1. clear-numN/A

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

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(1, x\right), \left(\frac{1}{\frac{\frac{x}{x}}{\color{blue}{x}}}\right)\right) \]
    3. *-inversesN/A

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

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(1, x\right), \mathsf{/.f32}\left(1, \color{blue}{\left(\frac{1}{x}\right)}\right)\right) \]
    5. /-lowering-/.f3265.6%

      \[\leadsto \mathsf{*.f32}\left(\mathsf{/.f32}\left(1, x\right), \mathsf{/.f32}\left(1, \mathsf{/.f32}\left(1, \color{blue}{x}\right)\right)\right) \]
  14. Applied egg-rr65.6%

    \[\leadsto \frac{1}{x} \cdot \color{blue}{\frac{1}{\frac{1}{x}}} \]
  15. Add Preprocessing

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

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

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

    Reproduce

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