def illuminated_fraction(sun_dist, earth_dist, sun_earth_dist):
    """This function computes the illuminated fraction of the disk of a planet,
    as seen from the Earth.

    :param sun_dist: Planet's distance to the Sun, in Astronomical Units
    :type sun_dist: float
    :param earth_dist: Distance from planet to Earth, in Astronomical Units
    :type earth_dist: float
    :param sun_earth_dist: Distance Sun-Earth, in Astronomical Units
    :type sun_earth_dist: float

    :returns: The illuminated fraction of the disc of a planet
    :rtype: float
    :raises: TypeError if input values are of wrong type.

    >>> sun_dist = 0.724604
    >>> earth_dist = 0.910947
    >>> sun_earth_dist = 0.983824
    >>> k = illuminated_fraction(sun_dist, earth_dist, sun_earth_dist)
    >>> print(round(k, 3))
    0.647
    """

    if not (isinstance(sun_dist, float) and isinstance(earth_dist, float) and
            isinstance(sun_earth_dist, float)):
        raise TypeError("Invalid input types")
    k = ((sun_dist + earth_dist) * (sun_dist + earth_dist) -
         sun_earth_dist * sun_earth_dist) / (4.0 * sun_dist * earth_dist)
    return k