.TRANSFORM.Math.ComplexMath.ccubicRoots

Information


Return roots[3] where each root is complex (i.e., has both roots[*].re and roots[*].im ).


nRoots helps to identify the number of expected real roots based on the result from the polynomial discriminant, D.

Interface

function ccubicRoots
  import TRANSFORM.Math.ComplexMath.csqrt;
  import 'abs' = Modelica.ComplexMath.abs;
  input Real a;
  input Real b;
  input Real c;
  input Real d;
  output Complex[3] roots "Real roots";
  output Real nRoots "Number of distinct real solutions expected";
end ccubicRoots;

Generated at 2024-11-22T19:25:38Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos