--[[
Returns the exact decimal representation of double converted to decimal in array of table
with the length and scale by the power of ten
]]

function DoubleToDecimalConverter.ToExact(value: number): ({ number }?, number?, number?)
	value = tonumber(value)
	if not value then
		error("Argument #2 provided must be a number", 2)
	end
	value = math.abs(value)

	if value ~= value or value == 0 or value == math.huge then
		return nil, nil, nil
	end
	
	return bignum_dtoa(value, true)
end

return DoubleToDecimalConverter
