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 2f062ac commit b3f3a60Copy full SHA for b3f3a60
src/FixedPointDecimals.jl
@@ -272,14 +272,14 @@ end
272
function Base.round(::Type{FD{T, f}}, x::Rational{Tr}, ::RoundingMode{:Nearest}=RoundNearest) where {T, Tr, f}
273
reinterpret(FD{T, f}, round(T, x * coefficient(FD{T, f})))
274
end
275
- function Base.round(::Type{FD{T, f}}, x::Rational{Bool}, ::RoundingMode{:Nearest}=RoundNearest) where {T, f}
276
- reinterpret(FD{T, f}, round(T, x * coefficient(FD{T, f})))
277
- end
278
else
279
function Base.round(::Type{FD{T, f}}, x::Rational, ::RoundingMode{:Nearest}=RoundNearest) where {T, f}
280
281
282
+function Base.round(::Type{FD{T, f}}, x::Rational{Bool}, ::RoundingMode{:Nearest}=RoundNearest) where {T, f}
+ reinterpret(FD{T, f}, round(T, x * coefficient(FD{T, f})))
+end
283
284
# conversions and promotions
285
Base.convert(::Type{FD{T, f}}, x::FD{T, f}) where {T, f} = x # Converting an FD to itself is a no-op
0 commit comments