-
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
Fix tan #22
Conversation
|
Codecov Report
@@ Coverage Diff @@
## master #22 +/- ##
==========================================
+ Coverage 92.14% 92.15% +<.01%
==========================================
Files 22 22
Lines 917 918 +1
==========================================
+ Hits 845 846 +1
Misses 72 72
Continue to review full report at Codecov.
|
Tests are passing, so I think we should also merge this. |
I'm reopening this because the issue isn't really solved. Current master yields the following: julia> # This examples appears in the tests
x = 2.0^1000
1.0715086071862673e301
julia> Interval(x)
Interval(1.0715086071862673e301, 1.0715086071862673e301)
julia> big(2.0)^1000 ∈ ans # OK
true
julia> # This seems to be a corner case
x = Interval(2.0)^100
Interval(1.2676506002282294e30, 1.2676506002282294e30)
julia> tan(x)
Interval(-1.7829551493767193, -1.782955149376719)
julia> big(2.0)^100 ∈ ans # WRONG
false
julia> # Another case
x = Interval(2.0)^60
Interval(1.152921504606847e18, 1.152921504606847e18)
julia> tan(x) # USEFUL ?
Interval(-Inf, Inf)
julia> prevfloat(tan(x.lo)), nextfloat(tan(x.hi))
(1.4918373962705977, 1.4918373962705977)
julia> tan(big(2.0)^60) # this is contained by the bounds above
1.491837396270597700887517480636152973049592658670418036396829287651786928528278
The problem seems to be in |
I agree that there's an issue with large values of the argument, but I have no idea how to fix it! I believe that Siegfried Rump has a method for this. |
For the case of |
All the trig functions have problems with large arguments. But I don't think it's worth spending that much effort on myself. |
No description provided.