\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 := \mathsf{expm1}\left(\mathsf{log1p}\left(x \cdot \pi\right)\right)\\
\frac{\sin t_1}{t_1} \cdot \frac{\sin t_2}{t_2}
\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 (expm1 (log1p (* x PI))))) (* (/ (sin t_1) t_1) (/ (sin t_2) t_2))))
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 = expm1f(log1pf(x * ((float) M_PI)));
return (sinf(t_1) / t_1) * (sinf(t_2) / t_2);
}



Bits error versus x



Bits error versus tau
Results
Initial program 0.7
Applied expm1-log1p-u_binary320.7
Applied expm1-log1p-u_binary320.7
Final simplification0.7
herbie shell --seed 2022068
(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))))