def magnitude(x):
    """
	Determine the magnitude of the given value

	:param x: Numerical value to find the magnitude of

	:return: magnitude
	:rtype: int
	"""
    from math import log10
    if x > 0.0:
        return int(log10(x))
    else:
        return 0
