-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Value of Sinc at complex infinity. #14914
Comments
This should be |
@simonbyrne , That makes more sense. I wanted to represent the possibility of any real number x of the form x = n/2 where n is an odd integer. So you're right: x+0.5 is an integer is a better statement. |
Perhaps, a more compact way of writing this function is as follows: function sinc(x::Complex)
xr, xi = reim(x)
if x == 0
return one(x)
elseif isfinite(xr) && isinf(xi)
Si = sign(xi)
Sr = sign(xr)
Sc = sign(cospi(xr))
Ss = sign(sinpi(xr))
return xr == 0 ? complex(Inf,0) : oftype(x,Inf)*complex( (isinteger(xr+0.5) ? Sr*Ss : Sc) , Si*(isinteger(xr) ? Sr*Sc : -Ss) )
elseif isinf(xr)
return isfinite(xi) ? zero(x) : oftype(x,NaN)*complex(1,1)
else
return oftype(x,sinpi(x)/(pi*x))
end
end |
For a function this complicated, writing out the Here are contour plots of the complex sinc function generated by Mathematica The plots show clearly that julia> sinc(-0.5+0.0001im)
0.6366197783187171 + 0.0001273239556637434im
julia> sinc(-0.5-0.0001im)
0.6366197783187171 - 0.0001273239556637434im
julia> sinc(-0.5-0.00im)
0.6366197723675814 - 0.0im
julia> sinc(-0.5+0.00im)
0.6366197723675814 - 0.0im |
I've made some improvements to |
Closed by #14922 |
There are still some
|
Closed by #37273 |
Looks like this is still an issue. (should be |
Arguably, the remaining problem here is in complex division, is not specific to julia> (Inf*im) / im
Inf + NaN*im |
I was wondering if we could add the values of the Sinc function at the complex infinities. In #14854, there was some talk to push this in a separate pull request. However, as @simonbyrne mentioned:
Although I am not quite sure how to remedy the incorrect NaNs for finite values. I have computed the complex limits for the Sinc function and found the following. Any checks or advice or collaboration would be greatly appreciated.
The Sinc function
Given that:
We have three cases to consider
With this in mind, this gives rise to the following function definition:
Like I said, any help with this issue would be gladly appreciated! Thanks.
The text was updated successfully, but these errors were encountered: