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 ca33748 commit 8fef453Copy full SHA for 8fef453
src/FixedPointDecimals.jl
@@ -100,12 +100,15 @@ end
100
end
101
102
const FD = FixedDecimal
103
+const RoundThrows = RoundingMode{:Throw}()
104
105
include("parse.jl")
106
107
function __init__()
- append!(_BIGINT_10s, [BigInt(0) for i in 0:Threads.nthreads()])
108
- append!(_BIGINT_Rs, [BigInt(0) for i in 0:Threads.nthreads()])
+ nt = isdefined(Base.Threads, :maxthreadid) ? Threads.maxthreadid() : Threads.nthreads()
109
+ # Buffers used in parsing when dealing with BigInts, see _divpow10! in parse.jl
110
+ resize!(empty!(_BIGINT_10s), nt)
111
+ resize!(empty!(_BIGINT_Rs), nt)
112
113
114
(::Type{T})(x::Real) where {T <: FD} = convert(T, x)
0 commit comments