import math


def safe_sqrt(val):
    """
    Safely calculates the square root of a value. If the value is -1 (unknown),
    then the result is -1 (unknown).
    """
    return -1 if val == -1 else math.sqrt(val)