import math


def calculate(a, b, c):
    """ Solve quadratic equation and return the value of x

    :param float a: coefficient of x^2
    :param float b: coefficient of x
    :param float c: constant
    :return: both solutions
    :rtype: tuple(float, float)
    """
    discriminant = b ** 2 - 4 * a * c
    disc_complex = complex(discriminant, math.sqrt(-discriminant)/(2 * a))

    print(f"Discriminant: {discriminant} Complex: {disc_complex}")
    if discriminant < 0:
        return None, None
    x1 = (-b + math.sqrt(discriminant)) / (2 * a)
    x2 = (-b - math.sqrt(discriminant)) / (2 * a)
    return x1, x2