We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e9a3c5 commit 261630fCopy full SHA for 261630f
src/FixedPointNumbers.jl
@@ -10,10 +10,8 @@ import Base: ==, <, <=, -, +, *, /, ~, isapprox,
10
zero, oneunit, one, typemin, typemax, floatmin, floatmax, eps, sizeof, reinterpret,
11
float, trunc, round, floor, ceil, bswap,
12
div, fld, rem, mod, mod1, fld1, min, max, minmax,
13
- start, next, done, rand
14
-if isdefined(Base, :rem1)
15
- import Base: rem1
16
-end
+ rand
+
17
using Base: @pure
18
19
# T => BaseType
@@ -153,10 +151,7 @@ for f in (:div, :fld, :fld1)
153
151
$f(x::T, y::T) where {T <: FixedPoint} = $f(reinterpret(x),reinterpret(y))
154
152
end
155
156
-for f in (:rem, :mod, :mod1, :rem1, :min, :max)
157
- if f === :rem1 && !isdefined(Base, :rem1)
158
- continue
159
- end
+for f in (:rem, :mod, :mod1, :min, :max)
160
@eval begin
161
$f(x::T, y::T) where {T <: FixedPoint} = T($f(reinterpret(x),reinterpret(y)),0)
162
0 commit comments