sinc
Compute the normalized sinc(x) function, where x expressed in radians.
Returns:
\[\begin{cases} \frac{\sin(\pi x)}{\pi x}, & x \ne 0\\ 1, & x=0 \end{cases}\]
Base.Math.sinc — Function
sinc(x::T) where {T <: Number} -> float(T)Compute normalized sinc function $\operatorname{sinc}(x) = \sin(\pi x) / (\pi x)$ if $x \neq 0$, and $1$ if $x = 0$.
Return a T(NaN) if isnan(x).
See also cosc, its derivative.
Methods
julia> methods(sinc, (Any,), [Base, Base.Math, Base.MathConstants, Base.MPFR])# 2 methods for generic function "sinc" from Base.Math: [1] sinc(x::Integer) @ special/trig.jl:1087 [2] sinc(x::Number) @ special/trig.jl:1086
Examples
Real Numbers
julia> sinc(0)
1
julia> sinc(1.0)
0.0Complex
julia> sinc(0+0im)
1.0 - 0.0imTips
See Also
Extended Inputs
Tech Notes
sinc(::Real): by pure juliasinc(::BigFloat): by MPFR
Version History
Introduced in Julia v1.0 (2018)