Skip to content

Commit

Permalink
Remove definition of Compat.isapprox
Browse files Browse the repository at this point in the history
Was added in #309.
  • Loading branch information
martinholters committed Aug 31, 2018
1 parent 5ec209b commit 072af48
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 16 deletions.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,6 @@ Currently, the `@compat` macro supports the following syntaxes:
* `transcode` converts between UTF-xx string encodings in Julia 0.5 (as a lightweight
alternative to the LegacyStrings package) ([#17323])

* `Compat.isapprox` with `nans` keyword argument ([#20022])

* `Compat.readline` with `keep` keyword argument ([#25646])

* `Compat.eachline` with `keep` keyword argument ([#25646])
Expand Down Expand Up @@ -483,7 +481,6 @@ includes this fix. Find the minimum version from there.
[#19635]: https://github.com/JuliaLang/julia/issues/19635
[#19784]: https://github.com/JuliaLang/julia/issues/19784
[#20005]: https://github.com/JuliaLang/julia/issues/20005
[#20022]: https://github.com/JuliaLang/julia/issues/20022
[#20164]: https://github.com/JuliaLang/julia/issues/20164
[#20321]: https://github.com/JuliaLang/julia/issues/20321
[#20974]: https://github.com/JuliaLang/julia/issues/20974
Expand Down
9 changes: 0 additions & 9 deletions src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,6 @@ else
end
end

@static if VERSION < v"0.6.0-dev.2093" # Compat.isapprox to allow for NaNs
using Base.rtoldefault
function isapprox(x::Number, y::Number; rtol::Real=rtoldefault(x,y), atol::Real=0, nans::Bool=false)
x == y || (isfinite(x) && isfinite(y) && abs(x-y) <= atol + rtol*max(abs(x), abs(y))) || (nans && isnan(x) && isnan(y))
end
else
import Base.isapprox
end

@static if !isdefined(Base, :isabstracttype) # VERSION < v"0.7.0-DEV.3475"
const isabstracttype = Base.isabstract
export isabstracttype
Expand Down
4 changes: 0 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ let
@test A*D == copy(A) * Diagonal(copy(x))
end

# julia#20022
@test !Compat.isapprox(NaN, NaN)
@test Compat.isapprox(NaN, NaN, nans=true)

# julia#13998
for x in (3.1, -17, 3//4, big(111.1), Inf)
local x
Expand Down

0 comments on commit 072af48

Please sign in to comment.