CheckedArithmeticCore.accumulatortypeMethod
Tnew = accumulatortype(op, T1, T2, ...)
Tnew = accumulatortype(T1, T2, ...)

Return a type Tnew suitable for accumulation (reduction) of elements of type T under operation op.

Examples

julia> accumulatortype(+, UInt8)
UInt64
CheckedArithmeticCore.safearg_typeFunction
newT = CheckedArithmeticCore.safearg_type(::Type{T})

Return a "reasonably safe" type newT for computation with numbers of type T. For example, for UInt8 one might return UInt128, because one is much less likely to overflow with UInt128.