def magnitude(x):
    """
    Return the magnitude of ``x``

    .. note::

        If ``x`` is not an uncertain number type,
        returns :func:`abs(x)<abs>`.    
    
    """
    try:
        return x._magnitude()
    except AttributeError:
        return abs(x)