Uses ccubicRoots but only returns on the real portion of the roots (i.e., roots[*] = Real). If a root has a imaginary portion greater than machine tolerance than a dummy value is returned for that root.
nRoots helps to identify the number of expected real roots based on the result from the polynomial discriminant, D.
function cubicRoots_Real input Real a; input Real b; input Real c; input Real d; output Real[3] roots "Real roots"; output Real nRoots "Number of distinct real solutions expected"; end cubicRoots_Real;