Average Error: 0.7 → 0.7
Time: 10.0s
Precision: binary32
\[10^{-5} \leq x \land x \leq 1 \land 1 \leq tau \land tau \leq 5\]
\[\frac{\sin \left(\left(x \cdot \pi\right) \cdot tau\right)}{\left(x \cdot \pi\right) \cdot tau} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi} \]
\[\begin{array}{l} t_1 := \left(x \cdot \pi\right) \cdot tau\\ t_2 := \sin t_1\\ \sqrt[3]{\frac{t_2 \cdot \left(t_2 \cdot t_2\right)}{t_1 \cdot \left(t_1 \cdot t_1\right)}} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi} \end{array} \]
\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}
\begin{array}{l}
t_1 := \left(x \cdot \pi\right) \cdot tau\\
t_2 := \sin t_1\\
\sqrt[3]{\frac{t_2 \cdot \left(t_2 \cdot t_2\right)}{t_1 \cdot \left(t_1 \cdot t_1\right)}} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi}
\end{array}
(FPCore (x tau)
 :precision binary32
 (* (/ (sin (* (* x PI) tau)) (* (* x PI) tau)) (/ (sin (* x PI)) (* x PI))))
(FPCore (x tau)
 :precision binary32
 (let* ((t_1 (* (* x PI) tau)) (t_2 (sin t_1)))
   (*
    (cbrt (/ (* t_2 (* t_2 t_2)) (* t_1 (* t_1 t_1))))
    (/ (sin (* x PI)) (* x PI)))))
float code(float x, float tau) {
	return (sinf((x * ((float) M_PI)) * tau) / ((x * ((float) M_PI)) * tau)) * (sinf(x * ((float) M_PI)) / (x * ((float) M_PI)));
}
float code(float x, float tau) {
	float t_1 = (x * ((float) M_PI)) * tau;
	float t_2 = sinf(t_1);
	return cbrtf((t_2 * (t_2 * t_2)) / (t_1 * (t_1 * t_1))) * (sinf(x * ((float) M_PI)) / (x * ((float) M_PI)));
}

Error

Bits error versus x

Bits error versus tau

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.7

    \[\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. Using strategy rm
  3. Applied add-cbrt-cube_binary320.7

    \[\leadsto \frac{\sin \left(\left(x \cdot \pi\right) \cdot tau\right)}{\color{blue}{\sqrt[3]{\left(\left(\left(x \cdot \pi\right) \cdot tau\right) \cdot \left(\left(x \cdot \pi\right) \cdot tau\right)\right) \cdot \left(\left(x \cdot \pi\right) \cdot tau\right)}}} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi} \]
  4. Applied add-cbrt-cube_binary320.7

    \[\leadsto \frac{\color{blue}{\sqrt[3]{\left(\sin \left(\left(x \cdot \pi\right) \cdot tau\right) \cdot \sin \left(\left(x \cdot \pi\right) \cdot tau\right)\right) \cdot \sin \left(\left(x \cdot \pi\right) \cdot tau\right)}}}{\sqrt[3]{\left(\left(\left(x \cdot \pi\right) \cdot tau\right) \cdot \left(\left(x \cdot \pi\right) \cdot tau\right)\right) \cdot \left(\left(x \cdot \pi\right) \cdot tau\right)}} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi} \]
  5. Applied cbrt-undiv_binary320.7

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

    \[\leadsto \sqrt[3]{\frac{\sin \left(\left(x \cdot \pi\right) \cdot tau\right) \cdot \left(\sin \left(\left(x \cdot \pi\right) \cdot tau\right) \cdot \sin \left(\left(x \cdot \pi\right) \cdot tau\right)\right)}{\left(\left(x \cdot \pi\right) \cdot tau\right) \cdot \left(\left(\left(x \cdot \pi\right) \cdot tau\right) \cdot \left(\left(x \cdot \pi\right) \cdot tau\right)\right)}} \cdot \frac{\sin \left(x \cdot \pi\right)}{x \cdot \pi} \]

Reproduce

herbie shell --seed 2021204 
(FPCore (x tau)
  :name "Lanczos kernel"
  :precision binary32
  :pre (and (<= 1e-5 x 1.0) (<= 1.0 tau 5.0))
  (* (/ (sin (* (* x PI) tau)) (* (* x PI) tau)) (/ (sin (* x PI)) (* x PI))))