import math


def get_long_lat(x, y, z):
    """This should be the inverse of get_coord sphere
       latitude = asin (y/R) and longitude = atan2 (z,x).
    >>> get_long_lat(-18.50833156796647, 6.840402866513374, 3.2635182233306983)
    (-80.0, 20.0, 20.0)
    >>> get_long_lat(0.0, 20.0, 0)
    (0.0, 90.0, 20.0)
    >>> get_long_lat(5.0, 27.0, 11)
    (24.443954780416536, 65.89051882013823, 29.58039891549808)
    >>> get_long_lat(10.0, 14.14213562373095, 10.000000000000002)
    (44.99999999999999, 44.99999999999999, 20.0)
    >>>
    """

    r = math.sqrt(x ** 2 + y ** 2 + z ** 2)
    try:
        lat = math.degrees(math.asin(y / r))
        long = math.degrees(math.atan2(x, z))
        if long > 90:
            long = (long - 90) * -1
    except ZeroDivisionError:
        long = 0
        lat = 0
    return long, lat, r