Average Error: 0.7 → 0.7
Time: 8.6s
Precision: binary32
\[\left(10^{-5} \leq x \land x \leq 1\right) \land \left(1 \leq tau \land tau \leq 5\right)\]
\[\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 \left(x \cdot \pi\right)\\ \frac{\sin t_1}{t_1} \cdot \sqrt[3]{\frac{t_2 \cdot \left(t_2 \cdot t_2\right)}{\left(x \cdot \pi\right) \cdot \left(\left(x \cdot \pi\right) \cdot \left(x \cdot \pi\right)\right)}} \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 \left(x \cdot \pi\right)\\
\frac{\sin t_1}{t_1} \cdot \sqrt[3]{\frac{t_2 \cdot \left(t_2 \cdot t_2\right)}{\left(x \cdot \pi\right) \cdot \left(\left(x \cdot \pi\right) \cdot \left(x \cdot \pi\right)\right)}}
\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 (* x PI))))
   (*
    (/ (sin t_1) t_1)
    (cbrt (/ (* t_2 (* t_2 t_2)) (* (* x PI) (* (* 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(x * ((float) M_PI));
	return (sinf(t_1) / t_1) * cbrtf((t_2 * (t_2 * t_2)) / ((x * ((float) M_PI)) * ((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. Applied add-cbrt-cube_binary320.7

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

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

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

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

Reproduce

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