def de_digits_for_type(maxvalue, base):
	"""Find the max no of digits needed to represent a value in a given base

	Keyword arguments:
	maxvalue -- the maximum decimal value possible for the data type
	base -- the base to which the values would be converted"""
	
	digits = 0
	while maxvalue > 0:
		digits = digits + 1
		maxvalue = int(maxvalue / base)
	return digits