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
— Functionsinc(x)
Compute normalized sinc function $\operatorname{sinc}(x) = \sin(\pi x) / (\pi x)$ if $x \neq 0$, and $1$ if $x = 0$.
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:1073 [2] sinc(x::Number) @ special/trig.jl:1072
Examples
Real Numbers
julia> sinc(0)
1
julia> sinc(1.0)
0.0
Complex
julia> sinc(0+0im)
1.0 - 0.0im
Tips
See Also
Extended Inputs
Tech Notes
sinc(::Real)
: by pure juliasinc(::BigFloat)
: by MPFR
Version History
Introduced in Julia v1.0 (2018)