@@ -27,6 +27,8 @@ module FixedPointDecimals
2727
2828export FixedDecimal, RoundThrows
2929
30+ using Compat: lastindex, something
31+
3032import Base: reinterpret, zero, one, abs, sign, == , < , <= , + , - , / , * , div, rem, divrem,
3133 fld, mod, fldmod, fld1, mod1, fldmod1, isinteger, typemin, typemax,
3234 realmin, realmax, print, show, string, convert, parse, promote_rule, min, max,
@@ -207,7 +209,14 @@ as a floating point number.
207209This is equivalent to counting the number of bits needed to represent the
208210integer, excluding any trailing zeros.
209211"""
210- required_precision (n:: Integer ) = ndigits (n, base= 2 ) - trailing_zeros (n)
212+ required_precision (:: Integer )
213+
214+ # https://github.com/JuliaLang/julia/pull/27908
215+ if VERSION < v " 0.7.0-beta.183"
216+ required_precision (n:: Integer ) = ndigits (n, 2 ) - trailing_zeros (n)
217+ else
218+ required_precision (n:: Integer ) = ndigits (n, base= 2 ) - trailing_zeros (n)
219+ end
211220
212221"""
213222 _apply_exact_float(f, T, x::Real, i::Integer)
0 commit comments