Skip to content

Commit 679da00

Browse files
JeffBezansonKeno
authored andcommitted
fix deprecations for 0.7/1.0
1 parent 797b420 commit 679da00

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/FixedPointNumbers.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ using Base: reducedim_initarray
77
import Base: ==, <, <=, -, +, *, /, ~, isapprox,
88
convert, promote_rule, show, isinteger, abs, decompose,
99
isnan, isinf, isfinite,
10-
zero, oneunit, one, typemin, typemax, realmin, realmax, eps, sizeof, reinterpret,
10+
zero, oneunit, one, typemin, typemax, floatmin, floatmax, eps, sizeof, reinterpret,
1111
float, trunc, round, floor, ceil, bswap,
1212
div, fld, rem, mod, mod1, fld1, min, max, minmax,
1313
start, next, done, rand
@@ -60,8 +60,8 @@ isinteger(x::FixedPoint{T,f}) where {T,f} = (x.i&(1<<f-1)) == 0
6060
# traits
6161
typemax(::Type{T}) where {T <: FixedPoint} = T(typemax(rawtype(T)), 0)
6262
typemin(::Type{T}) where {T <: FixedPoint} = T(typemin(rawtype(T)), 0)
63-
realmin(::Type{T}) where {T <: FixedPoint} = eps(T)
64-
realmax(::Type{T}) where {T <: FixedPoint} = typemax(T)
63+
floatmin(::Type{T}) where {T <: FixedPoint} = eps(T)
64+
floatmax(::Type{T}) where {T <: FixedPoint} = typemax(T)
6565

6666
widen1(::Type{Int8}) = Int16
6767
widen1(::Type{UInt8}) = UInt16

test/fixed.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,9 @@ for T in (Fixed{Int8,8}, Fixed{Int16,8}, Fixed{Int16,10}, Fixed{Int32,16})
141141
end
142142
end
143143

144-
@testset "realmin" begin
144+
@testset "floatmin" begin
145145
# issue #79
146-
@test realmin(Q11f4) == Q11f4(0.06)
146+
@test floatmin(Q11f4) == Q11f4(0.06)
147147
end
148148

149149
@testset "Disambiguation constructors" begin

test/normed.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ for T in (FixedPointNumbers.UF..., UF2...)
3535
@test one(T) == 1
3636
@test one(T) * one(T) == one(T)
3737
@test typemin(T) == 0
38-
@test realmin(T) == eps(T)
38+
@test floatmin(T) == eps(T)
3939
@test eps(zero(T)) == eps(typemax(T))
4040
@test sizeof(T) == sizeof(FixedPointNumbers.rawtype(T))
4141
end

0 commit comments

Comments
 (0)