-
Notifications
You must be signed in to change notification settings - Fork 71
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
StackOverflowError when computing sincospi(2±1) #513
Comments
I don't think we implemented Try splitting that up into two pieces. |
Thanks for reporting @kvnoct! Both, julia> @which sincos(x)
sincos(x) in Base.Math at special/trig.jl:205
julia> sincos(x) # OK
([0.14112, 1], [-0.989993, 0.540303])
julia> @which sincospi(x)
sincospi(x::Real) in Base.Math at special/trig.jl:940
julia> sincospi(x)
ERROR: StackOverflowError:
Stacktrace:
[1] sincospi(x::Interval{Float64}) (repeats 79984 times)
@ Base.Math ./special/trig.jl:940 The method used for julia> import Base: sincospi
julia> sincospi(x::Interval) = (sinpi(x), cospi(x))
sincospi (generic function with 7 methods)
julia> sincospi(x)
([-1, 1], [-1, 1])
|
Thanks @lbenet @dpsanders! Actually I was using cispi(theta::Real) = Complex(reverse(sincospi(theta))...) I guess I will define a workaround to handle the intervals in the meantime |
Note that there is only partial support for complex intervals so far. |
It might be nice to define |
I got StackOverflowError when computing sincospi(2±1). Here's the code to reproduce
The text was updated successfully, but these errors were encountered: