-module(ef10).
-export([solutions/3]).

solutions(A,B,C) -> 
    D = discriminant(A, B, C),
                 if
                  D == 0 -> [-B/2/A];
                  D <  0 -> [];
                  D >  0 -> 
                   DR = math:sqrt(D),
                   [(-B+DR)/2/A, (-B-DR)/2/A]
                 end.

discriminant(A, B, C) ->
    D = B*B - 4*A*C,
    D.
