Skip to content
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

atan2 -> atan #574

Merged
merged 1 commit into from
Jun 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,8 @@ Currently, the `@compat` macro supports the following syntaxes:

* `Unicode.isnumeric` is now available as `isnumeric` ([#25479]).

* `atan2` is now a 2-argument method of `atan` ([#27253]).

## New macros

* `@__DIR__` has been added ([#18380])
Expand Down Expand Up @@ -645,3 +647,4 @@ includes this fix. Find the minimum version from there.
[#27077]: https://github.com/JuliaLang/julia/issues/27077
[#27258]: https://github.com/JuliaLang/julia/issues/27258
[#27298]: https://github.com/JuliaLang/julia/issues/27298
[#27253]: https://github.com/JuliaLang/julia/issues/27253
5 changes: 5 additions & 0 deletions src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1933,6 +1933,11 @@ if VERSION < v"0.7.0-DEV.5278"
export something
end

# https://github.com/JuliaLang/julia/pull/27253
@static if VERSION < v"0.7.0-alpha.44"
Base.atan(x::Real, y::Real) = atan2(x, y)
end

include("deprecated.jl")

end # module Compat
6 changes: 6 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1778,4 +1778,10 @@ let sep = Compat.Sys.iswindows() ? ';' : ':'
end
end

# 0.7.0-alpha.44
@test atan(1, 2) == atan(0.5)
@test atan(1.0, 2.0) == atan(0.5)
@test atan(-1.0, -2.0) ≈ atan(0.5) - π
@test atan(big"-1.0", big"-2.0") ≈ atan(big"0.5") - π

nothing