Skip to content

Commit

Permalink
Merge pull request JuliaMath#110 from jmkuhn/printfcompat
Browse files Browse the repository at this point in the history
Remove old printf compat
  • Loading branch information
jmkuhn committed May 5, 2020
2 parents 172df41 + 1c3617c commit a780baa
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/DecFP.jl
Original file line number Diff line number Diff line change
Expand Up @@ -183,15 +183,6 @@ julia> ldexp10(Dec64(15), 2)
"""
ldexp10(x::DecFP.DecimalFloatingPoint, n::Integer)

# for compatibility with julia#29885
if isdefined(Base.Grisu, :getbuf)
getdigitsbuf() = Base.Grisu.getbuf()
elseif isdefined(Base.Grisu, :DIGITSs)
getdigitsbuf() = Base.Grisu.DIGITSs[Threads.threadid()]
else
getdigitsbuf() = Base.Grisu.DIGITS
end

for w in (32,64,128)
BID = Symbol(string("Dec",w))
Ti = eval(Symbol(string("UInt",w)))
Expand Down Expand Up @@ -351,10 +342,6 @@ for w in (32,64,128)
return Int32(n), Int32(pt), neg
end

# compatibility with julia#30373
Printf.Printf.fix_dec(x::$BID, n::Int) = Printf.Printf.fix_dec(x, n, getdigitsbuf())
Printf.Printf.ini_dec(x::$BID, n::Int) = Printf.Printf.ini_dec(x, n, getdigitsbuf())

Base.fma(x::$BID, y::$BID, z::$BID) = nox(ccall(($(bidsym(w,"fma")), libbid), $BID, ($BID,$BID,$BID,Cuint,Ref{Cuint}), x, y, z, roundingmode[Threads.threadid()], RefArray(flags, Threads.threadid())))
Base.muladd(x::$BID, y::$BID, z::$BID) = fma(x,y,z) # faster than x+y*z

Expand Down

0 comments on commit a780baa

Please sign in to comment.