Skip to content
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 @@ -432,6 +432,8 @@ Currently, the `@compat` macro supports the following syntaxes:

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

* `realmin` and `realmax` are now `floatmin` and `floatmax` ([#28302])

## New macros

* `@__DIR__` has been added ([#18380])
Expand Down Expand Up @@ -668,3 +670,4 @@ includes this fix. Find the minimum version from there.
[#27711]: https://github.com/JuliaLang/julia/issues/27711
[#27828]: https://github.com/JuliaLang/julia/issues/27828
[#27834]: https://github.com/JuliaLang/julia/issues/27834
[#28302]: https://github.com/JuliaLang/julia/issues/28302
7 changes: 7 additions & 0 deletions src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2004,6 +2004,13 @@ if VERSION < v"0.7.0-beta.73"
mapslices(f, A, dims)
end

# https://github.com/JuliaLang/julia/pull/28302
if VERSION < v"0.7.0-beta2.169"
const floatmin = realmin
const floatmax = realmax
export floatmin, floatmax
end

include("deprecated.jl")

end # module Compat
5 changes: 5 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1930,4 +1930,9 @@ let a = rand(5,5)
end
end

# 0.7.0-beta2.169
@test floatmin(Float16) == @eval $(Core.Intrinsics.bitcast(Float16, 0x0400))
@test floatmax(Float32) == @eval $(Core.Intrinsics.bitcast(Float32, 0x7f7fffff))
@test floatmin(zero(Float64)) == floatmin(Float64)

nothing