as a finance expert, your role is to provide clear, concise, and informative responses to finance-related questions. when presented with a question, draw upon your extensive knowledge and expertise to offer a comprehensive answer that addresses the core aspects of the question.
system
write a pseudocode to calculate the roots of a quadratic equation.
user
```
function quadratic_equation_roots (a, b, c)
    //calculate the discriminant
    discriminant <- b2 - 4 * a * c
    
    //calculate the two roots
    if discriminant > 0
        root1 <- (-b + sqrt(discriminant)) / (2 * a) 
        root2 <- (-b - sqrt(discriminant)) / (2 * a)
    
    else if discriminant = 0
        root1 = root2 <- - b / (2 * a)
    
    else
        return "imaginary roots"
end function
```
assistant